From 48a16b2f416af135a60e92e1292bb126ba38523c Mon Sep 17 00:00:00 2001 From: Trevor Bramwell Date: Fri, 10 Nov 2017 15:25:33 -0800 Subject: Initial Commit CI Files These files come from the releng repository and are used in the automated deploy of testapi. Moving them into this repository removes the need to clone multiple repositories when deploying the testapi site and verifying the repository. Change-Id: Ibd54c47bd76e3f2d801cfb4eaaeb1623bd1ae7b9 Signed-off-by: Trevor Bramwell --- ci/docker-update.sh | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 ci/docker-update.sh (limited to 'ci/docker-update.sh') diff --git a/ci/docker-update.sh b/ci/docker-update.sh new file mode 100644 index 0000000..6c6a554 --- /dev/null +++ b/ci/docker-update.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one * +# or more contributor license agreements. See the NOTICE file * +# distributed with this work for additional information * +# regarding copyright ownership. The ASF licenses this file * +# to you under the Apache License, Version 2.0 (the * +# "License"); you may not use this file except in compliance * +# with the License. You may obtain a copy of the License at * +# * +# http://www.apache.org/licenses/LICENSE-2.0 * +# * +# 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 -o errexit +set -o nounset + +cd $WORKSPACE/$MODULE_NAME/docker/ + +# Remove previous containers +docker ps -a | grep "opnfv/$MODULE_NAME" | awk '{ print $1 }' | xargs -r docker rm -f + +# Remove previous images +docker images | grep "opnfv/$MODULE_NAME" | awk '{ print $3 }' | xargs -r docker rmi -f + +# Start build +docker build --no-cache -t opnfv/$MODULE_NAME:$DOCKER_TAG . + +# Push Image +docker push opnfv/$MODULE_NAME:$DOCKER_TAG -- cgit 1.2.3-korg