diff --git a/.gitignore b/.gitignore index 061f1d9d..9d5f18f2 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,4 @@ debug.test # nexus pro license file scripts/license.lic -dist/ +dist/ \ No newline at end of file diff --git a/deployment/README.md b/deployment/README.md deleted file mode 100644 index 96d0de42..00000000 --- a/deployment/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# Provider Deployment - -This folder has the provider deployment bits that are needed. - -You'll need to follow [this link](https://developer.hashicorp.com/terraform/cloud-docs/registry/publish-providers#publishing-a-provider) for docs on what to do. - - -## Steps - -1. Run `create-provider.sh` -2. Bump the version in version.json -3. Run `create-provider-version.sh` -4. Run `get-sigs.sh` -5. Run `curl -T <file> <url>` for URLs returned by `create-provider-version.sh` to upload signatures -6. Check `platform.json` and `create-platform.sh` for version numbers -7. Run `create-platform.sh` -8. Run `curl -T <file> <url>` with returned URL to upload the binary. -9. Navigate to https://app.terraform.io/app/octopus/registry/providers/private/octopus/nexus/latest/overview and go to the version. If all is well, you should not see any warning banners. If there's a banner, click Manage Provider -> Show Release Files diff --git a/deployment/create-platform.sh b/deployment/create-platform.sh deleted file mode 100755 index d37e8cc6..00000000 --- a/deployment/create-platform.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -ORG_NAME=$TF_ORG_NAME -if [ -z $ORG_NAME ] -then - ORG_NAME="octopus" -fi - -TOKEN=$(cat ~/.terraform.d/credentials.tfrc.json| jq -r '.credentials."app.terraform.io".token') -if [ -z "$TOKEN" ] -then - TOKEN=$TF_TOKEN_app_terraform_io - if [ -z $TOKEN ] - then - echo 'please run `terraform login` or set the TF_TOKEN_app_terraform_io environment variable' - exit 2 - fi -fi - -VERSION="2.4.0" - -curl \ - --header "Authorization: Bearer $TOKEN" \ - --header "Content-Type: application/vnd.api+json" \ - --request POST \ - --data @platform.json \ - https://app.terraform.io/api/v2/organizations/$ORG_NAME/registry-providers/private/$ORG_NAME/nexus/versions/$VERSION/platforms - diff --git a/deployment/create-provider-version.sh b/deployment/create-provider-version.sh deleted file mode 100755 index f9b4396f..00000000 --- a/deployment/create-provider-version.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -ORG_NAME=$TF_ORG_NAME -if [ -z $ORG_NAME ] -then - ORG_NAME="octopus" -fi - -TOKEN=$(cat ~/.terraform.d/credentials.tfrc.json| jq -r '.credentials."app.terraform.io".token') -if [ -z "$TOKEN" ] -then - TOKEN=$TF_TOKEN_app_terraform_io - if [ -z $TOKEN ] - then - echo 'please run `terraform login` or set the TF_TOKEN_app_terraform_io environment variable' - exit 2 - fi -fi - -curl \ - --header "Authorization: Bearer $TOKEN" \ - --header "Content-Type: application/vnd.api+json" \ - --request POST \ - --data @payload.json \ - https://app.terraform.io/api/v2/organizations/$ORG_NAME/registry-providers/private/$ORG_NAME/nexus/versions - # Was this, but that feels like a typo: - # https://app.terraform.io/api/v2/organizations/$ORG_NAME/registry-providers/private/$ORG_NAME/aws/versions - diff --git a/deployment/create-provider.sh b/deployment/create-provider.sh deleted file mode 100755 index f6dc30ab..00000000 --- a/deployment/create-provider.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -ORG_NAME=$TF_ORG_NAME -if [ -z $ORG_NAME ] -then - ORG_NAME="octopus" -fi - -TOKEN=$(cat ~/.terraform.d/credentials.tfrc.json| jq -r '.credentials."app.terraform.io".token') -if [ -z "$TOKEN" ] -then - TOKEN=$TF_TOKEN_app_terraform_io - if [ -z $TOKEN ] - then - echo 'please run `terraform login` or set the TF_TOKEN_app_terraform_io environment variable' - exit 2 - fi -fi - -curl \ - --header "Authorization: Bearer $TOKEN" \ - --header "Content-Type: application/vnd.api+json" \ - --request POST \ - --data @provider.json \ - https://app.terraform.io/api/v2/organizations/$ORG_NAME/registry-providers - diff --git a/deployment/get-files.sh b/deployment/get-files.sh deleted file mode 100644 index 6da50a2d..00000000 --- a/deployment/get-files.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -# Omit the leading 'v' if present: -version="2.4.0-rc2-bump" - -wget "https://github.com/octoenergy/terraform-provider-nexus/releases/download/v${version}/terraform-provider-nexus_${version}_SHA256SUMS" -wget "https://github.com/octoenergy/terraform-provider-nexus/releases/download/v${version}/terraform-provider-nexus_${version}_SHA256SUMS.sig" -wget "https://github.com/octoenergy/terraform-provider-nexus/releases/download/v${version}/terraform-provider-nexus_${version}_linux_amd64.zip" diff --git a/deployment/platform.json b/deployment/platform.json deleted file mode 100644 index 030541be..00000000 --- a/deployment/platform.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "data": { - "type": "registry-provider-version-platforms", - "attributes": { - "os": "linux", - "arch": "amd64", - "shasum": "<update me>", - "filename": "terraform-provider-nexus_2.4.0_linux_amd64.zip" - } - } -} - diff --git a/deployment/provider.json b/deployment/provider.json deleted file mode 100644 index c767a90e..00000000 --- a/deployment/provider.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "data": { - "type": "registry-providers", - "attributes": { - "name": "nexus", - "namespace": "octopus", - "registry-name": "private" - } - } -} - diff --git a/deployment/version.json b/deployment/version.json deleted file mode 100644 index 58fd92a0..00000000 --- a/deployment/version.json +++ /dev/null @@ -1,13 +0,0 @@ - - -{ - "data": { - "type": "registry-provider-versions", - "attributes": { - "version": "2.4.0", - "key-id": "AB1F45DCE1DDA2FE", - "protocols": ["5.0"] - } - } -} -