From c1cff3024530cc101a3e2b4bab3d1b11df92f54d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=BChnel?= Date: Sat, 5 Oct 2019 08:43:17 +0200 Subject: [PATCH] moved scripts one folder up --- .../build_deploy.sh | 5 +-- .../build_run.sh | 4 ++- containers/jenkins-master/build_deploy.sh | 31 ------------------- 3 files changed, 6 insertions(+), 34 deletions(-) rename containers/{agent-debian-testing-clang8 => }/build_deploy.sh (91%) rename containers/{agent-debian-testing-clang8 => }/build_run.sh (85%) delete mode 100755 containers/jenkins-master/build_deploy.sh diff --git a/containers/agent-debian-testing-clang8/build_deploy.sh b/containers/build_deploy.sh similarity index 91% rename from containers/agent-debian-testing-clang8/build_deploy.sh rename to containers/build_deploy.sh index 97ab65a..16a619f 100755 --- a/containers/agent-debian-testing-clang8/build_deploy.sh +++ b/containers/build_deploy.sh @@ -16,14 +16,15 @@ set -eux DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -ROOT_DIR="$(dirname $(dirname ${DIR}))" +ROOT_DIR="$(dirname ${DIR})" # get config options source "${ROOT_DIR}/k8s_config" -IMAGE_NAME="agent-debian-testing-clang8" +IMAGE_NAME="$1" QUALIFIED_NAME="${GCR_HOSTNAME}/${GCP_PROJECT}/${IMAGE_NAME}" +cd "${DIR}/${IMAGE_NAME}" docker build -t ${IMAGE_NAME} . docker tag ${IMAGE_NAME} ${QUALIFIED_NAME} docker push ${QUALIFIED_NAME} \ No newline at end of file diff --git a/containers/agent-debian-testing-clang8/build_run.sh b/containers/build_run.sh similarity index 85% rename from containers/agent-debian-testing-clang8/build_run.sh rename to containers/build_run.sh index efd9a0a..335b1a3 100755 --- a/containers/agent-debian-testing-clang8/build_run.sh +++ b/containers/build_run.sh @@ -14,8 +14,10 @@ # limitations under the License. set -eux +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -IMAGE_NAME="agent-debian-testing-clang8" +IMAGE_NAME="$1" +cd "${DIR}/${IMAGE_NAME}" docker build -t ${IMAGE_NAME} . docker run -i -t ${IMAGE_NAME} \ No newline at end of file diff --git a/containers/jenkins-master/build_deploy.sh b/containers/jenkins-master/build_deploy.sh deleted file mode 100755 index c1fbe75..0000000 --- a/containers/jenkins-master/build_deploy.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash -# Copyright 2019 Google LLC -# -# Licensed under the the Apache License v2.0 with LLVM Exceptions (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://llvm.org/LICENSE.txt -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -eux - -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -ROOT_DIR="$(dirname $(dirname ${DIR}))" - -# get config options -source "${ROOT_DIR}/k8s_config" - -IMAGE_NAME="jenkins-master" -QUALIFIED_NAME="${GCR_HOSTNAME}/${GCP_PROJECT}/${IMAGE_NAME}" - -docker build -t ${IMAGE_NAME} . -docker tag ${IMAGE_NAME} ${QUALIFIED_NAME} -docker push ${QUALIFIED_NAME} - -echo "Deployed as ${QUALIFIED_NAME}." \ No newline at end of file