X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fdocker-get-yaml-tag.sh;h=8b0e16ee424afe4b619d8cc94053671b46dee4bb;hb=refs%2Ftags%2Fv0.38.1;hp=936c272f3e17d5fdf0ffeb7e9a6e2045393ea6ed;hpb=a452768c9a2dd7619fed3882cfbab1057d98dc61;p=releng%2Fglobal-jjb.git diff --git a/shell/docker-get-yaml-tag.sh b/shell/docker-get-yaml-tag.sh index 936c272f..8b0e16ee 100644 --- a/shell/docker-get-yaml-tag.sh +++ b/shell/docker-get-yaml-tag.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -l # SPDX-License-Identifier: EPL-1.0 ############################################################################## # Copyright (c) 2019 The Linux Foundation and others. @@ -13,21 +13,17 @@ echo "---> docker-get-yaml-tag.sh" set -eu -o pipefail -# Install yq to read container-tag.yaml -python -m pip install --user --quiet --upgrade yq -export PATH="/home/jenkins/.local/bin:$PATH" - cd "$DOCKER_ROOT" container_tag_file=container-tag.yaml if [ -f "$container_tag_file" ] then - image_name=$(yq -r .tag "$container_tag_file") + image_build_tag=$(yq -r .tag "$container_tag_file") else echo "$container_tag_file file not found. Make sure this file exists." exit 1 fi - -# Write DOCKER_IMAGE information to a file so it can be injected into the +echo "---> Tag found: $image_build_tag" +# Write DOCKER_IMAGE_TAG information to a file so it can be injected into the # environment for following steps -echo "DOCKER_IMAGE=$image_name" >> "$WORKSPACE/env_docker_inject.txt" +echo "DOCKER_IMAGE_TAG=$image_build_tag" >> "$WORKSPACE/env_docker_inject.txt"