Skip to content

Commit 8afd17b

Browse files
committed
Merge branch '361_exclude_symlink_directories_skips_other_dirs' of https://github.com/metmikel/terraform-provider-archive into 361_exclude_symlink_directories_skips_other_dirs
2 parents 45cf871 + d656d76 commit 8afd17b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+959
-541
lines changed

.changes/2.6.0.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## 2.6.0 (September 09, 2024)
2+
3+
FEATURES:
4+
5+
* data-source/archive_file: Add support for creating `tar.gz` archive files. ([#277](https://github.com/hashicorp/terraform-provider-archive/issues/277))
6+
* resource/archive_file: Add support for creating `tar.gz` archive files. ([#277](https://github.com/hashicorp/terraform-provider-archive/issues/277))
7+

.changes/2.7.0.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
## 2.7.0 (December 05, 2024)
2+
3+
FEATURES:
4+
5+
* resource/archive_file: Remove `deprecated` status ([#218](https://github.com/hashicorp/terraform-provider-archive/issues/218))
6+

.changes/2.7.1.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
## 2.7.1 (May 12, 2025)
2+
3+
NOTES:
4+
5+
* Update dependencies: ([#425](https://github.com/hashicorp/terraform-provider-archive/pull/425))

.changes/unreleased/FEATURES-20240806-142303.yaml

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changes/unreleased/FEATURES-20240806-142529.yaml

Lines changed: 0 additions & 5 deletions
This file was deleted.

.copywrite.hcl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ project {
55
copyright_year = 2017
66

77
header_ignore = [
8+
# internal catalog metadata (prose)
9+
"META.d/**/*.yaml",
10+
811
# changie tooling configuration and CHANGELOG entries (prose)
912
".changes/unreleased/*.yaml",
1013
".changie.yaml",
@@ -21,9 +24,6 @@ project {
2124
# golangci-lint tooling configuration
2225
".golangci.yml",
2326

24-
# GoReleaser tooling configuration
25-
".goreleaser.yml",
26-
2727
# Release Engineering tooling configuration
2828
".release/*.hcl",
2929
]

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @hashicorp/terraform-devex
1+
* @hashicorp/terraform-core-plugins

.github/dependabot.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,23 @@ updates:
88
schedule:
99
# Check for updates to Go modules every weekday
1010
interval: "daily"
11+
groups:
12+
# Group all terraform-plugin-(go|sdk|framework|testing) dependencies together
13+
"terraform-plugin":
14+
patterns:
15+
- "github.com/hashicorp/terraform-plugin-*"
1116
- package-ecosystem: "gomod"
1217
directory: "/tools"
1318
schedule:
1419
interval: "daily"
15-
# Dependabot only updates hashicorp GHAs, external GHAs are managed by internal tooling (tsccr)
1620
- package-ecosystem: "github-actions"
1721
directory: "/"
22+
groups:
23+
"github-actions":
24+
patterns:
25+
- "*" # Group all GitHub Actions dependencies together
1826
schedule:
19-
interval: "daily"
20-
allow:
21-
- dependency-name: "hashicorp/*"
27+
interval: "weekly"
28+
day: "monday"
29+
time: "09:00"
30+
timezone: "Etc/UTC"

.github/pull_request_template.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
## Related Issue
2+
3+
Fixes # <!-- INSERT ISSUE NUMBER -->
4+
5+
## Description
6+
7+
In plain English, describe your approach to addressing the issue linked above. For example, if you made a particular design decision, let us know why you chose this path instead of another solution.
8+
9+
<!-- heimdall_github_prtemplate:grc-pci_dss-2024-01-05 -->
10+
## Rollback Plan
11+
12+
- [ ] If a change needs to be reverted, we will roll out an update to the code within 7 days.
13+
14+
## Changes to Security Controls
15+
16+
Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.

.github/workflows/build.yml

Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
# This workflow builds the product for all supported platforms and uploads the resulting
2+
# binaries as Actions artifacts. The workflow also uploads a build metadata file
3+
# (metadata.json) -- and a Terraform Registry manifest file (terraform-registry-manifest.json).
4+
#
5+
# Reference: https://github.com/hashicorp/terraform-provider-crt-example/blob/main/.github/workflows/README.md
6+
#
7+
8+
name: build
9+
10+
# We default to running this workflow on every push to every branch.
11+
# This provides fast feedback when build issues occur, so they can be
12+
# fixed prior to being merged to the main branch.
13+
#
14+
# If you want to opt out of this, and only run the build on certain branches
15+
# please refer to the documentation on branch filtering here:
16+
#
17+
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onpushbranchestagsbranches-ignoretags-ignore
18+
#
19+
on: [workflow_dispatch, push]
20+
21+
env:
22+
PKG_NAME: "terraform-provider-archive"
23+
24+
jobs:
25+
# Detects the Go toolchain version to use for product builds.
26+
#
27+
# The implementation is inspired by envconsul -- https://go.hashi.co/get-go-version-example
28+
get-go-version:
29+
name: "Detect Go toolchain version"
30+
runs-on: ubuntu-latest
31+
outputs:
32+
go-version: ${{ steps.get-go-version.outputs.go-version }}
33+
steps:
34+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
35+
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
36+
with:
37+
go-version-file: 'go.mod'
38+
- name: Detect Go version
39+
id: get-go-version
40+
run: |
41+
version="$(go list -f {{.GoVersion}} -m)"
42+
echo "go-version=$version" >> "$GITHUB_OUTPUT"
43+
44+
# Parses the version/VERSION file. Reference: https://github.com/hashicorp/actions-set-product-version/blob/main/README.md
45+
#
46+
# > This action should be implemented in product repo `build.yml` files. The action is intended to grab the version
47+
# > from the version file at the beginning of the build, then passes those versions (along with metadata, where
48+
# > necessary) to any workflow jobs that need version information.
49+
set-product-version:
50+
name: "Parse version file"
51+
runs-on: ubuntu-latest
52+
outputs:
53+
product-version: ${{ steps.set-product-version.outputs.product-version }}
54+
product-base-version: ${{ steps.set-product-version.outputs.base-product-version }}
55+
product-prerelease-version: ${{ steps.set-product-version.outputs.prerelease-product-version }}
56+
product-minor-version: ${{ steps.set-product-version.outputs.minor-product-version }}
57+
steps:
58+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
59+
- name: Set variables
60+
id: set-product-version
61+
uses: hashicorp/actions-set-product-version@v2
62+
63+
# Creates metadata.json file containing build metadata for consumption by CRT workflows.
64+
#
65+
# Reference: https://github.com/hashicorp/actions-generate-metadata/blob/main/README.md
66+
generate-metadata-file:
67+
needs: set-product-version
68+
runs-on: ubuntu-latest
69+
outputs:
70+
filepath: ${{ steps.generate-metadata-file.outputs.filepath }}
71+
steps:
72+
- name: "Checkout directory"
73+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
74+
- name: Generate metadata file
75+
id: generate-metadata-file
76+
uses: hashicorp/actions-generate-metadata@v1
77+
with:
78+
version: ${{ needs.set-product-version.outputs.product-version }}
79+
product: ${{ env.PKG_NAME }}
80+
repositoryOwner: "hashicorp"
81+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
82+
with:
83+
name: metadata.json
84+
path: ${{ steps.generate-metadata-file.outputs.filepath }}
85+
86+
# Uploads an Actions artifact named terraform-registry-manifest.json.zip.
87+
#
88+
# The artifact contains a single file with a filename that Terraform Registry expects
89+
# (example: terraform-provider-crt-example_2.3.6-alpha1_manifest.json). The file contents
90+
# are identical to the terraform-registry-manifest.json file in the source repository.
91+
upload-terraform-registry-manifest-artifact:
92+
needs: set-product-version
93+
runs-on: ubuntu-latest
94+
steps:
95+
- name: "Checkout directory"
96+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
97+
with:
98+
path: ${{ env.PKG_NAME }}
99+
- name: "Copy manifest from checkout directory to a file with the desired name"
100+
id: terraform-registry-manifest
101+
run: |
102+
name="${{ env.PKG_NAME }}"
103+
version="${{ needs.set-product-version.outputs.product-version }}"
104+
105+
source="${name}/terraform-registry-manifest.json"
106+
destination="${name}_${version}_manifest.json"
107+
108+
cp "$source" "$destination"
109+
echo "filename=$destination" >> "$GITHUB_OUTPUT"
110+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
111+
with:
112+
name: terraform-registry-manifest.json
113+
path: ${{ steps.terraform-registry-manifest.outputs.filename }}
114+
if-no-files-found: error
115+
116+
# Builds the product for all platforms except macOS.
117+
#
118+
# With `reproducible: report`, this job also reports whether the build is reproducible,
119+
# but does not enforce it.
120+
#
121+
# Reference: https://github.com/hashicorp/actions-go-build/blob/main/README.md
122+
build:
123+
needs:
124+
- get-go-version
125+
- set-product-version
126+
runs-on: ubuntu-latest
127+
strategy:
128+
fail-fast: true
129+
# Verify expected Artifacts list for a workflow run.
130+
matrix:
131+
goos: [freebsd, windows, linux, darwin]
132+
goarch: ["386", "amd64", "arm", "arm64"]
133+
exclude:
134+
- goos: freebsd
135+
goarch: arm64
136+
- goos: windows
137+
goarch: arm64
138+
- goos: windows
139+
goarch: arm
140+
- goos: darwin
141+
goarch: 386
142+
- goos: darwin
143+
goarch: arm
144+
145+
name: Go ${{ needs.get-go-version.outputs.go-version }} ${{ matrix.goos }} ${{ matrix.goarch }} build
146+
steps:
147+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
148+
- uses: hashicorp/actions-go-build@v1
149+
env:
150+
CGO_ENABLED: 0
151+
BASE_VERSION: ${{ needs.set-product-version.outputs.product-base-version }}
152+
PRERELEASE_VERSION: ${{ needs.set-product-version.outputs.product-prerelease-version}}
153+
METADATA_VERSION: ${{ env.METADATA }}
154+
with:
155+
bin_name: "${{ env.PKG_NAME }}_v${{ needs.set-product-version.outputs.product-version }}_x5"
156+
product_name: ${{ env.PKG_NAME }}
157+
product_version: ${{ needs.set-product-version.outputs.product-version }}
158+
go_version: ${{ needs.get-go-version.outputs.go-version }}
159+
os: ${{ matrix.goos }}
160+
arch: ${{ matrix.goarch }}
161+
reproducible: report
162+
instructions: |
163+
go build \
164+
-o "$BIN_PATH" \
165+
-trimpath \
166+
-buildvcs=false \
167+
-ldflags "-s -w"
168+
cp LICENSE "$TARGET_DIR/LICENSE.txt"
169+
170+
whats-next:
171+
needs:
172+
- build
173+
- generate-metadata-file
174+
- upload-terraform-registry-manifest-artifact
175+
runs-on: ubuntu-latest
176+
name: "What's next?"
177+
steps:
178+
- name: "Write a helpful summary"
179+
run: |
180+
github_dot_com="${{ github.server_url }}"
181+
owner_with_name="${{ github.repository }}"
182+
ref="${{ github.ref }}"
183+
184+
echo "### What's next?" >> "$GITHUB_STEP_SUMMARY"
185+
echo "#### For a release branch (see \`.release/ci.hcl\`)" >> $GITHUB_STEP_SUMMARY
186+
echo "After this \`build\` workflow run completes succesfully, you can expect the CRT \`prepare\` workflow to begin momentarily." >> "$GITHUB_STEP_SUMMARY"
187+
echo "To find the \`prepare\` workflow run, [view the checks for this commit]($github_dot_com/$owner_with_name/commits/$ref)" >> "$GITHUB_STEP_SUMMARY"

0 commit comments

Comments
 (0)