From 5fee2ed3715ae7667973209f46310b116f1a0b78 Mon Sep 17 00:00:00 2001 From: Mantra Date: Thu, 7 Nov 2024 14:45:48 +0000 Subject: [PATCH] clean up buildkite stuff --- buildkite/pipeline.yml | 13 ------------- docker/browser_tests | 32 -------------------------------- docker/build | 13 ------------- docker/common | 23 ----------------------- docker/push | 17 ----------------- docker/run_browser_tests | 12 ------------ scripts/run-version.sh | 2 +- 7 files changed, 1 insertion(+), 111 deletions(-) delete mode 100644 buildkite/pipeline.yml delete mode 100755 docker/browser_tests delete mode 100755 docker/build delete mode 100644 docker/common delete mode 100755 docker/push delete mode 100755 docker/run_browser_tests diff --git a/buildkite/pipeline.yml b/buildkite/pipeline.yml deleted file mode 100644 index 9826f85b8..000000000 --- a/buildkite/pipeline.yml +++ /dev/null @@ -1,13 +0,0 @@ -steps: - - label: ":whale::node: Build" - command: docker/build - - - wait - - - label: ":playwright::chrome: Browser tests" - command: docker/browser_tests - - - wait - - - label: ":shipit: Push images" - command: docker/push diff --git a/docker/browser_tests b/docker/browser_tests deleted file mode 100755 index 68944a6f2..000000000 --- a/docker/browser_tests +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env bash -set -eux - -function remove_containers() { - docker kill odin.api wodin wodin-redis wodin-playwright 2>/dev/null || /bin/true -} - -function cleanup() { - set +x - remove_containers -} -trap cleanup EXIT - -ROOT=$(dirname $(dirname $0)) - -ROOT=$PWD -. $ROOT/docker/common - -remove_containers - -## all deps -./scripts/run-dependencies.sh - -## main app -docker pull $TAG_SHA -docker run --rm -d --name wodin --network=host $TAG_SHA /wodin/config - -## run the tests -docker run --rm --name wodin-playwright --network=host \ - -w /wodin/app/static \ - --entrypoint /wodin/docker/run_browser_tests \ - $TAG_SHA diff --git a/docker/build b/docker/build deleted file mode 100755 index 18bbdb94e..000000000 --- a/docker/build +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash -set -ex -HERE=$(dirname $0) -. $HERE/common - -docker build --pull \ - --tag $TAG_SHA \ - -f docker/Dockerfile \ - . - -# We always push the SHA tagged versions, for debugging if the tests -# after this step fail -docker push $TAG_SHA diff --git a/docker/common b/docker/common deleted file mode 100644 index c6eb206f1..000000000 --- a/docker/common +++ /dev/null @@ -1,23 +0,0 @@ -# -*-sh-*- -PACKAGE_NAME=wodin -PACKAGE_ORG=mrcide - -# Buildkite doesn't check out a full history from the remote (just the -# single commit) so you end up with a detached head and git rev-parse -# doesn't work -if [ "$BUILDKITE" = "true" ]; then - GIT_SHA=${BUILDKITE_COMMIT:0:7} -else - GIT_SHA=$(git -C "$PACKAGE_ROOT" rev-parse --short=7 HEAD) -fi - - -if [ "$BUILDKITE" = "true" ]; then - GIT_BRANCH=$BUILDKITE_BRANCH -else - GIT_BRANCH=$(git -C "$PACKAGE_ROOT" symbolic-ref --short HEAD) -fi - -TAG_SHA="${PACKAGE_ORG}/${PACKAGE_NAME}:${GIT_SHA}" -TAG_BRANCH="${PACKAGE_ORG}/${PACKAGE_NAME}:${GIT_BRANCH}" -TAG_LATEST="${PACKAGE_ORG}/${PACKAGE_NAME}:latest" diff --git a/docker/push b/docker/push deleted file mode 100755 index 11a17be1d..000000000 --- a/docker/push +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash -set -e -HERE=$(dirname $0) -. $HERE/common - -# In case we switch agents between steps -[ ! -z $(docker images -q $TAG_SHA) ] || docker pull $TAG_SHA - -docker tag $TAG_SHA $TAG_BRANCH -docker push $TAG_BRANCH - -if [ $GIT_BRANCH == "master" ]; then - docker tag $TAG_SHA $TAG_LATEST - docker tag $TAG_SHA $TAG_VERSION - docker push $TAG_LATEST - docker push $TAG_VERSION -fi diff --git a/docker/run_browser_tests b/docker/run_browser_tests deleted file mode 100755 index 33a302607..000000000 --- a/docker/run_browser_tests +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash -set -eux - -if [ ! -d tests/e2e ]; then - echo "Expected this script to be run from app/static" - exit 1 -fi - -npm install @playwright/test -npx playwright install -npx playwright install-deps -npm run test:e2e diff --git a/scripts/run-version.sh b/scripts/run-version.sh index 7290cd534..eb9367f09 100755 --- a/scripts/run-version.sh +++ b/scripts/run-version.sh @@ -41,7 +41,7 @@ while [[ $# -gt 0 ]]; do done API_IMAGE=mrcide/odin.api:$API_BRANCH -APP_IMAGE=mrcide/wodin:$APP_BRANCH +APP_IMAGE=ghcr.io/mrc-ide/wodin:$APP_BRANCH REDIS_IMAGE=redis:6 API_NAME=odin.api