mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-07-05 05:24:01 +00:00
update various project configs, mostly for CI
This commit is contained in:
parent
26664468c5
commit
968f775cf6
31
.github/dependabot.yml
vendored
Normal file
31
.github/dependabot.yml
vendored
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
- package-ecosystem: "github-actions"
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: "daily"
|
||||||
|
- 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"
|
90
.github/workflows/test.yml
vendored
90
.github/workflows/test.yml
vendored
@ -1,34 +1,72 @@
|
|||||||
name: Test changes
|
|
||||||
|
# This GitHub action runs your tests for each commit push and/or PR. Optionally
|
||||||
|
# you can turn it on using a cron schedule for regular testing.
|
||||||
|
#
|
||||||
|
name: Tests
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
paths-ignore:
|
||||||
- main
|
- 'README.md'
|
||||||
- master
|
push:
|
||||||
- 'release/v*'
|
paths-ignore:
|
||||||
|
- 'README.md'
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
# ensure the code builds...
|
||||||
name: Pull Request
|
build:
|
||||||
runs-on: ubuntu-20.04
|
name: Build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 5
|
||||||
steps:
|
steps:
|
||||||
-
|
|
||||||
name: Checkout the code
|
- name: Set up Go
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
-
|
|
||||||
name: Install and configure Go
|
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: 1.15
|
go-version: '1.16'
|
||||||
-
|
id: go
|
||||||
name: Install and configure GoReleaser
|
|
||||||
|
- name: Check out code into the Go module directory
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Get dependencies
|
||||||
|
run: |
|
||||||
|
go mod download
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
go build -v .
|
||||||
|
# run acceptance tests in a matrix with Terraform core versions
|
||||||
|
test:
|
||||||
|
name: Matrix Test
|
||||||
|
needs: build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 15
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
# list whatever Terraform versions here you would like to support
|
||||||
|
terraform:
|
||||||
|
- '0.14.11'
|
||||||
|
- '0.15.5'
|
||||||
|
- '1.0.6'
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: '1.16'
|
||||||
|
id: go
|
||||||
|
|
||||||
|
- name: Check out code into the Go module directory
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Get dependencies
|
||||||
|
run: |
|
||||||
|
go mod download
|
||||||
|
|
||||||
|
- name: TF acceptance tests
|
||||||
|
timeout-minutes: 10
|
||||||
env:
|
env:
|
||||||
GORELEASER_VERSION: '0.155.1'
|
TF_ACC: "1"
|
||||||
|
TF_ACC_TERRAFORM_VERSION: ${{ matrix.terraform }}
|
||||||
|
|
||||||
run: |
|
run: |
|
||||||
curl -sL -o goreleaser_amd64.deb "https://github.com/goreleaser/goreleaser/releases/download/v${GORELEASER_VERSION}/goreleaser_amd64.deb"
|
go test -v -cover ./...
|
||||||
sudo dpkg -i goreleaser_amd64.deb
|
|
||||||
rm -f goreleaser_amd64.deb
|
|
||||||
-
|
|
||||||
name: Create snapshot
|
|
||||||
run: |
|
|
||||||
goreleaser build --parallelism 2 --rm-dist --snapshot --timeout 1h
|
|
||||||
|
1
.go-version
Normal file
1
.go-version
Normal file
@ -0,0 +1 @@
|
|||||||
|
1.16.0
|
@ -1,48 +1,47 @@
|
|||||||
|
archives:
|
||||||
|
- files:
|
||||||
|
- none*
|
||||||
|
format: zip
|
||||||
|
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
|
||||||
before:
|
before:
|
||||||
hooks:
|
hooks:
|
||||||
- go mod tidy
|
- go mod download
|
||||||
builds:
|
builds:
|
||||||
- env:
|
- binary: '{{ .ProjectName }}_{{ .Version }}'
|
||||||
- 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:
|
||||||
- amd64
|
|
||||||
- '386'
|
- '386'
|
||||||
|
- amd64
|
||||||
- arm
|
- arm
|
||||||
- arm64
|
- arm64
|
||||||
|
goos:
|
||||||
|
- darwin
|
||||||
|
- freebsd
|
||||||
|
- linux
|
||||||
|
- windows
|
||||||
ignore:
|
ignore:
|
||||||
- goos: darwin
|
- goarch: '386'
|
||||||
goarch: '386'
|
goos: darwin
|
||||||
binary: '{{ .ProjectName }}_v{{ .Version }}'
|
ldflags:
|
||||||
archives:
|
- -s -w -X version.ProviderVersion={{.Version}}
|
||||||
- format: zip
|
mod_timestamp: '{{ .CommitTimestamp }}'
|
||||||
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
|
changelog:
|
||||||
|
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:
|
||||||
- "--batch"
|
- "--batch"
|
||||||
- "--local-user"
|
- "--local-user"
|
||||||
- "{{ .Env.GPG_FINGERPRINT }}"
|
- "{{ .Env.GPG_FINGERPRINT }}" # set this environment variable for your signing key
|
||||||
- "--output"
|
- "--output"
|
||||||
- "${signature}"
|
- "${signature}"
|
||||||
- "--passphrase-fd"
|
|
||||||
- "0"
|
|
||||||
- "--detach-sign"
|
- "--detach-sign"
|
||||||
- "${artifact}"
|
- "${artifact}"
|
||||||
stdin_file: /tmp/.gpg_passphrase
|
|
||||||
release:
|
|
||||||
draft: false
|
|
||||||
changelog:
|
|
||||||
skip: true
|
|
||||||
|
@ -6,7 +6,7 @@ A Terraform Provider which adds support for Proxmox solutions.
|
|||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
- [Terraform](https://www.terraform.io/downloads.html) 0.13+
|
- [Terraform](https://www.terraform.io/downloads.html) 0.13+
|
||||||
- [Go](https://golang.org/doc/install) 1.15+ (to build the provider plugin)
|
- [Go](https://golang.org/doc/install) 1.16+ (to build the provider plugin)
|
||||||
- [GoReleaser](https://goreleaser.com/install/) 0.155+ (to build the provider plugin)
|
- [GoReleaser](https://goreleaser.com/install/) 0.155+ (to build the provider plugin)
|
||||||
|
|
||||||
## Table of Contents
|
## Table of Contents
|
||||||
|
Loading…
Reference in New Issue
Block a user