From f5cf3cd183afc1083b48b085cb4eaa51ecb865c6 Mon Sep 17 00:00:00 2001 From: Anthony Bilinski Date: Sun, 19 Dec 2021 07:30:13 -0800 Subject: [PATCH] chore(CI): Remove CIRP, replaced by direct GH action uploads Previously was used to upload release artifacts from travis CI, which is supported in GH actions through actions/upload-artifact. --- .travis/cirp/check_cache.sh | 10 ----- .travis/cirp/check_precondition.sh | 13 ------- .travis/cirp/cleanup1.sh | 10 ----- .travis/cirp/cleanup2.sh | 10 ----- .travis/cirp/cleanup3.sh | 11 ------ .travis/cirp/cleanup4.sh | 10 ----- .travis/cirp/cleanup5.sh | 17 -------- .travis/cirp/collect.sh | 23 ----------- .travis/cirp/install.sh | 62 ------------------------------ .travis/cirp/publish.sh | 33 ---------------- .travis/cirp/store.sh | 23 ----------- .travis/cirp/update_cache.sh | 10 ----- 12 files changed, 232 deletions(-) delete mode 100644 .travis/cirp/check_cache.sh delete mode 100644 .travis/cirp/check_precondition.sh delete mode 100755 .travis/cirp/cleanup1.sh delete mode 100755 .travis/cirp/cleanup2.sh delete mode 100755 .travis/cirp/cleanup3.sh delete mode 100755 .travis/cirp/cleanup4.sh delete mode 100755 .travis/cirp/cleanup5.sh delete mode 100755 .travis/cirp/collect.sh delete mode 100644 .travis/cirp/install.sh delete mode 100755 .travis/cirp/publish.sh delete mode 100755 .travis/cirp/store.sh delete mode 100644 .travis/cirp/update_cache.sh diff --git a/.travis/cirp/check_cache.sh b/.travis/cirp/check_cache.sh deleted file mode 100644 index f96f935d4..000000000 --- a/.travis/cirp/check_cache.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -if [ -f "/opt/cirp/previous_runs_commit" ] && [ "$(cat /opt/cirp/previous_runs_commit)" == "$(git rev-parse HEAD)" ] -then - # No new commits in the repo - touch /opt/cirp/previous_runs_commit - git log -1 - echo "No new commits in the repo" - exit 0 -fi diff --git a/.travis/cirp/check_precondition.sh b/.travis/cirp/check_precondition.sh deleted file mode 100644 index 072e50040..000000000 --- a/.travis/cirp/check_precondition.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash - -if [ ! -z "$TRAVIS_EVENT_TYPE" ] && [ "$TRAVIS_EVENT_TYPE" != "cron" ] -then - echo "Skipping publishing in a non-cron build" - exit 0 -fi - -if [ ! -z "$TRAVIS_PULL_REQUEST" ] && [ "$TRAVIS_PULL_REQUEST" != "false" ] -then - echo "Skipping publishing in a Pull Request" - exit 0 -fi diff --git a/.travis/cirp/cleanup1.sh b/.travis/cirp/cleanup1.sh deleted file mode 100755 index 89135893c..000000000 --- a/.travis/cirp/cleanup1.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -. .travis/cirp/check_precondition.sh -. .travis/cirp/install.sh - -ci-release-publisher cleanup_publish -ci-release-publisher cleanup_store --scope current-job previous-finished-builds \ - --release complete incomplete diff --git a/.travis/cirp/cleanup2.sh b/.travis/cirp/cleanup2.sh deleted file mode 100755 index 144bbc93f..000000000 --- a/.travis/cirp/cleanup2.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -. .travis/cirp/check_precondition.sh -. .travis/cirp/install.sh - -ci-release-publisher cleanup_store --scope current-build \ - --release complete \ - --on-nonallowed-failure diff --git a/.travis/cirp/cleanup3.sh b/.travis/cirp/cleanup3.sh deleted file mode 100755 index a47ff7bdd..000000000 --- a/.travis/cirp/cleanup3.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -. .travis/cirp/check_precondition.sh -. .travis/cirp/install.sh - -ci-release-publisher cleanup_publish -ci-release-publisher cleanup_store --scope current-build previous-finished-builds \ - --release complete incomplete \ - --on-nonallowed-failure diff --git a/.travis/cirp/cleanup4.sh b/.travis/cirp/cleanup4.sh deleted file mode 100755 index de58be515..000000000 --- a/.travis/cirp/cleanup4.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -. .travis/cirp/check_precondition.sh -. .travis/cirp/install.sh - -ci-release-publisher cleanup_publish -ci-release-publisher cleanup_store --scope current-build previous-finished-builds \ - --release complete incomplete diff --git a/.travis/cirp/cleanup5.sh b/.travis/cirp/cleanup5.sh deleted file mode 100755 index a954ad1cd..000000000 --- a/.travis/cirp/cleanup5.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -. .travis/cirp/check_precondition.sh - -if [ -z "$TRAVIS_TEST_RESULT" ] && [ "$TRAVIS_TEST_RESULT" == "0" ] -then - echo "Build has not failed, skipping cleanup" - exit 0 -fi - -. .travis/cirp/install.sh - -ci-release-publisher cleanup_publish -ci-release-publisher cleanup_store --scope current-build previous-finished-builds \ - --release complete incomplete diff --git a/.travis/cirp/collect.sh b/.travis/cirp/collect.sh deleted file mode 100755 index 0e043a46e..000000000 --- a/.travis/cirp/collect.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -. .travis/cirp/check_precondition.sh - -if [ ! -z "$TRAVIS_TEST_RESULT" ] && [ "$TRAVIS_TEST_RESULT" != "0" ] -then - echo "Build has failed, skipping publishing" - exit 0 -fi - -if [ "$#" != "1" ] -then - echo "Error: No arguments provided. Please specify a directory where to download artifacts to as the first argument." - exit 1 -fi - -ARTIFACTS_DIR="$1" - -. .travis/cirp/install.sh - -ci-release-publisher collect "$ARTIFACTS_DIR" diff --git a/.travis/cirp/install.sh b/.travis/cirp/install.sh deleted file mode 100644 index c88f90d9e..000000000 --- a/.travis/cirp/install.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/usr/bin/env bash - -# Install verifying the hash - -# Get Python >=3.5 -if [ "$TRAVIS_OS_NAME" == "osx" ] -then - # make sha256sum available - export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH" - - brew upgrade python || true - pip3 install virtualenv || true - - python --version || true - python3 --version || true - pyenv versions || true - - cd . - cd "$(mktemp -d)" - virtualenv env -p python3 - set +u - source env/bin/activate - set -u - cd - -else - python --version || true - python3 --version || true - pyenv versions || true - - pyenv global $(pyenv versions | grep -o ' 3\.[5-99]\.[1-99]' | tail -n1) -fi - -pip install --upgrade pip - -check_sha256() -{ - if ! ( echo "$1 $2" | sha256sum -c --status - ) - then - echo "Error: sha256 of $2 doesn't match the known one." - echo "Expected: $1 $2" - echo -n "Got: " - sha256sum "$2" - exit 1 - else - echo "sha256 matches the expected one: $1" - fi -} - -# Don't install again if already installed. -# OSX keeps re-installing it tough, as it uses a temp per-script virtualenv. -if ! pip list --format=columns | grep '^ci-release-publisher ' -then - cd . - cd "$(mktemp -d)" - VERSION="0.2.0" - FILENAME="ci_release_publisher-$VERSION-py3-none-any.whl" - HASH="da7f139e90c57fb64ed2eb83c883ad6434d7c0598c843f7be7b572377bed4bc4" - pip download ci_release_publisher==$VERSION - check_sha256 "$HASH" "$FILENAME" - pip install --no-index --find-links "$PWD" "$FILENAME" - cd - -fi diff --git a/.travis/cirp/publish.sh b/.travis/cirp/publish.sh deleted file mode 100755 index 0cf89c994..000000000 --- a/.travis/cirp/publish.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -. .travis/cirp/check_precondition.sh - -if [ ! -z "$TRAVIS_TEST_RESULT" ] && [ "$TRAVIS_TEST_RESULT" != "0" ] -then - echo "Build has failed, skipping publishing" - exit 0 -fi - -if [ "$#" != "1" ] -then - echo "Error: No arguments provided. Please specify a directory containing artifacts as the first argument." - exit 1 -fi - -ARTIFACTS_DIR="$1" - -. .travis/cirp/check_cache.sh - -. .travis/cirp/install.sh - -ci-release-publisher publish --latest-release \ - --latest-release-prerelease \ - --latest-release-check-event-type cron \ - --numbered-release \ - --numbered-release-keep-count 3 \ - --numbered-release-prerelease \ - "$ARTIFACTS_DIR" - -. .travis/cirp/update_cache.sh diff --git a/.travis/cirp/store.sh b/.travis/cirp/store.sh deleted file mode 100755 index a091b7ffc..000000000 --- a/.travis/cirp/store.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -. .travis/cirp/check_precondition.sh - -if [ ! -z "$TRAVIS_TEST_RESULT" ] && [ "$TRAVIS_TEST_RESULT" != "0" ] -then - echo "Build has failed, skipping publishing" - exit 0 -fi - -if [ "$#" != "1" ] -then - echo "Error: No arguments provided. Please specify a directory containing artifacts as the first argument." - exit 1 -fi - -ARTIFACTS_DIR="$1" - -. .travis/cirp/install.sh - -ci-release-publisher store "$ARTIFACTS_DIR" diff --git a/.travis/cirp/update_cache.sh b/.travis/cirp/update_cache.sh deleted file mode 100644 index 23c762dbf..000000000 --- a/.travis/cirp/update_cache.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -if [ ! -z "$TRAVIS_TEST_RESULT" ] && [ "$TRAVIS_TEST_RESULT" != "0" ] -then - echo "Build has failed, skipping updating the cache" - exit 0 -fi - -mkdir -p /opt/cirp -git rev-parse HEAD > /opt/cirp/previous_runs_commit