From f0a450e024c420a244b44c2cf0c4c12b3e2f65ab Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Wed, 15 Dec 2021 09:15:32 -0500 Subject: [PATCH] Update circleci image to use new cimg namespace with Go1.17 (#93) * Update circleci image to use new cimg namespace with Go1.17 * Update build tags for Go 1.17 ``` make fmt ``` * Fix path to Go working directory on linux --- .circleci/config.yml | 10 +++++----- filelock/filelock.go | 1 + multistep/commonsteps/iso_config_test.go | 1 + packer/cache_config_unix.go | 1 + packer/cache_config_unix_test.go | 1 + packer/cache_config_windows.go | 1 + packer/cache_config_windows_test.go | 1 + pathing/config_file_unix.go | 1 + pathing/config_file_unix_test.go | 1 + pathing/config_file_windows.go | 1 + pathing/config_file_windows_test.go | 1 + sdk-internals/communicator/ssh/communicator_test.go | 1 + template/parse_test.go | 1 + 13 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6131822fd..eaed62b42 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,7 +11,7 @@ environment: &ENVIRONMENT executors: golang: docker: - - image: docker.mirror.hashicorp.services/circleci/golang:1.16 + - image: docker.mirror.hashicorp.services/cimg/go:1.17 resource_class: medium+ darwin: macos: @@ -55,7 +55,7 @@ jobs: test-linux: executor: golang resource_class: large - working_directory: /go/src/github.com/hashicorp/packer-plugin-sdk + working_directory: ~/go/src/github.com/hashicorp/packer-plugin-sdk steps: - checkout - run: make vet @@ -68,14 +68,14 @@ jobs: steps: - install-go-run-tests-unix: GOOS: darwin - GOVERSION: "1.16" + GOVERSION: "1.17" test-windows: executor: name: win/vs2019 shell: bash.exe steps: - install-go-run-tests-windows: - GOVERSION: "1.16" + GOVERSION: "1.17" check-lint: executor: golang resource_class: xlarge @@ -92,7 +92,7 @@ jobs: - run: make fmt-check check-generate: executor: golang - working_directory: /go/src/github.com/hashicorp/packer-plugin-sdk + working_directory: ~/go/src/github.com/hashicorp/packer-plugin-sdk steps: - checkout - run: make generate-check diff --git a/filelock/filelock.go b/filelock/filelock.go index c83816ee6..0949ded60 100644 --- a/filelock/filelock.go +++ b/filelock/filelock.go @@ -1,3 +1,4 @@ +//go:build !solaris // +build !solaris package filelock diff --git a/multistep/commonsteps/iso_config_test.go b/multistep/commonsteps/iso_config_test.go index cdf97aa6f..6cb674991 100644 --- a/multistep/commonsteps/iso_config_test.go +++ b/multistep/commonsteps/iso_config_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package commonsteps diff --git a/packer/cache_config_unix.go b/packer/cache_config_unix.go index 51d3318c3..f05dd1677 100644 --- a/packer/cache_config_unix.go +++ b/packer/cache_config_unix.go @@ -1,3 +1,4 @@ +//go:build darwin || freebsd || linux || netbsd || openbsd || solaris // +build darwin freebsd linux netbsd openbsd solaris package packer diff --git a/packer/cache_config_unix_test.go b/packer/cache_config_unix_test.go index 4473419b1..ec7cb1bb0 100644 --- a/packer/cache_config_unix_test.go +++ b/packer/cache_config_unix_test.go @@ -1,3 +1,4 @@ +//go:build darwin || freebsd || linux || netbsd || openbsd || solaris // +build darwin freebsd linux netbsd openbsd solaris package packer diff --git a/packer/cache_config_windows.go b/packer/cache_config_windows.go index d6ca1f85d..a5b128c28 100644 --- a/packer/cache_config_windows.go +++ b/packer/cache_config_windows.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package packer diff --git a/packer/cache_config_windows_test.go b/packer/cache_config_windows_test.go index da052cab2..92e8dcb50 100644 --- a/packer/cache_config_windows_test.go +++ b/packer/cache_config_windows_test.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package packer diff --git a/pathing/config_file_unix.go b/pathing/config_file_unix.go index 8dd47caca..8396e9f62 100644 --- a/pathing/config_file_unix.go +++ b/pathing/config_file_unix.go @@ -1,3 +1,4 @@ +//go:build darwin || freebsd || linux || netbsd || openbsd || solaris // +build darwin freebsd linux netbsd openbsd solaris package pathing diff --git a/pathing/config_file_unix_test.go b/pathing/config_file_unix_test.go index 52ee01a79..a6b1ad910 100644 --- a/pathing/config_file_unix_test.go +++ b/pathing/config_file_unix_test.go @@ -1,3 +1,4 @@ +//go:build darwin || freebsd || linux || netbsd || openbsd || solaris // +build darwin freebsd linux netbsd openbsd solaris package pathing diff --git a/pathing/config_file_windows.go b/pathing/config_file_windows.go index d7b27365a..b19f73c5a 100644 --- a/pathing/config_file_windows.go +++ b/pathing/config_file_windows.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package pathing diff --git a/pathing/config_file_windows_test.go b/pathing/config_file_windows_test.go index c2b64ecdc..1e03c9157 100644 --- a/pathing/config_file_windows_test.go +++ b/pathing/config_file_windows_test.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package pathing diff --git a/sdk-internals/communicator/ssh/communicator_test.go b/sdk-internals/communicator/ssh/communicator_test.go index dad835901..9d1680755 100644 --- a/sdk-internals/communicator/ssh/communicator_test.go +++ b/sdk-internals/communicator/ssh/communicator_test.go @@ -1,3 +1,4 @@ +//go:build !race // +build !race package ssh diff --git a/template/parse_test.go b/template/parse_test.go index 2dc7acde9..b79dc59f2 100644 --- a/template/parse_test.go +++ b/template/parse_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package template