From 59cdc142ed296aa7f04d42e083e5c2b441fa00ad Mon Sep 17 00:00:00 2001 From: Akis Kesoglou Date: Wed, 26 Sep 2018 17:45:42 +0300 Subject: [PATCH] Prepare for open sourcing This commit: - stops pushing to legacy Docker Hub repo - removes `automation` folder and build script - removes CircleCI config Change-type: major Signed-off-by: Akis Kesoglou --- .circleci/config.yml | 25 ------------------------- .dockerignore | 1 - automation/build.sh | 31 ------------------------------- 3 files changed, 57 deletions(-) delete mode 100644 .circleci/config.yml delete mode 100755 automation/build.sh diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index f0b57a0..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,25 +0,0 @@ ---- -version: 2 -jobs: - build: - docker: - - image: library/docker:17 - working_directory: /tmp/build - environment: - DOCKER_USERNAME: travisciresin - DOCKER_IMAGE: resin/resin-db - steps: - - checkout - - setup_remote_docker: - version: 17.07.0-ce - reusable: true - exclusive: false - - run: - name: Setup - command: | - docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" - apk add --no-cache git - - run: - name: Build and push - command: | - IMAGE_NAME=$DOCKER_IMAGE BRANCH_NAME=$CIRCLE_BRANCH ./automation/build.sh diff --git a/.dockerignore b/.dockerignore index 53f3aaf..6b8710a 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,2 +1 @@ .git -automation diff --git a/automation/build.sh b/automation/build.sh deleted file mode 100755 index 97f0ce5..0000000 --- a/automation/build.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh -set -e - -# Input is: -# - IMAGE_NAME: the repo to push the image to, eg. resin/repository-name -# - BRANCH_NAME: eg. fix-some-bug - -VERSION=$(git describe --tags) -REVISION=$(git rev-parse --short HEAD) -BRANCH=$(echo $BRANCH_NAME | sed 's/[^a-z0-9A-Z_.-]/-/g') - -# Try pulling the old build first for caching purposes. -docker pull ${IMAGE_NAME}:${BRANCH} || docker pull ${IMAGE_NAME}:master || true - -# Build and tag -docker build --pull --tag ${IMAGE_NAME}:${REVISION} . -docker tag ${IMAGE_NAME}:${REVISION} ${IMAGE_NAME}:${BRANCH} -docker tag ${IMAGE_NAME}:${REVISION} ${IMAGE_NAME}:${VERSION} - -# Push the images -docker push ${IMAGE_NAME}:${REVISION} -docker push ${IMAGE_NAME}:${BRANCH} -docker push ${IMAGE_NAME}:${VERSION} - -# Push the images to open-balena-db repo -docker tag ${IMAGE_NAME}:${REVISION} resin/open-balena-db:${REVISION} -docker tag ${IMAGE_NAME}:${REVISION} resin/open-balena-db:${BRANCH} -docker tag ${IMAGE_NAME}:${REVISION} resin/open-balena-db:${VERSION} -docker push resin/open-balena-db:${REVISION} -docker push resin/open-balena-db:${BRANCH} -docker push resin/open-balena-db:${VERSION}