Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Store build binary in S3. #1089

Merged
merged 2 commits into from
Jul 22, 2016
Merged

Store build binary in S3. #1089

merged 2 commits into from
Jul 22, 2016

Conversation

nanliu
Copy link
Contributor

@nanliu nanliu commented Jul 20, 2016

Store snap travici linux builds in a s3 repository.

  • Upload build directory to AWS s3.
  • Update DNS build.ci.snap-telemtry.io -> s3 repo.

Testing done:

  • manual

@intelsdi-x/snap-maintainers

@IzabellaRaulin
Copy link
Contributor

@nanliu, I've added a label because you wrote that is not ready to merge. Please, inform me when this pull request will be ready to merge, so I remove the label. It will be helpful if you add some checklist like here to show the status of works on that. Thank You.

@nanliu nanliu force-pushed the travis_s3 branch 5 times, most recently from 6c68dcf to 9bb6611 Compare July 20, 2016 17:00
Store snap travici linux builds in a s3 repository.

* Upload build directory to AWS s3.
* Update DNS build.ci.snap-telemtry.io -> s3 repo.
@nanliu
Copy link
Contributor Author

nanliu commented Jul 20, 2016

@IzabellaRaulin this is ready for review now.

Because of the following condition restriction, you won't see anything interesting in the travis.ci run for the pull request, only when the code is merged to master:

deploy:
  on:
    repo: intelsdi-x/snap
    branch: master
    condition: $SNAP_TEST_TYPE = medium && $TRAVIS_GO_VERSION = "1.6.2"

Due to this reason, I have a temporary build branch to demonstrate this change here. The interesting section are summarized below:

2016-07-20 17:49:20 UTC [     info] copying snap binaries to /home/travis/gopath/src/github.com/intelsdi-x/snap/build/snap-e373c0d
...
uploading "snap-e373c0d/snapctl" with {:content_type=>"", :acl=>"public-read"}
uploading "snap-e373c0d/snapd" with {:content_type=>"", :acl=>"public-read"}
uploading "snap-e373c0d/snap-plugin-collector-mock1" with {:content_type=>"", :acl=>"public-read"}
uploading "snap-e373c0d/snap-plugin-collector-mock2" with {:content_type=>"", :acl=>"public-read"}
uploading "snap-e373c0d/snap-plugin-processor-passthru" with {:content_type=>"", :acl=>"public-read"}
uploading "snap-e373c0d/snap-plugin-publisher-mock-file" with {:content_type=>"", :acl=>"public-read"}
...
2016-07-20 17:49:34 UTC [     info] updating package URL: https://s3-us-west-2.amazonaws.com/intelsdi-x/snap/snap-e373c0d

When a PR is merged on master, the last test (medium on Go 1.6.2) will:

  • move the build directory to a folder containing the sha of the commit (via predeploy).
  • copy the build directory to s3://intelsdi-x/snap (via deploy).
  • update the dns build.ci.snap-telemetry.io to point to the latest build folder on s3 (via postdeploy).

The will ensure the latest snap binary is available at:

Older versions will be available at:
https://s3-us-west-2.amazonaws.com/intelsdi-x/snap/snap-{sha}/

NOTE: This is strictly used for internal testing, and there is neither guarantees on url nor file availability, and we have not decided how long to store old binaries.

@nanliu nanliu force-pushed the travis_s3 branch 3 times, most recently from cedc360 to 81c83db Compare July 22, 2016 18:05
* add a s3 build matrix for travis.ci
* use full git log sha %H instead of %h for folder name
@nanliu
Copy link
Contributor Author

nanliu commented Jul 22, 2016

Updated to use full sha and a separate build branch. Latest build example:

https://travis-ci.org/intelsdi-x/snap/jobs/146729271#L203-L237

@IRCody
Copy link
Contributor

IRCody commented Jul 22, 2016

LGTM

@IRCody IRCody merged commit 46face0 into intelsdi-x:master Jul 22, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants