Skip to content

Commit

Permalink
Add docker login (Netflix#434)
Browse files Browse the repository at this point in the history
  • Loading branch information
rpalcolea authored May 6, 2021
1 parent 598808f commit e95c403
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@ jdk:
- openjdk8
services:
- docker
addons:
apt:
packages:
- pass
git:
depth: 250
install: "./installViaTravis.sh"
script: "./buildViaTravis.sh"
before_install: "./beforeInstall.sh"
env:
global:
- secure: D9jQQd2Mu4ssneMNh3yPWTRsXTntfhurFHoUKVHOpt9lK+80xmIVObTUSimEyQUZqYnhj2UKTNmuxSlNgASwEqMnWyron/eGkJP0z9A8cQysTm24b+eLI/mxb4Y/heut00VDYPD3D0gDdom1WZiUKxPM7r+10+CusTc5ZnLI4C9CzMwIt4uJpuEc/JjZNl56vX7j5M7E1Q0XyeqC3ZL2JPhRIfQE0OPShl9BI7UZcohYxIerNLuY3w2Bce5amrrEs+RgD4aTLnTaxjYuFJpP3bDlx3sF8WsZVFCRoVH0RQI3mJXCFetaYmE+TXUDdzY3nS8aKbFL1HVUZBbGB/iR2XsA9Bid7VJZCWzw15BeLnwyM5FedfmGZz4QQ6tcjwNHsXx6cKX5F7wjiVnElmRJ9nZuekZXXf2uueWwY43/h7w8j22pEJgR/oFmEYzWZ4WyNSrYlO4pylNio3HC17x+PeUQT4GVI7ZMz8qzQJIKwozLR2IZKkLzEPk+RNFopXsCFuWaqy7zpowl8QipRx8EMMdHbR6DAUYpqWGpJo2SH7DYa2dS3JM2Zi/de1r6JJg066/HBXXVnvUyOGbyVESoVMBd2quel40K4pB4t2TFpz2K7tjv12lLV5IzYxA0YONYdIf70VbKY2BII9TniLV2czKbvOBjGxX17M660tUauqw=
Expand Down
23 changes: 23 additions & 0 deletions beforeInstall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env bash
set -x
curl -fsSL "https://github.com/docker/docker-credential-helpers/releases/download/v0.6.0/docker-credential-pass-v0.6.0-amd64.tar.gz" | tar xv
chmod + $(pwd)/docker-credential-pass

gpg --batch --gen-key <<-EOF ; pass init $(gpg --no-auto-check-trustdb --list-secret-keys | grep ^sec | cut -d/ -f2 | cut -d" " -f1)
%echo Generating a standard key
Key-Type: DSA
Key-Length: 1024
Subkey-Type: ELG-E
Subkey-Length: 1024
Name-Real: NetflixOSS
Name-Email: [email protected]
Expire-Date: 0
# Do a commit here, so that we can later print "done" :-)
%commit
%echo done
EOF

pass init $key

echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
docker info
Empty file modified build.gradle
100644 → 100755
Empty file.
1 change: 0 additions & 1 deletion buildViaTravis.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/bin/bash
# This script will build the project.

if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
echo -e "Build Pull Request #$TRAVIS_PULL_REQUEST => Branch [$TRAVIS_BRANCH]"
./gradlew --no-daemon build functionalTest
Expand Down

0 comments on commit e95c403

Please sign in to comment.