-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
652f867
commit cef88b1
Showing
58 changed files
with
3,176 additions
and
1,412 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: golangci-lint | ||
on: | ||
push: | ||
paths: | ||
- '**.go' | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
permissions: | ||
# Required: allow read access to the content for analysis. | ||
contents: read | ||
# Optional: allow read access to pull request. Use with `only-new-issues` option. | ||
pull-requests: read | ||
# Optional: Allow write access to checks to allow the action to annotate code in the PR. | ||
checks: write | ||
|
||
jobs: | ||
golangci: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.21' | ||
cache: false | ||
|
||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v6 | ||
with: | ||
version: v1.59.1 | ||
args: -c .golang-ci.yml -v --timeout=5m | ||
env: | ||
GO111MODULES: off |
50 changes: 50 additions & 0 deletions
50
.github/workflows/notify-integration-release-via-manual.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Manual release workflow is used for deploying documentation updates | ||
# on the specified branch without making an official plugin release. | ||
name: Notify Integration Release (Manual) | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: "The release version (semver)" | ||
default: 1.0.0 | ||
required: false | ||
branch: | ||
description: "A branch or SHA" | ||
default: 'main' | ||
required: false | ||
jobs: | ||
notify-release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout this repo | ||
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | ||
with: | ||
ref: ${{ github.event.inputs.branch }} | ||
# Ensure that Docs are Compiled | ||
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 | ||
- shell: bash | ||
run: make generate | ||
- shell: bash | ||
run: | | ||
if [[ -z "$(git status -s)" ]]; then | ||
echo "OK" | ||
else | ||
echo "Docs have been updated, but the compiled docs have not been committed." | ||
echo "Run 'make generate', and commit the result to resolve this error." | ||
exit 1 | ||
fi | ||
# Perform the Release | ||
- name: Checkout integration-release-action | ||
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | ||
with: | ||
repository: hashicorp/integration-release-action | ||
path: ./integration-release-action | ||
- name: Notify Release | ||
uses: ./integration-release-action | ||
with: | ||
# The integration identifier will be used by the Packer team to register the integration | ||
# the expected format is packer/<GitHub Org Name>/<plugin-name> | ||
integration_identifier: "packer/hashicorp/scaffolding" | ||
release_version: ${{ github.event.inputs.version }} | ||
release_sha: ${{ github.event.inputs.branch }} | ||
github_token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Notify Integration Release (Tag) | ||
on: | ||
push: | ||
tags: | ||
- '*.*.*' # Proper releases | ||
jobs: | ||
strip-version: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
packer-version: ${{ steps.strip.outputs.packer-version }} | ||
steps: | ||
- name: Strip leading v from version tag | ||
id: strip | ||
env: | ||
REF: ${{ github.ref_name }} | ||
run: | | ||
echo "packer-version=$(echo "$REF" | sed -E 's/v?([0-9]+\.[0-9]+\.[0-9]+)/\1/')" >> "$GITHUB_OUTPUT" | ||
notify-release: | ||
needs: | ||
- strip-version | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout this repo | ||
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | ||
with: | ||
ref: ${{ github.ref }} | ||
# Ensure that Docs are Compiled | ||
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 | ||
- shell: bash | ||
run: make generate | ||
- shell: bash | ||
run: | | ||
if [[ -z "$(git status -s)" ]]; then | ||
echo "OK" | ||
else | ||
echo "Docs have been updated, but the compiled docs have not been committed." | ||
echo "Run 'make generate', and commit the result to resolve this error." | ||
exit 1 | ||
fi | ||
# Perform the Release | ||
- name: Checkout integration-release-action | ||
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | ||
with: | ||
repository: hashicorp/integration-release-action | ||
path: ./integration-release-action | ||
- name: Notify Release | ||
uses: ./integration-release-action | ||
with: | ||
# The integration identifier will be used by the Packer team to register the integration | ||
# the expected format is packer/<GitHub Org Name>/<plugin-name> | ||
integration_identifier: "packer/hashicorp/scaffolding" | ||
release_version: ${{ needs.strip-version.outputs.packer-version }} | ||
release_sha: ${{ github.ref }} | ||
github_token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
example/packer_cache | ||
.envrc | ||
packer-plugin-goss | ||
tests/debug-goss-spec.yaml | ||
tests/goss-spec.yaml | ||
tests/goss.json | ||
*.tar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
linters-settings: | ||
lll: | ||
line-length: 180 | ||
allow-leading-space: true | ||
linters: | ||
enable-all: true | ||
disable: | ||
- testpackage | ||
- forbidigo | ||
- paralleltest | ||
- wrapcheck | ||
- gochecknoglobals | ||
- varnamelen | ||
- funlen | ||
- gomnd | ||
- containedctx | ||
- nlreturn | ||
- wsl | ||
- err113 | ||
- exhaustruct | ||
- nolintlint | ||
- maintidx | ||
- dupl | ||
- revive | ||
- depguard | ||
- tagalign | ||
- perfsprint | ||
- godox | ||
- intrange | ||
- copyloopvar | ||
- gomoddirectives | ||
- goconst | ||
- godot | ||
- execinquery |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
repos: | ||
- repo: https://github.com/tekwizely/pre-commit-golang | ||
rev: v1.0.0-rc.1 | ||
hooks: | ||
- id: go-build-mod | ||
- id: go-test-mod | ||
- id: go-vet-mod | ||
- id: go-staticcheck-mod | ||
- id: go-fmt | ||
- id: go-fumpt | ||
- id: go-imports | ||
- id: go-lint | ||
- id: golangci-lint-mod | ||
args: [-c.golang-ci.yml] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# packer provisioner goss |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Copyright (c) HashiCorp, Inc. | ||
# SPDX-License-Identifier: MPL-2.0 | ||
|
||
# Details on using this Integration template can be found at https://github.com/hashicorp/integration-template | ||
# This metadata.hcl file and the adjacent `components` docs directory should | ||
# be kept in a `.web-docs` directory at the root of your plugin repository. | ||
integration { | ||
name = "Integration Template" | ||
description = "This is an integration template" | ||
identifier = "packer/hashicorp/scaffolding" | ||
flags = [ | ||
# Remove if the plugin does not conform to the HCP Packer requirements. | ||
# | ||
# Please refer to our docs if you want your plugin to be compatible with | ||
# HCP Packer: https://developer.hashicorp.com/packer/docs/plugins/creation/hcp-support | ||
"hcp-ready", | ||
# This signals that the plugin is unmaintained and will eventually not be | ||
# working with a future version of Packer. | ||
# | ||
# On the integrations, this will end-up as an icon on the plugin's main card. | ||
"archived", | ||
] | ||
docs { | ||
# If you'd prefer not to publish docs on HashiCorp websites, you can | ||
# set `process_docs` to `false`. If `process_docs` is `false`, you MUST | ||
# provide a `external_url` so we can link back to your plugin repo. | ||
process_docs = true | ||
# Note that the README location is relative to this file. We recommend | ||
# keeping the default value, as the adjacent `compile-to-webdocs` script | ||
# will automatically copy the README from the `docs` directory of this | ||
# repository to the correct location. | ||
readme_location = "./README.md" | ||
# `external_url` allows us to link back to your plugin repo. | ||
external_url = "https://github.com/hashicorp/integration-template" | ||
} | ||
license { | ||
type = "MPL-2.0" | ||
url = "https://github.com/hashicorp/integration-template/blob/main/LICENSE.md" | ||
} | ||
component { | ||
type = "provisioner" | ||
name = "Component Name (e.g HappyCloud Shell)" | ||
slug = "name" | ||
} | ||
} |
Oops, something went wrong.