From 4df78d13513de65c2638a477b5a96276afa30708 Mon Sep 17 00:00:00 2001 From: Gavin Date: Mon, 6 May 2024 17:17:23 -0700 Subject: [PATCH] Remove build cruft Obsolete with switch to GHA --- build/build_docker_image.sh | 7 ------- build/push2dockerhub.sh | 32 -------------------------------- 2 files changed, 39 deletions(-) delete mode 100755 build/build_docker_image.sh delete mode 100755 build/push2dockerhub.sh diff --git a/build/build_docker_image.sh b/build/build_docker_image.sh deleted file mode 100755 index cbe7dd2..0000000 --- a/build/build_docker_image.sh +++ /dev/null @@ -1,7 +0,0 @@ -export BRANCH=${TRAVIS_BRANCH:-`git symbolic-ref --short HEAD`} -export DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` -export COMMIT=${TRAVIS_COMMIT:-`git rev-parse --short HEAD`} -docker build --build-arg BUILD_DATE=$DATE \ - --build-arg VCS_REF=$COMMIT \ - --build-arg BRANCH=$BRANCH \ - -t kbase/blobstore:$COMMIT . \ No newline at end of file diff --git a/build/push2dockerhub.sh b/build/push2dockerhub.sh deleted file mode 100755 index f8fe1ab..0000000 --- a/build/push2dockerhub.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -# -# This script is intended to be run in the deploy stage of a travis build -# It checks to make sure that this is a not a PR, and that we have the secure -# environment variables available and then checks if this is either the master -# or develop branch, otherwise we don't push anything -# -# NOTE: IMAGE_NAME is expected to be passed in via the environment so that this -# script can be more general -# -# sychan@lbl.gov -# 8/31/2017 - -TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo $TRAVIS_BRANCH ; fi` -COMMIT=${TRAVIS_COMMIT:-`git rev-parse --short HEAD`} - -if ( [ "$TRAVIS_SECURE_ENV_VARS" == "true" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] ); then - # $TAG was set from TRAVIS_BRANCH, which is a little wonky on pull requests, - # but it should be okay since we should never get here on a PR - if ( [ "$TAG" == "latest" ] || [ "$TAG" == "develop" ] ) ; then - echo "Logging into Dockerhub as $DOCKER_USER" - docker login -u $DOCKER_USER -p $DOCKER_PASS && \ - docker tag $IMAGE_NAME:$COMMIT $IMAGE_NAME:$TAG && \ - echo "Pushing $IMAGE_NAME:$TAG" && \ - docker push $IMAGE_NAME:$TAG || \ - ( echo "Failed to login and push tagged image" && exit 1 ) - else - echo "Not pushing image for branch $TAG" - fi -else - echo "Not building image for pull requests or if secure variables unavailable" -fi \ No newline at end of file