summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorJessica Wagantall <jwagantall@linuxfoundation.org>2023-07-17 12:48:40 -0700
committerJessica Wagantall <jwagantall@linuxfoundation.org>2023-07-17 19:59:43 +0000
commitcbea7e03eb235a7763d4a65c0a7602aeef27ab05 (patch)
tree77b7794ec35d37832219b9c77c92af81834caf5b /shell
parent4fca846d3e0b6162eabba0067135c2263c7f99d0 (diff)
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 <jwagantall@linuxfoundation.org> Change-Id: I7d1cb277964636ea11cfceccf511ad2dc992dca3
Diffstat (limited to 'shell')
-rw-r--r--shell/docker-build.sh41
-rw-r--r--shell/docker-push.sh7
2 files changed, 0 insertions, 48 deletions
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"