From cbea7e03eb235a7763d4a65c0a7602aeef27ab05 Mon Sep 17 00:00:00 2001 From: Jessica Wagantall Date: Mon, 17 Jul 2023 12:48:40 -0700 Subject: Fix: Remove local deprecated docker template The local docker build and merge jobs are deprecated and projects should use global-jjb templates instead. Having the old template was creating confusion in jjb 5.0.2 where scripts were getting mixed. Is best to remove the old deprecated template. aai-common is migrated too to use the new template. Issue-ID: CIMAN-33 Signed-off-by: Jessica Wagantall Change-Id: I7d1cb277964636ea11cfceccf511ad2dc992dca3 --- shell/docker-build.sh | 41 ----------------------------------------- shell/docker-push.sh | 7 ------- 2 files changed, 48 deletions(-) delete mode 100644 shell/docker-build.sh delete mode 100644 shell/docker-push.sh (limited to 'shell') diff --git a/shell/docker-build.sh b/shell/docker-build.sh deleted file mode 100644 index 1cb71d3ff..000000000 --- a/shell/docker-build.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash -# Ensure we fail the job if any steps fail -# Do not set -u as DOCKER_ARGS may be unbound -set -e -o pipefail - -FULL_DATE=`date +'%Y%m%dT%H%M%S'` -IMAGE_VERSION=`xmlstarlet sel -N "x=http://maven.apache.org/POM/4.0.0" -t -v "/x:project/x:version" pom.xml | cut -c1-5` - -case "$BUILD_MODE" in - "STAGING") - DOCKER_TAG="$IMAGE_VERSION"-STAGING-"$FULL_DATE"Z - DOCKER_LATEST_TAG="$IMAGE_VERSION"-STAGING-latest - echo "Using tags $DOCKER_TAG and $DOCKER_LATEST_TAG" - ;; - "SNAPSHOT") - DOCKER_TAG="$IMAGE_VERSION"-SNAPSHOT-"$FULL_DATE"Z - DOCKER_LATEST_TAG="$IMAGE_VERSION"-SNAPSHOT-latest - echo "Using tags $DOCKER_TAG and $DOCKER_LATEST_TAG" - ;; -esac - -# Switch to the directory where the Dockerfile is -cd "$DOCKER_ROOT" - -# DOCKERREGISTRY is purposely not using an '_' so as to not conflict with the -# Jenkins global env var of the DOCKER_REGISTRY which the docker-login step uses -IMAGE_NAME="$DOCKERREGISTRY/$DOCKER_NAME:$DOCKER_TAG" -IMAGE_NAME_LATEST="$DOCKERREGISTRY/$DOCKER_NAME:$DOCKER_LATEST_TAG" - -# Build the docker image - -# Allow word splitting -# shellcheck disable=SC2086 -docker build $DOCKER_ARGS . -t $IMAGE_NAME -t $IMAGE_NAME_LATEST | tee "$WORKSPACE/docker_build_log.txt" - -# Write DOCKER_IMAGE information to a file so it can be injected into the -# environment for following steps -echo "DOCKER_IMAGE=$IMAGE_NAME" >> "$WORKSPACE/env_inject.txt" -echo "DOCKER_IMAGE_LATEST=$IMAGE_NAME_LATEST" >> "$WORKSPACE/env_inject.txt" - - diff --git a/shell/docker-push.sh b/shell/docker-push.sh deleted file mode 100644 index 937a01ab3..000000000 --- a/shell/docker-push.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -# Ensure we fail the job if any steps fail -set -e -o pipefail - -# Push our image to wherever it's defined to go by the name -docker push "$DOCKER_IMAGE" -docker push "$DOCKER_IMAGE_LATEST" -- cgit 1.2.3-korg