From b9d5d108d46f74eb8327e67c54675afddc69d30c Mon Sep 17 00:00:00 2001 From: Isabelle Miller Date: Fri, 6 Dec 2024 13:07:34 +0100 Subject: [PATCH] remove old ldrelease scripts --- .ldrelease/build.sh | 5 ----- .ldrelease/config.yml | 18 ------------------ .ldrelease/prepare.sh | 25 ------------------------- .ldrelease/publish-dry-run.sh | 15 --------------- .ldrelease/publish.sh | 15 --------------- .ldrelease/secrets.properties | 4 ---- 6 files changed, 82 deletions(-) delete mode 100755 .ldrelease/build.sh delete mode 100644 .ldrelease/config.yml delete mode 100755 .ldrelease/prepare.sh delete mode 100755 .ldrelease/publish-dry-run.sh delete mode 100755 .ldrelease/publish.sh delete mode 100644 .ldrelease/secrets.properties diff --git a/.ldrelease/build.sh b/.ldrelease/build.sh deleted file mode 100755 index ee9bf58e..00000000 --- a/.ldrelease/build.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -set -ue - -echo "Skipping build step as we want to build artifacts after tagging in the publish step" diff --git a/.ldrelease/config.yml b/.ldrelease/config.yml deleted file mode 100644 index 4fd97cba..00000000 --- a/.ldrelease/config.yml +++ /dev/null @@ -1,18 +0,0 @@ -version: 2 - -repo: - public: terraform-provider-launchdarkly - private: terraform-provider-launchdarkly-private - -jobs: - - docker: - image: golang:1.21 - copyGitHistory: true - template: - name: go - # We run the tests as part of every merge - skip: - - test - -branches: - - name: main diff --git a/.ldrelease/prepare.sh b/.ldrelease/prepare.sh deleted file mode 100755 index aa93ed78..00000000 --- a/.ldrelease/prepare.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -set -ue -# Prep for getting goreleaser -echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | tee /etc/apt/sources.list.d/goreleaser.list -apt-get update -# Get goreleaser and gnupg -apt-get install -y --no-install-recommends \ - goreleaser \ - gnupg \ -; \ - -# Goreleaser does not allow us to sign our binaries with a passphrase so we have to run a dummy -# command to get GPG to cache the passphrase. By default the cache has a TTL of 10 minutes, which is too short for our -# builds. -gpgconf --kill gpg-agent -gpg-agent --daemon --default-cache-ttl 7200 - -# Get GPG Key -echo -e "$(cat "${LD_RELEASE_SECRETS_DIR}/gpg_private_key")" | gpg --import --batch --no-tty -echo "hello world" > temp.txt -gpg --detach-sig --yes -v --output=/dev/null --pinentry-mode loopback --passphrase "$(cat "${LD_RELEASE_SECRETS_DIR}/gpg_passphrase")" temp.txt -rm temp.txt -# Set it to env -export GPG_FINGERPRINT=$(gpg --with-colons --list-keys | awk -F: '/^pub/ { print $5 }') diff --git a/.ldrelease/publish-dry-run.sh b/.ldrelease/publish-dry-run.sh deleted file mode 100755 index 4cdf9bc8..00000000 --- a/.ldrelease/publish-dry-run.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -set -ue - -# Run goreleaser -# We can't run in the build step, as project-releaser only tags the commit after the build step finishes and goreleaser pulls the tag off the most recent commit -GPG_FINGERPRINT=$(gpg --with-colons --list-keys | awk -F: '/^pub/ { print $5 }') GITHUB_TOKEN="$(cat "${LD_RELEASE_SECRETS_DIR}/github_token")" LD_RELEASE_ARTIFACTS_DIR="${LD_RELEASE_ARTIFACTS_DIR}" goreleaser release --clean --snapshot - -# Remove extra files that we don't want in our release -rm /tmp/project-releaser/artifacts/artifacts.json -rm /tmp/project-releaser/artifacts/metadata.json -rm /tmp/project-releaser/artifacts/config.yaml -# Remove the binaries themselves as goreleaser puts them in subfolders -# We only want to keep the .zip files to release -rm -rf /tmp/project-releaser/artifacts/*/ diff --git a/.ldrelease/publish.sh b/.ldrelease/publish.sh deleted file mode 100755 index 96295e32..00000000 --- a/.ldrelease/publish.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -set -ue - -# Run goreleaser -# We can't run in the build step, as project-releaser only tags the commit after the build step finishes and goreleaser pulls the tag off the most recent commit -GPG_FINGERPRINT=$(gpg --with-colons --list-keys | awk -F: '/^pub/ { print $5 }') GITHUB_TOKEN="$(cat "${LD_RELEASE_SECRETS_DIR}/github_token")" goreleaser release --clean --release-notes ../entry.tmp - -# Remove extra files that we don't want in our release -rm /tmp/project-releaser/artifacts/artifacts.json -rm /tmp/project-releaser/artifacts/metadata.json -rm /tmp/project-releaser/artifacts/config.yaml -# Remove the binaries themselves as goreleaser puts them in subfolders -# We only want to keep the .zip files to release -rm -rf /tmp/project-releaser/artifacts/*/ diff --git a/.ldrelease/secrets.properties b/.ldrelease/secrets.properties deleted file mode 100644 index 207ac346..00000000 --- a/.ldrelease/secrets.properties +++ /dev/null @@ -1,4 +0,0 @@ -gpg_private_key=blob:/terraform-provider/private.pgp -gpg_passphrase=param:/production/common/releasing/terraform-provider/gpg-passphrase -# This token is the default config token for the releaser, set in it's releaser.conf -github_token=param:/staging/common/services/github/releaser_access_token