Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add quay support #2783

Merged
merged 9 commits into from
Feb 10, 2021
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 3 additions & 14 deletions .github/workflows/ci-all-in-one-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,6 @@ jobs:
with:
node-version: '10'

- uses: docker/login-action@v1
id: dockerhub-login
with:
username: jaegertracingbot
password: ${{ secrets.DOCKERHUB_TOKEN }}
env:
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
if: env.DOCKERHUB_TOKEN != null

- name: Export DOCKERHUB_LOGIN variable
run: |
echo "DOCKERHUB_LOGIN=true" >> $GITHUB_ENV
if: steps.dockerhub-login.outcome == 'success'

- name: Export BRANCH variable
uses: ./.github/actions/setup-branch

Expand All @@ -48,3 +34,6 @@ jobs:

- name: Build, test, and publish all-in-one image
run: bash scripts/travis/build-all-in-one-image.sh
env:
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }}
17 changes: 3 additions & 14 deletions .github/workflows/ci-crossdock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,6 @@ jobs:
with:
go-version: ^1.15

- uses: docker/login-action@v1
id: dockerhub-login
with:
username: jaegertracingbot
password: ${{ secrets.DOCKERHUB_TOKEN }}
env:
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
if: env.DOCKERHUB_TOKEN != null

- name: Export DOCKERHUB_LOGIN variable
run: |
echo "DOCKERHUB_LOGIN=true" >> $GITHUB_ENV
if: steps.dockerhub-login.outcome == 'success'

- name: Export BRANCH variable
uses: ./.github/actions/setup-branch

Expand All @@ -52,6 +38,9 @@ jobs:

- name: Build, test, and publish ${{ matrix.steps.name }} image
run: ${{ matrix.steps.cmd }}
env:
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }}

- name: Output crossdock logs
run: make crossdock-logs
Expand Down
17 changes: 3 additions & 14 deletions .github/workflows/ci-docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,6 @@ jobs:
with:
node-version: '10'

- uses: docker/login-action@v1
id: dockerhub-login
with:
username: jaegertracingbot
password: ${{ secrets.DOCKERHUB_TOKEN }}
env:
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
if: env.DOCKERHUB_TOKEN != null

- name: Export DOCKERHUB_LOGIN variable
run: |
echo "DOCKERHUB_LOGIN=true" >> $GITHUB_ENV
if: steps.dockerhub-login.outcome == 'success'

- name: Export BRANCH variable
uses: ./.github/actions/setup-branch

Expand All @@ -51,3 +37,6 @@ jobs:

- name: Upload docker images
run: bash scripts/travis/upload-all-docker-images.sh
env:
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }}
17 changes: 3 additions & 14 deletions .github/workflows/ci-hotrod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,6 @@ jobs:
with:
go-version: ^1.15

- uses: docker/login-action@v1
id: dockerhub-login
with:
username: jaegertracingbot
password: ${{ secrets.DOCKERHUB_TOKEN }}
env:
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
if: env.DOCKERHUB_TOKEN != null

- name: Export DOCKERHUB_LOGIN variable
run: |
echo "DOCKERHUB_LOGIN=true" >> $GITHUB_ENV
if: steps.dockerhub-login.outcome == 'success'

- name: Export BRANCH variable
uses: ./.github/actions/setup-branch

Expand All @@ -44,3 +30,6 @@ jobs:

- name: Build, test, and publish hotrod image
run: bash scripts/travis/hotrod-integration-test.sh
env:
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }}
20 changes: 6 additions & 14 deletions .github/workflows/ci-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,6 @@ jobs:
with:
node-version: '10'

- uses: docker/login-action@v1
id: dockerhub-login
with:
username: jaegertracingbot
password: ${{ secrets.DOCKERHUB_TOKEN }}
env:
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
if: env.DOCKERHUB_TOKEN != null

- name: Export DOCKERHUB_LOGIN variable
run: |
echo "DOCKERHUB_LOGIN=true" >> $GITHUB_ENV
if: steps.dockerhub-login.outcome == 'success'

- name: Export BRANCH variable
uses: ./.github/actions/setup-branch

Expand Down Expand Up @@ -70,6 +56,12 @@ jobs:
- name: Upload docker images
run: bash scripts/travis/upload-all-docker-images.sh
if: steps.build-images.outcome == 'success'
env:
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }}

- name: Build, test, and publish all-in-one image
run: bash scripts/travis/build-all-in-one-image.sh
env:
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }}
13 changes: 6 additions & 7 deletions scripts/travis/build-all-in-one-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ BRANCH=${BRANCH:?'missing BRANCH env var'}
# be overrided by passing architecture value to the script:
# `GOARCH=<target arch> ./scripts/travis/build-all-in-one-image.sh`.
GOARCH=${GOARCH:-$(go env GOARCH)}
DOCKERHUB_LOGIN=${DOCKERHUB_LOGIN:-false}

expected_version="v10"
version=$(node --version)
Expand Down Expand Up @@ -36,13 +35,13 @@ run_integration_test() {
}

