From 01c0e9d8939b62d289cbb184683e8d16d4a0811c Mon Sep 17 00:00:00 2001 From: Isabelle Miller Date: Wed, 4 Dec 2024 12:25:35 +0100 Subject: [PATCH 1/5] add tag-for-release.yml --- .github/workflows/tag-for-release.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/tag-for-release.yml diff --git a/.github/workflows/tag-for-release.yml b/.github/workflows/tag-for-release.yml new file mode 100644 index 00000000..6db0b2cc --- /dev/null +++ b/.github/workflows/tag-for-release.yml @@ -0,0 +1,19 @@ +on: + push: + branches: + - main + +permissions: + contents: write + pull-requests: write + +name: release-please + +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: googleapis/release-please-action@v4 + with: + token: ${{ secrets.GITHUB-TOKEN }} + release-type: go \ No newline at end of file From 0784a3871f2faf98b602aa1d36ef6ce6df8d29b4 Mon Sep 17 00:00:00 2001 From: Isabelle Miller Date: Fri, 6 Dec 2024 13:06:35 +0100 Subject: [PATCH 2/5] use specific sha tag for release-please --- .github/workflows/tag-for-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tag-for-release.yml b/.github/workflows/tag-for-release.yml index 6db0b2cc..a94a3f7a 100644 --- a/.github/workflows/tag-for-release.yml +++ b/.github/workflows/tag-for-release.yml @@ -13,7 +13,7 @@ jobs: release-please: runs-on: ubuntu-latest steps: - - uses: googleapis/release-please-action@v4 + - uses: googleapis/release-please-action@7987652d64b4581673a76e33ad5e98e3dd56832f # v4.1.3 with: token: ${{ secrets.GITHUB-TOKEN }} release-type: go \ No newline at end of file From b9d5d108d46f74eb8327e67c54675afddc69d30c Mon Sep 17 00:00:00 2001 From: Isabelle Miller Date: Fri, 6 Dec 2024 13:07:34 +0100 Subject: [PATCH 3/5] 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 From 7173159162b7919b6fa86920f7995acb771f0675 Mon Sep 17 00:00:00 2001 From: Isabelle Miller Date: Fri, 6 Dec 2024 13:45:26 +0100 Subject: [PATCH 4/5] skip-github-release: true --- .github/workflows/tag-for-release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tag-for-release.yml b/.github/workflows/tag-for-release.yml index a94a3f7a..1eb13e63 100644 --- a/.github/workflows/tag-for-release.yml +++ b/.github/workflows/tag-for-release.yml @@ -16,4 +16,5 @@ jobs: - uses: googleapis/release-please-action@7987652d64b4581673a76e33ad5e98e3dd56832f # v4.1.3 with: token: ${{ secrets.GITHUB-TOKEN }} - release-type: go \ No newline at end of file + release-type: go + skip-github-release: true \ No newline at end of file From e812dab431d3336833caf6491d65150f8c7ade69 Mon Sep 17 00:00:00 2001 From: Isabelle Miller Date: Fri, 6 Dec 2024 13:52:37 +0100 Subject: [PATCH 5/5] update readme --- README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.md b/README.md index 10d33a74..1123cfcb 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,5 @@ # Terraform Provider for LaunchDarkly -- Website: https://www.terraform.io -- [![Gitter chat](https://badges.gitter.im/hashicorp-terraform/Lobby.png)](https://gitter.im/hashicorp-terraform/Lobby) -- Mailing list: [Google Groups](http://groups.google.com/group/terraform-tool) - [LaunchDarkly](https://launchdarkly.com) is a continuous delivery platform that provides feature flags as a service and allows developers to iterate quickly and safely. Use the LaunchDarkly provider to interact with LaunchDarkly resources, such as projects, environments, feature flags, and more. ## Quick Starts