Skip to content

Commit 55b6e49

Browse files
authored
chore(deps): upgrade Go to 1.24 and update dependencies (#62)
Updates GitHub Actions to latest versions, including checkout v4.2.2 and setup-go v5.5.0. Upgrades Go from 1.20 to 1.24 and updates all dependencies to their latest compatible versions, including hashicorp/packer-plugin-sdk from 0.5.1 to 0.6.1. Add related HashiCorp MPL-2.0 licensed libraries to Snyk ignore list. Signed-off-by: Ville Vesilehto <ville.vesilehto@upcloud.com>
1 parent 4a24679 commit 55b6e49

File tree

13 files changed

+243
-234
lines changed

13 files changed

+243
-234
lines changed

.github/workflows/docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: Checkout
18-
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
18+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1919
- name: Setup Go
20-
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
20+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
2121
with:
2222
go-version-file: 'go.mod'
2323
- name: Generate documentation

.github/workflows/lint.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ jobs:
66
runs-on: ubuntu-latest
77
steps:
88
- name: Checkout
9-
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
9+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1010
- name: Setup Go
11-
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
11+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
1212
with:
1313
go-version-file: 'go.mod'
1414
- name: Lint

.github/workflows/notify-integration-release-via-manual.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: Checkout this repo
20-
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
20+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2121
with:
2222
ref: ${{ github.event.inputs.branch }}
2323
# Ensure that Docs are Compiled
24-
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
24+
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
2525
- shell: bash
2626
run: make docs
2727
- shell: bash
@@ -35,7 +35,7 @@ jobs:
3535
fi
3636
# Perform the Release
3737
- name: Checkout integration-release-action
38-
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
38+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3939
with:
4040
repository: hashicorp/integration-release-action
4141
path: ./integration-release-action

.github/workflows/notify-integration-release-via-tag.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ jobs:
2121
runs-on: ubuntu-latest
2222
steps:
2323
- name: Checkout this repo
24-
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
24+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2525
with:
2626
ref: ${{ github.ref }}
2727
# Ensure that Docs are Compiled
28-
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
28+
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
2929
- shell: bash
3030
run: make docs
3131
- shell: bash
@@ -39,7 +39,7 @@ jobs:
3939
fi
4040
# Perform the Release
4141
- name: Checkout integration-release-action
42-
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
42+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4343
with:
4444
repository: hashicorp/integration-release-action
4545
path: ./integration-release-action

.github/workflows/release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- name: Checkout head
11-
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
11+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1212

1313
- name: Unshallow
1414
run: git fetch --prune --unshallow
1515

1616
- name: Setup go
17-
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
17+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
1818
with:
1919
go-version-file: 'go.mod'
2020

.github/workflows/test-plugin-example.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
UPCLOUD_API_PASSWORD: ${{ secrets.UPCLOUD_API_PASSWORD }}
2626
steps:
2727
- name: Checkout Repository
28-
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
28+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2929

3030
- name: Init
3131
uses: hashicorp/packer-github-actions@master

.github/workflows/test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ jobs:
1616

1717
steps:
1818
- name: Checkout
19-
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
19+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2020
- name: Setup Go
21-
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
21+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
2222
with:
2323
go-version-file: "go.mod"
2424

.snyk

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,67 @@ ignore:
33
'snyk:lic:golang:github.com:hashicorp:packer-plugin-sdk:MPL-2.0':
44
- '*':
55
reason: upstream inclusion
6+
'snyk:lic:golang:github.com:hashicorp:yamux:MPL-2.0':
7+
- '*':
8+
reason: upstream inclusion
9+
'snyk:lic:golang:github.com:hashicorp:vault:api:MPL-2.0':
10+
- '*':
11+
reason: upstream inclusion
12+
'snyk:lic:golang:github.com:hashicorp:serf:MPL-2.0':
13+
- '*':
14+
reason: upstream inclusion
15+
'snyk:lic:golang:github.com:hashicorp:hcl:v2:MPL-2.0':
16+
- '*':
17+
reason: upstream inclusion
18+
'snyk:lic:golang:github.com:hashicorp:hcl:MPL-2.0':
19+
- '*':
20+
reason: upstream inclusion
21+
'snyk:lic:golang:github.com:hashicorp:golang-lru:MPL-2.0':
22+
- '*':
23+
reason: upstream inclusion
24+
'snyk:lic:golang:github.com:hashicorp:go-version:MPL-2.0':
25+
- '*':
26+
reason: upstream inclusion
27+
'snyk:lic:golang:github.com:hashicorp:go-sockaddr:MPL-2.0':
28+
- '*':
29+
reason: upstream inclusion
30+
'snyk:lic:golang:github.com:hashicorp:go-secure-stdlib:strutil:MPL-2.0':
31+
- '*':
32+
reason: upstream inclusion
33+
'snyk:lic:golang:github.com:hashicorp:go-secure-stdlib:parseutil:MPL-2.0':
34+
- '*':
35+
reason: upstream inclusion
36+
'snyk:lic:golang:github.com:hashicorp:go-safetemp:MPL-2.0':
37+
- '*':
38+
reason: upstream inclusion
39+
'snyk:lic:golang:github.com:hashicorp:go-rootcerts:MPL-2.0':
40+
- '*':
41+
reason: upstream inclusion
42+
'snyk:lic:golang:github.com:hashicorp:go-retryablehttp:MPL-2.0':
43+
- '*':
44+
reason: upstream inclusion
45+
'snyk:lic:golang:github.com:hashicorp:go-multierror:MPL-2.0':
46+
- '*':
47+
reason: upstream inclusion
48+
'snyk:lic:golang:github.com:hashicorp:go-immutable-radix:MPL-2.0':
49+
- '*':
50+
reason: upstream inclusion
51+
'snyk:lic:golang:github.com:hashicorp:go-getter:v2:MPL-2.0':
52+
- '*':
53+
reason: upstream inclusion
54+
'snyk:lic:golang:github.com:hashicorp:go-getter:s3:v2:MPL-2.0':
55+
- '*':
56+
reason: upstream inclusion
57+
'snyk:lic:golang:github.com:hashicorp:go-getter:gcs:v2:MPL-2.0':
58+
- '*':
59+
reason: upstream inclusion
60+
'snyk:lic:golang:github.com:hashicorp:go-cleanhttp:MPL-2.0':
61+
- '*':
62+
reason: upstream inclusion
63+
'snyk:lic:golang:github.com:hashicorp:errwrap:MPL-2.0':
64+
- '*':
65+
reason: upstream inclusion
66+
'snyk:lic:golang:github.com:hashicorp:consul:api:MPL-2.0':
67+
- '*':
68+
reason: upstream inclusion
669
patch: {}

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ See updating [Changelog example here](https://keepachangelog.com/en/1.0.0/)
55

66
## [Unreleased]
77

8+
### Fixed
9+
10+
- Update Go version to 1.24 and fix security vulnerabilities
11+
12+
### Changed
13+
14+
- Update `packer-plugin-sdk` to [v0.6.1](https://github.com/hashicorp/packer-plugin-sdk/releases/tag/v0.6.1)
15+
816
## [1.5.3] - 2024-01-02
917

1018
### Fixed

Makefile

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1-
BINARY=packer-plugin-upcloud
1+
BINARY_NAME=packer-plugin-upcloud
22
HASHICORP_PACKER_PLUGIN_SDK_VERSION?=$(shell go list -m github.com/hashicorp/packer-plugin-sdk | cut -d " " -f2)
33
COUNT?=1
44
TEST?=$(shell go list ./...)
5+
PLUGIN_FQN="$(shell grep -E '^module' <go.mod | sed -E 's/module *//')"
6+
7+
ifeq ($(OS),Windows_NT)
8+
BINARY_EXT=.exe
9+
else
10+
BINARY_EXT=
11+
endif
12+
BINARY=${BINARY_NAME}${BINARY_EXT}
513

614
ifeq (,$(shell go env GOBIN))
715
GOBIN=$(shell go env GOPATH)/bin
@@ -18,16 +26,15 @@ default: build
1826
test:
1927
@go test -race -count $(COUNT) $(TEST) -timeout=3m
2028

21-
test_integration: build
22-
cp $(BINARY) builder/upcloud/
29+
test_integration: build install
30+
2331
PACKER_ACC=1 go test -count 1 -v $(TESTARGS) ./... -timeout=120m
2432

2533
build:
26-
go build -v
34+
@go build -v -o ${BINARY}
2735

2836
install: build
29-
@mkdir -p ~/.packer.d/plugins
30-
install $(BINARY) ~/.packer.d/plugins/
37+
packer plugins install --path ${BINARY} "$(shell echo "${PLUGIN_FQN}" | sed 's/packer-plugin-//')"
3138

3239
install-packer-sdc: ## Install packer sofware development command
3340
go install github.com/hashicorp/packer-plugin-sdk/cmd/packer-sdc@$(HASHICORP_PACKER_PLUGIN_SDK_VERSION)

0 commit comments

Comments
 (0)