diff --git a/buildkite/pipeline.yml b/buildkite/pipeline.yml index 500f8f7..53fe66c 100644 --- a/buildkite/pipeline.yml +++ b/buildkite/pipeline.yml @@ -1,5 +1,3 @@ steps: - label: Test pre-command hook script command: ./buildkite/run_check_command_whitelist_tests.sh - - label: Test heroku-deploy Docker build - command: ./buildkite/run_check_deploy_docker_build.sh diff --git a/buildkite/run_check_deploy_docker_build.sh b/buildkite/run_check_deploy_docker_build.sh deleted file mode 100644 index 19a85b3..0000000 --- a/buildkite/run_check_deploy_docker_build.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -# This script checks that the image from the heroku-deploy Dockerfile can be -# built successfully. This check is done in the buildkite-assets repo to prevent -# an unbuildable Dockerfile from being deployed to buildkite instances. - -echo "--- Building and testing with panorama_command.sh" -HEROKU_DEPLOY_PATH=deploy/heroku-deploy \ - HEROKU_DEPLOY_IMAGE_NAME=check-heroku-deploy-image \ - DEPLOYMENT_APP_NAME=panorama-addons \ - bash deploy/panorama_command.sh custom - -exit $? diff --git a/deploy/heroku-deploy/Dockerfile b/deploy/heroku-deploy/Dockerfile deleted file mode 100644 index d21cc71..0000000 --- a/deploy/heroku-deploy/Dockerfile +++ /dev/null @@ -1,31 +0,0 @@ -FROM ruby:3.1.3 - -# Install Docker client, which is used by Heroku CLI for container release -# see installation instructions: https://docs.docker.com/install/linux/docker-ce/binaries/ -ENV DOCKERVERSION=20.10.9 -RUN curl -fsSLO https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKERVERSION}.tgz \ - && mv docker-${DOCKERVERSION}.tgz docker.tgz \ - && tar xzvf docker.tgz \ - && mv docker/docker /usr/local/bin \ - && rm -r docker docker.tgz - -# Install Heroku CLI, which uses Docker client for container release -# see installation instructions: https://devcenter.heroku.com/articles/heroku-cli#standalone-installation -RUN curl https://cli-assets.heroku.com/install-standalone.sh | sh - -# Here, we take the UID for the user we will use in the docker image. -# We do this so that we can map it to the user that built the docker image, -# so file permissions will work inside the container. -# -# We pass it in as a buildarg so we can use the $UID environment variable -ARG buildkite_agent_uid -RUN useradd -u $buildkite_agent_uid -m panorama - -# Make the platform API gem available to ruby scripts run inside the container. -# Useful for scripting things like environment variable updates -RUN gem install platform-api --no-document - -WORKDIR /home/panorama - -ADD heroku_deploy.sh . -ENTRYPOINT ["./heroku_deploy.sh"] diff --git a/deploy/heroku-deploy/README.md b/deploy/heroku-deploy/README.md deleted file mode 100644 index ba61a73..0000000 --- a/deploy/heroku-deploy/README.md +++ /dev/null @@ -1,46 +0,0 @@ -__HELLO__ and welcome to the heroku deploy docker image! - -This will build a docker image suitable to use for deployment to heroku from -buildkite. - -You will need three environment variables to use this. Buildkite takes care of -this for us by pulling in a special env file we created, but here are the -variables in case you want to do some local development: - -* __DEPLOYMENT_APP_NAME__: The name of the heroku app to deploy to -* __HEROKU_DEPLOYMENT_LOGIN__: The heroku login for a user capable of deploying -to the app above -* __HEROKU_DEPLOYMENT_API_KEY__: The API key for the user above. - -To use this image, just build it and run your deploy commands. - -## Build It :hammer: - -```bash -docker build \ - --build-arg buildkite_agent_uid=$UID \ - -t heroku-deploy-img \ - deploy/heroku-deploy -``` - -## Run It :rocket: - -```bash -docker run \ - -e DEPLOYMENT_APP_NAME=${HEROKU_APP_NAME_HERE} \ - -e HEROKU_DEPLOYMENT_LOGIN=${LOGIN_AS_DESCRIBED_ABOVE} \ - -e HEROKU_DEPLOYMENT_API_KEY=${KEY_AS_DESCRIBED_ABOVE} \ - -e BUILDKITE_COMMIT - -e UID - -v `pwd`:/home/panorama/app \ - -v /var/run/docker.sock:/var/run/docker.sock \ - -it heroku-deploy-img -``` - -$UID and $BUILDKITE_COMMIT are populated by the system and buildkite, -respectively. - -Any command you put at the end of this will be executed in the root directory of -the git repo this is run from. - -Enjoy! diff --git a/deploy/heroku-deploy/heroku_deploy.sh b/deploy/heroku-deploy/heroku_deploy.sh deleted file mode 100755 index d75d0bc..0000000 --- a/deploy/heroku-deploy/heroku_deploy.sh +++ /dev/null @@ -1,29 +0,0 @@ -#! /bin/bash -set -e - -# we need a .netrc file for the toolbelt to use -cat >> ~/.netrc <