From e33d176dc9f380f6bb2b498f3ca9041e2396944a Mon Sep 17 00:00:00 2001 From: Ben Fradet Date: Fri, 2 Nov 2018 16:52:31 +0000 Subject: [PATCH] [WIP] Add Google Cloud Storage credentials to .travis.yml (#4) --- .travis.yml | 17 +++++++++-------- .travis/deploy_template.sh | 10 ++++------ service-account.json.enc | Bin 0 -> 2352 bytes 3 files changed, 13 insertions(+), 14 deletions(-) create mode 100644 service-account.json.enc diff --git a/.travis.yml b/.travis.yml index 883a606..9b8c801 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,18 +1,20 @@ language: scala services: -- docker + - docker scala: -- 2.11.12 + - 2.11.12 jdk: -- oraclejdk8 + - oraclejdk8 +before_install: + - openssl aes-256-cbc -K $encrypted_a1a0961ea86f_key -iv $encrypted_a1a0961ea86f_iv -in service-account.json.enc -out ${HOME}/service-account.json -d script: -- sbt test + - sbt test before_deploy: -- pip install --user release-manager==0.3.0 + - pip install --user release-manager==0.3.0 deploy: - provider: script skip_cleanup: true - script: ./.travis/deploy_template.sh $TRAVIS_TAG + script: "./.travis/deploy_template.sh $TRAVIS_TAG" on: tags: true - provider: script @@ -22,7 +24,7 @@ deploy: tags: true - provider: script skip_cleanup: true - script: ./.travis/deploy_docker.sh $TRAVIS_TAG + script: "./.travis/deploy_docker.sh $TRAVIS_TAG" on: tags: true env: @@ -31,4 +33,3 @@ global: - BINTRAY_SNOWPLOW_GENERIC_API_KEY - BINTRAY_SNOWPLOW_DOCKER_USER - BINTRAY_SNOWPLOW_DOCKER_API_KEY - - GCP_CREDENTIALS diff --git a/.travis/deploy_template.sh b/.travis/deploy_template.sh index 23a1360..9d86493 100755 --- a/.travis/deploy_template.sh +++ b/.travis/deploy_template.sh @@ -2,19 +2,17 @@ tag=$1 -GOOGLE_APPLICATION_CREDENTIALS="${HOME}/credentials.json" -echo ${GCP_CREDENTIALS} > ${GOOGLE_APPLICATION_CREDENTIALS} -export GOOGLE_APPLICATION_CREDENTIALS +export GOOGLE_APPLICATION_CREDENTIALS="${HOME}/service-account.json" cd ${TRAVIS_BUILD_DIR} project_version=$(sbt -no-colors version | perl -ne 'print "$1\n" if /info.*(\d+\.\d+\.\d+[^\r\n]*)/' | tail -n 1 | tr -d '\n') if [[ "${tag}" = *"${project_version}" ]]; then sbt "runMain com.snowplowanalytics.storage.googlecloudstorage.loader.CloudStorageLoader --project=engineering-sandbox \ - --templateLocation=gs://snowplow-hosted-assets/4-storage/snowplow-google-cloud-storage-loader/${tag}/SnowplowGoogleCloudStorageLoaderTemplate-${tag} \ - --stagingLocation=gs://snowplow-hosted-assets/4-storage/snowplow-google-cloud-storage-loader/${tag}/staging \ + --templateLocation=gs://snowplow-hosted-assets-tmp/4-storage/snowplow-google-cloud-storage-loader/${tag}/SnowplowGoogleCloudStorageLoaderTemplate-${tag} \ + --stagingLocation=gs://snowplow-hosted-assets-tmp/4-storage/snowplow-google-cloud-storage-loader/${tag}/staging \ --runner=DataflowRunner \ - --tempLocation=gs://snowplow-hosted-assets/tmp" + --tempLocation=gs://snowplow-hosted-assets-tmp/tmp" else echo "Tag version '${tag}' doesn't match version in scala project ('${project_version}'). aborting!" exit 1 diff --git a/service-account.json.enc b/service-account.json.enc new file mode 100644 index 0000000000000000000000000000000000000000..146e974b48ad53b45fe98b53fa81faa1a61965f9 GIT binary patch literal 2352 zcmV-03D5QpdL2dT#0>KZI-(o97Ch<}z8-yz1dC@{=ju){%e9r%%WK%!7nb2O%sE)w zryquKGXpQr-iPIHM1fbOf8w3xp5y7FRJnyvIZcGnn*axoLN}C8|T<%uRBMNRv*2?zvlTN5n z4%_|)D8hg7-50T8KI0GF$a!UES=cz}--`(5cYP=Wm5^3LY=z9OOpU$!wNUFi|Mb9W z=c$^3fix{V+IYQiXq^TsM30L+}1JSGoc9|$Bl$zwU`du zpyR|ov~(2zss@l;(OfsTYT@@pw(64JKnOj0b8myuJAt%SfoRorJeoacHKs$$qc*Ih~n z=oQ&AlQmpYomx0Lu8rmKN~4=&yPc(KblbWoP+_k1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