I need to publish the build artifacts(.apk files) to a cloud server. Could someone please help me to do the configuration.
It might help to know what kind of cloud server you have. I upload my artifacts to a Github release using ghr.
Here is my circle.yml (relevant line highlighted):
Thanks for the response. I am very new to Continuous Integration. I woul like to post my artifacts to the GitHub. Could you please explain me the parameters in the statement to publish to GitHub.
Publish assets to Github
- ghr -t $GITHUB_TOKEN -u $CIRCLE_PROJECT_USERNAME -r $CIRCLE_PROJECT_REPONAME v1.0.$CIRCLE_BUILD_NUM $CIRCLE_ARTIFACTS/ || true
My circle.yml file is
- if ! $(grep -q “Revision=23.0.2” $ANDROID_HOME/tools/source.properties); then echo y | android update sdk -u -a -t “tools”; fi
- if [ ! -e $ANDROID_HOME/build-tools/23.0.2 ]; then echo y | android update sdk -u -a -t “build-tools-23.0.2”; fi
- ./gradlew dependencies
- ./gradlew assembleRelease
Well, ghr is actually this tool: https://github.com/tcnksm/ghr It’s got a pretty good set of documentation. All the other parameters are environment variables built in to CircleCI. You can find them in their documentation here: https://circleci.com/docs/environment-variables/
It’s important to understand the $CIRCLE_ARTIFACTS environment variable points to where your artifacts should be. When you create your artifacts, put them there. They’ll appear in the ‘artifacts’ tab at the end of the build.
Also, my build script happens to use the $CIRCLE_ARTIFACTS location as the ‘source’ location for ghr. Make sense?
I have tried and but the files are not published to the github. But the release version is getting generated in github. I am not sure where it is getting wrong…
- ghr -t $GITHUB_TOKEN -u $CIRCLE_PROJECT_USERNAME -r $CIRCLE_PROJECT_REPONAME v1.0.$CIRCLE_BUILD_NUM $artifacts/ || true
–> Uploading: nohup.out
upload nohup.out error: failed to open file: nohup.out
Thanks dear… I have configured the $CIRCLE_ARTIFACTS properly… and everything works perfect… http://stackoverflow.com/questions/37244768/circleci-publish-the-artifacts-to-a-cloud-server… You can post your answer in stackoverflow as well…