mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-07-03 12:02:57 +00:00
Merge pull request #17 from bpg/release-to-registry
Publish to TF registry
This commit is contained in:
commit
5a328e12ce
45
.github/dependabot.yml
vendored
45
.github/dependabot.yml
vendored
@ -1,31 +1,24 @@
|
|||||||
|
# To get started with Dependabot version updates, you'll need to specify which
|
||||||
|
# package ecosystems to update and where the package manifests are located.
|
||||||
|
# Please see the documentation for all configuration options:
|
||||||
|
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
||||||
|
|
||||||
version: 2
|
version: 2
|
||||||
updates:
|
updates:
|
||||||
|
# Maintain dependencies for Go
|
||||||
|
- package-ecosystem: "gomod"
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
||||||
|
|
||||||
|
# Maintain dependencies for build tools
|
||||||
|
- package-ecosystem: "gomod"
|
||||||
|
directory: "/tools"
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
||||||
|
|
||||||
|
# Maintain dependencies for GitHub Actions
|
||||||
- package-ecosystem: "github-actions"
|
- package-ecosystem: "github-actions"
|
||||||
directory: "/"
|
directory: "/"
|
||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "weekly"
|
||||||
- package-ecosystem: "gomod"
|
|
||||||
directory: "/"
|
|
||||||
ignore:
|
|
||||||
- dependency-name: "golang.org/x/tools"
|
|
||||||
- dependency-name: "google.golang.org/grpc"
|
|
||||||
schedule:
|
|
||||||
interval: "daily"
|
|
||||||
- package-ecosystem: "gomod"
|
|
||||||
directory: "/awsproviderlint"
|
|
||||||
ignore:
|
|
||||||
- dependency-name: "golang.org/x/tools"
|
|
||||||
- dependency-name: "google.golang.org/grpc"
|
|
||||||
schedule:
|
|
||||||
interval: "daily"
|
|
||||||
- package-ecosystem: "gomod"
|
|
||||||
directory: "/tools"
|
|
||||||
ignore:
|
|
||||||
- dependency-name: "golang.org/x/tools"
|
|
||||||
- dependency-name: "google.golang.org/grpc"
|
|
||||||
schedule:
|
|
||||||
interval: "daily"
|
|
||||||
- package-ecosystem: "terraform"
|
|
||||||
directory: "/infrastructure/repository"
|
|
||||||
schedule:
|
|
||||||
interval: "daily"
|
|
||||||
|
88
.github/workflows/release.yml
vendored
88
.github/workflows/release.yml
vendored
@ -1,62 +1,48 @@
|
|||||||
name: Create release
|
# This GitHub action can publish assets for release when a tag is created.
|
||||||
|
# Currently its setup to run on any tag that matches the pattern "v*" (ie. v0.1.0).
|
||||||
|
#
|
||||||
|
# This uses an action (hashicorp/ghaction-import-gpg) that assumes you set your
|
||||||
|
# private key in the `GPG_PRIVATE_KEY` secret and passphrase in the `PASSPHRASE`
|
||||||
|
# secret. If you would rather own your own GPG handling, please fork this action
|
||||||
|
# or use an alternative one for key handling.
|
||||||
|
#
|
||||||
|
# You will need to pass the `--batch` flag to `gpg` in your signing step
|
||||||
|
# in `goreleaser` to indicate this is being used in a non-interactive mode.
|
||||||
|
#
|
||||||
|
name: release
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'v*'
|
- 'v*'
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
goreleaser:
|
||||||
name: Tag
|
runs-on: ubuntu-latest
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
steps:
|
steps:
|
||||||
-
|
- name: Checkout
|
||||||
name: Checkout the code
|
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
- name: Unshallow
|
||||||
-
|
run: git fetch --prune --unshallow
|
||||||
name: Install and configure Go
|
|
||||||
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: 1.15
|
go-version: 1.16
|
||||||
-
|
|
||||||
name: Install and configure GoReleaser
|
- name: Import GPG key
|
||||||
env:
|
id: import_gpg
|
||||||
GORELEASER_VERSION: '0.155.1'
|
uses: crazy-max/ghaction-import-gpg@v4
|
||||||
run: |
|
with:
|
||||||
curl -sL -o goreleaser_amd64.deb "https://github.com/goreleaser/goreleaser/releases/download/v${GORELEASER_VERSION}/goreleaser_amd64.deb"
|
git_user_signingkey: true
|
||||||
sudo dpkg -i goreleaser_amd64.deb
|
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||||
rm -f goreleaser_amd64.deb
|
passphrase: ${{ secrets.PASSPHRASE }}
|
||||||
-
|
|
||||||
name: Import the GPG signing key
|
- name: Run GoReleaser
|
||||||
env:
|
uses: goreleaser/goreleaser-action@v2.7.0
|
||||||
GPG_KEY: ${{ secrets.GPG_KEY }}
|
with:
|
||||||
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
|
version: latest
|
||||||
run: |
|
args: release --rm-dist
|
||||||
mkdir -p ~/.gnupg
|
|
||||||
chmod 0700 ~/.gnupg
|
|
||||||
|
|
||||||
cat << EOF > ~/.gnupg/gpg.conf
|
|
||||||
use-agent
|
|
||||||
pinentry-mode loopback
|
|
||||||
EOF
|
|
||||||
|
|
||||||
echo "$GPG_KEY" | base64 -d | gpg --batch --allow-secret-key-import --import
|
|
||||||
gpg --keyid-format LONG --list-secret-keys
|
|
||||||
|
|
||||||
cat << EOF > ~/.gnupg/gpg-agent.conf
|
|
||||||
default-cache-ttl 7200
|
|
||||||
max-cache-ttl 31536000
|
|
||||||
allow-loopback-pinentry
|
|
||||||
allow-preset-passphrase
|
|
||||||
EOF
|
|
||||||
|
|
||||||
echo RELOADAGENT | gpg-connect-agent
|
|
||||||
|
|
||||||
printf '%s' "$GPG_PASSPHRASE" > /tmp/.gpg_passphrase
|
|
||||||
-
|
|
||||||
name: Create release
|
|
||||||
env:
|
env:
|
||||||
|
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
|
||||||
|
# GitHub sets this automatically
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
GPG_FINGERPRINT: ${{ secrets.GPG_FINGERPRINT }}
|
|
||||||
run: |
|
|
||||||
goreleaser release --parallelism 2 --rm-dist --timeout 1h
|
|
||||||
|
@ -1,43 +1,44 @@
|
|||||||
archives:
|
# Visit https://goreleaser.com for documentation on how to customize this
|
||||||
- files:
|
# behavior.
|
||||||
- none*
|
|
||||||
format: zip
|
|
||||||
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
|
|
||||||
before:
|
before:
|
||||||
hooks:
|
hooks:
|
||||||
- go mod download
|
- go mod download
|
||||||
builds:
|
builds:
|
||||||
- binary: '{{ .ProjectName }}_{{ .Version }}'
|
- env:
|
||||||
|
# goreleaser does not work with CGO, it could also complicate
|
||||||
|
# usage by users in CI/CD systems like Terraform Cloud where
|
||||||
|
# they are unable to install libraries.
|
||||||
|
- CGO_ENABLED=0
|
||||||
|
mod_timestamp: '{{ .CommitTimestamp }}'
|
||||||
flags:
|
flags:
|
||||||
- -trimpath
|
- -trimpath
|
||||||
|
ldflags:
|
||||||
|
- '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}'
|
||||||
|
goos:
|
||||||
|
- freebsd
|
||||||
|
- windows
|
||||||
|
- linux
|
||||||
|
- darwin
|
||||||
goarch:
|
goarch:
|
||||||
- '386'
|
|
||||||
- amd64
|
- amd64
|
||||||
|
- '386'
|
||||||
- arm
|
- arm
|
||||||
- arm64
|
- arm64
|
||||||
goos:
|
|
||||||
- darwin
|
|
||||||
- freebsd
|
|
||||||
- linux
|
|
||||||
- windows
|
|
||||||
ignore:
|
ignore:
|
||||||
- goarch: '386'
|
- goos: darwin
|
||||||
goos: darwin
|
goarch: '386'
|
||||||
ldflags:
|
binary: '{{ .ProjectName }}_v{{ .Version }}'
|
||||||
- -s -w -X version.ProviderVersion={{.Version}}
|
archives:
|
||||||
mod_timestamp: '{{ .CommitTimestamp }}'
|
- format: zip
|
||||||
changelog:
|
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
|
||||||
skip: true
|
|
||||||
checksum:
|
checksum:
|
||||||
name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS'
|
name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS'
|
||||||
algorithm: sha256
|
algorithm: sha256
|
||||||
env:
|
|
||||||
- CGO_ENABLED=0
|
|
||||||
release:
|
|
||||||
disable: true
|
|
||||||
signs:
|
signs:
|
||||||
- artifacts: checksum
|
- artifacts: checksum
|
||||||
args:
|
args:
|
||||||
|
# if you are using this in a GitHub action or some other automated pipeline, you
|
||||||
|
# need to pass the batch flag to indicate its not interactive.
|
||||||
- "--batch"
|
- "--batch"
|
||||||
- "--local-user"
|
- "--local-user"
|
||||||
- "{{ .Env.GPG_FINGERPRINT }}" # set this environment variable for your signing key
|
- "{{ .Env.GPG_FINGERPRINT }}" # set this environment variable for your signing key
|
||||||
@ -45,3 +46,8 @@ signs:
|
|||||||
- "${signature}"
|
- "${signature}"
|
||||||
- "--detach-sign"
|
- "--detach-sign"
|
||||||
- "${artifact}"
|
- "${artifact}"
|
||||||
|
release:
|
||||||
|
# If you want to manually examine the release before its live, uncomment this line:
|
||||||
|
draft: true
|
||||||
|
changelog:
|
||||||
|
skip: true
|
||||||
|
@ -3,8 +3,8 @@ data "proxmox_virtual_environment_groups" "example" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
output "data_proxmox_virtual_environment_groups_example" {
|
output "data_proxmox_virtual_environment_groups_example" {
|
||||||
value = map(
|
value = tomap({
|
||||||
"comments", data.proxmox_virtual_environment_groups.example.comments,
|
"comments" = data.proxmox_virtual_environment_groups.example.comments
|
||||||
"group_ids", data.proxmox_virtual_environment_groups.example.group_ids,
|
"group_ids" = data.proxmox_virtual_environment_groups.example.group_ids
|
||||||
)
|
})
|
||||||
}
|
}
|
||||||
|
@ -9,5 +9,5 @@ const (
|
|||||||
TerraformProviderName = "terraform-provider-proxmox"
|
TerraformProviderName = "terraform-provider-proxmox"
|
||||||
|
|
||||||
// TerraformProviderVersion specifies the version number.
|
// TerraformProviderVersion specifies the version number.
|
||||||
TerraformProviderVersion = "0.4.5"
|
TerraformProviderVersion = "0.4.6"
|
||||||
)
|
)
|
||||||
|
8
tools/go.mod
Normal file
8
tools/go.mod
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
module github.com/golang-templates/seed/build
|
||||||
|
|
||||||
|
go 1.16
|
||||||
|
|
||||||
|
require (
|
||||||
|
github.com/golangci/golangci-lint v1.42.0
|
||||||
|
github.com/goreleaser/goreleaser v0.176.0
|
||||||
|
)
|
1552
tools/go.sum
Normal file
1552
tools/go.sum
Normal file
File diff suppressed because it is too large
Load Diff
12
tools/tools.go
Normal file
12
tools/tools.go
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
// +build tools
|
||||||
|
|
||||||
|
package tools
|
||||||
|
|
||||||
|
// Manage tool dependencies via go.mod.
|
||||||
|
//
|
||||||
|
// https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module
|
||||||
|
// https://github.com/golang/go/issues/25922
|
||||||
|
import (
|
||||||
|
_ "github.com/golangci/golangci-lint/cmd/golangci-lint"
|
||||||
|
_ "github.com/goreleaser/goreleaser"
|
||||||
|
)
|
Loading…
Reference in New Issue
Block a user