upload_to_docker() {
# Only push the docker container to Docker Hub for master/release branch and when dockerhub login is done
if [[ ("$BRANCH" == "master" || $BRANCH =~ ^v[0-9]+\.[0-9]+\.[0-9]+$) && "$DOCKERHUB_LOGIN" == "true" ]]; then
echo "upload $1 to Docker Hub"
export REPO=$1
bash ./scripts/travis/upload-to-docker.sh
# Only push the docker image to dockerhub/quay.io for master/release branch
if [[ "$BRANCH" == "master" || $BRANCH =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "upload $1 to dockerhub/quay.io"
REPO=$1
bash scripts/travis/upload-to-registry.sh $REPO
else
echo 'skip docker upload for PR'
echo 'skip docker images upload for PR'
fi
}

Expand Down
13 changes: 6 additions & 7 deletions scripts/travis/build-crossdock.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,19 @@
set -euxf -o pipefail

BRANCH=${BRANCH:?'missing BRANCH env var'}
DOCKERHUB_LOGIN=${DOCKERHUB_LOGIN:-false}
COMMIT=${GITHUB_SHA::8}

make build-and-run-crossdock

# Only push the docker container to Docker Hub for master branch and when dockerhub login is done
if [[ "$BRANCH" == "master" && "$DOCKERHUB_LOGIN" == "true" ]]; then
echo 'upload to Docker Hub'
# Only push images to dockerhub/quay.io for master branch
if [[ "$BRANCH" == "master" ]]; then
echo 'upload images to dockerhub/quay.io'
else
echo 'skip docker upload for PR'
echo 'skip docker images upload for PR'
exit 0
fi

# docker image has been build when running the crossdock
export REPO=jaegertracing/test-driver
REPO=jaegertracing/test-driver
docker tag $REPO:latest $REPO:$COMMIT
bash ./scripts/travis/upload-to-docker.sh
bash scripts/travis/upload-to-registry.sh $REPO
13 changes: 6 additions & 7 deletions scripts/travis/hotrod-integration-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -euxf -o pipefail

make docker-hotrod
export REPO=jaegertracing/example-hotrod
REPO=jaegertracing/example-hotrod
export CID=$(docker run -d -p 8080:8080 $REPO:latest)
i=0
while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:8080)" != "200" && ${i} < 30 ]]; do
Expand All @@ -18,14 +18,13 @@ fi
docker rm -f $CID

BRANCH=${BRANCH:?'missing BRANCH env var'}
DOCKERHUB_LOGIN=${DOCKERHUB_LOGIN:-false}

# Only push images to Docker Hub for master branch or for release tags vM.N.P and when dockerhub login is done
if [[ ("$BRANCH" == "master" || $BRANCH =~ ^v[0-9]+\.[0-9]+\.[0-9]+$) && "$DOCKERHUB_LOGIN" == "true" ]]; then
echo "upload to Docker Hub, BRANCH=$BRANCH"
# Only push images to dockerhub/quay.io for master branch or for release tags vM.N.P
if [[ "$BRANCH" == "master" || $BRANCH =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "upload to dockerhub/quay.io, BRANCH=$BRANCH"
else
echo "skip Docker upload, only allowed for tagged releases or master (latest tag)"
echo "skip docker images upload, only allowed for tagged releases or master (latest tag)"
exit 0
fi

bash ./scripts/travis/upload-to-docker.sh
bash scripts/travis/upload-to-registry.sh $REPO
13 changes: 6 additions & 7 deletions scripts/travis/upload-all-docker-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@
set -euxf -o pipefail

BRANCH=${BRANCH:?'missing BRANCH env var'}
DOCKERHUB_LOGIN=${DOCKERHUB_LOGIN:-false}

# Only push images to Docker Hub for master branch or for release tags vM.N.P and when dockerhub login is done
if [[ ("$BRANCH" == "master" || $BRANCH =~ ^v[0-9]+\.[0-9]+\.[0-9]+$) && "$DOCKERHUB_LOGIN" == "true" ]]; then
echo "upload to Docker Hub, BRANCH=$BRANCH"
# Only push images to dockerhub/quay.io for master branch or for release tags vM.N.P
if [[ "$BRANCH" == "master" || $BRANCH =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
yurishkuro marked this conversation as resolved.
Show resolved Hide resolved
echo "upload to dockerhub/quay.io, BRANCH=$BRANCH"
else
echo 'skip Docker upload, only allowed for tagged releases or master (latest tag)'
echo 'skip docker images upload, only allowed for tagged releases or master (latest tag)'
exit 0
fi

Expand All @@ -38,6 +37,6 @@ jaeger_components=(

for component in "${jaeger_components[@]}"
do
export REPO="jaegertracing/jaeger-${component}"
bash ./scripts/travis/upload-to-docker.sh
REPO="jaegertracing/jaeger-${component}"
bash scripts/travis/upload-to-registry.sh $REPO
done
44 changes: 0 additions & 44 deletions scripts/travis/upload-to-docker.sh

This file was deleted.

Loading