-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate our docker workflow to AZP. (#836)
Temporarily forking the `docker_push.sh` and `benchmark_push.sh` scripts to AZP specific versions as a simplification. The CircleCI versions will be cleared when we turn down the CircleCI pipeline. Adding new step `do_docker_azp` to `ci/do_ci.sh` to execute the forked scripts. Modified `ci/run_envoy_docker.sh` to forward variables required by the docker scripts. Since we regularly copy this script from Envoy, the custom lines are marked as `# unique` and the maintenance steps in `MAINTAINERS.md` are updated to indicate the presence of these unique lines. Works on #820. Signed-off-by: Jakub Sobon <[email protected]>
- Loading branch information
Showing
7 changed files
with
82 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
|
||
DOCKER_IMAGE_PREFIX="${DOCKER_IMAGE_PREFIX:-envoyproxy/nighthawk-benchmark}" | ||
|
||
source ./ci/docker/docker_azp_push.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
|
||
# Do not ever set -x here, it might leak credentials. | ||
set -e | ||
set +x | ||
|
||
# This is how AZP identifies the branch, see the Build.SourceBranch variable in: | ||
# https://docs.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml#build-variables-devops-services | ||
MAIN_BRANCH="refs/heads/main" | ||
|
||
DOCKER_IMAGE_PREFIX="${DOCKER_IMAGE_PREFIX:-envoyproxy/nighthawk}" | ||
|
||
echo "Running docker_azp_push.sh for DOCKER_IMAGE_PREFIX=${DOCKER_IMAGE_PREFIX}, AZP_BRANCH=${AZP_BRANCH} and AZP_SHA1=${AZP_SHA1}." | ||
|
||
# Only push images for main builds. | ||
if [[ "${AZP_BRANCH}" != "${MAIN_BRANCH}" ]]; then | ||
echo 'Ignoring non-main branch or tag for docker push.' | ||
exit 0 | ||
fi | ||
|
||
docker login -u "$DOCKERHUB_USERNAME" -p "$DOCKERHUB_PASSWORD" | ||
|
||
docker push "${DOCKER_IMAGE_PREFIX}-dev:latest" | ||
docker tag "${DOCKER_IMAGE_PREFIX}-dev:latest" \ | ||
"${DOCKER_IMAGE_PREFIX}-dev:${AZP_SHA1}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters