Skip to content

Commit

Permalink
Add support for publishing native-engine to s3. (#4804)
Browse files Browse the repository at this point in the history
jsirois authored Aug 9, 2017
1 parent 14350e5 commit 10855a8
Showing 3 changed files with 44 additions and 18 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -51,6 +51,7 @@ GRTAGS
GSYMS
GTAGS

# Generated by build-support/bin/generate-bintray-manifest.sh for
# Generated by build-support/bin/prepare-binary-deploy.sh for
# use by Travis-CI bintray deploys.
/native-engine.bintray.json
/build-support/bin/native/s3-upload/
53 changes: 36 additions & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -60,7 +60,7 @@ matrix:
env:
- SHARD="OSX Bintray Builder"
script:
- ./build-support/bin/native/generate-bintray-manifest.sh
- ./build-support/bin/native/prepare-binary-deploy.sh

- os: linux
dist: trusty
@@ -90,7 +90,7 @@ matrix:
"${DOCKER_IMAGE}"
sh -c "
export PATH=/opt/python/cp27-cp27mu/bin:/opt/rh/devtoolset-2/root/usr/bin:${PATH} ;
cd $TRAVIS_BUILD_DIR && ./build-support/bin/native/generate-bintray-manifest.sh
cd $TRAVIS_BUILD_DIR && ./build-support/bin/native/prepare-binary-deploy.sh
"
- os: linux
@@ -419,21 +419,40 @@ matrix:

deploy:
# See: https://docs.travis-ci.com/user/deployment/bintray/
provider: bintray
# NB: This is generated in after_success in each shard above.
file: ./native-engine.bintray.json
user: ${BINTRAY_USER}
key: ${BINTRAY_KEY}
dry-run: false
on:
condition: -f ./native-engine.bintray.json
# NB: Deploys are always tagged as part of the deploy process encoded in
# `build-support/bin/release.sh`, so this ensures we release an appropriate native engine binary
# for all releases. Unfortunately, CI only runs after the release tag hits origin and so there
# will be a lag of roughly 30 minutes until a pypi release has its paired native engine version
# available on bintray for OSX and linux. This trade-off (vs releasing for all branch builds),
# helps us use bintray in a friendly way.
tags: true
- provider: bintray
# NB: This is generated in after_success in each shard above.
file: ./native-engine.bintray.json
user: ${BINTRAY_USER}
key: ${BINTRAY_KEY}
dry-run: false
on:
condition: -f ./native-engine.bintray.json
# NB: Deploys are always tagged as part of the deploy process encoded in
# `build-support/bin/release.sh`, so this ensures we release an appropriate native engine binary
# for all releases. Unfortunately, CI only runs after the release tag hits origin and so there
# will be a lag of roughly 30 minutes until a pypi release has its paired native engine version
# available on bintray for OSX and linux. This trade-off (vs releasing for all branch builds),
# helps us use bintray in a friendly way.
tags: true
repo: pantsbuild/pants
# See: https://docs.travis-ci.com/user/deployment/s3/
- provider: s3
access_key_id: AKIAIQHTQI5E42SQBSNA
secret_access_key:
secure: RQVzsNfZL8AgsXdjZ67j2tWs5Tjl/FKpmE1fyVgldMbua/xhW8dzdFrtOeWjTPX4/+sJZ4U7/tZectBtWejmrXUJiZQKJwJBnsyYxysENTWOV80BEYyoz2RPr8HSVbMZ1ZHtUafzO3OqV1x+Pvgpg8FUeUfsy3TGUk0JREO90Q0=
bucket: binaries.pantsbuild.org
local-dir: build-support/bin/native/s3-upload
acl: public_read
on:
condition: -f ./native-engine.bintray.json
# NB: Deploys are always tagged as part of the deploy process encoded in
# `build-support/bin/release.sh`, so this ensures we release an appropriate native engine binary
# for all releases. Unfortunately, CI only runs after the release tag hits origin and so there
# will be a lag of roughly 30 minutes until a pypi release has its paired native engine version
# available on bintray for OSX and linux. This trade-off (vs releasing for all branch builds),
# helps us use bintray in a friendly way.
tags: true
repo: pantsbuild/pants

# We accept the default travis-ci email author+committer notification
# for now which is enabled even with no `notifications` config.
Original file line number Diff line number Diff line change
@@ -105,3 +105,9 @@ cat << __EOF__ >> ${REPO_ROOT}/native-engine.bintray.json
]
}
__EOF__

# Prepare a chroot for s3 deploy of the artifacts created above.
S3_UPLOAD_ROOT=${REPO_ROOT}/build-support/bin/native/s3-upload
rm -rf ${S3_UPLOAD_ROOT}
mkdir -p ${S3_UPLOAD_ROOT}/bin
ln -s ${CACHE_ROOT}/bin/native-engine ${S3_UPLOAD_ROOT}/bin/native-engine

0 comments on commit 10855a8

Please sign in to comment.