Simplify go version update (#17821)
* make ci-config now updates @executors based on go-version * Update to latest ubuntu-2004 for machine executors.
This commit is contained in:
parent
12e1b609ac
commit
547cb27b8a
|
@ -35,6 +35,8 @@ CONFIG_SOURCE := Makefile $(SOURCE_YML) | $(SOURCE_DIR)
|
|||
OUT := config.yml
|
||||
TMP := .tmp/config-processed
|
||||
CONFIG_PACKED := .tmp/config-packed
|
||||
GO_VERSION_FILE := ../.go-version
|
||||
GO_VERSION := $(shell cat $(GO_VERSION_FILE))
|
||||
|
||||
default: help
|
||||
|
||||
|
@ -54,7 +56,7 @@ $(SOURCE_DIR):
|
|||
$(shell [ -d .tmp ] || mkdir .tmp)
|
||||
|
||||
.PHONY: $(CONFIG)
|
||||
$(CONFIG): $(OUT)
|
||||
$(CONFIG): $(OUT) $(GO_VERSION_FILE)
|
||||
|
||||
.PHONY: $(VERIFY)
|
||||
$(VERIFY): config-up-to-date
|
||||
|
@ -72,6 +74,8 @@ export GENERATED_FILE_HEADER
|
|||
# it them moves that file to $@. This makes is an atomic operation, so if it fails
|
||||
# make doesn't consider a half-baked file up to date.
|
||||
define GEN_CONFIG
|
||||
@yq -i ".references.environment.GO_IMAGE = \"docker.mirror.hashicorp.services/cimg/go:$(GO_VERSION)\"" $(SOURCE_DIR)/executors/\@executors.yml
|
||||
|
||||
@$(CIRCLECI) config pack $(SOURCE_DIR) > $(CONFIG_PACKED)
|
||||
@echo "$$GENERATED_FILE_HEADER" > $@.tmp || { rm -f $@; exit 1; }
|
||||
@$(CIRCLECI) config process $(CONFIG_PACKED) >> $@.tmp || { rm -f $@.tmp; exit 1; }
|
||||
|
|
|
@ -73,7 +73,7 @@ jobs:
|
|||
path: ui/test-results
|
||||
build-go-dev:
|
||||
machine:
|
||||
image: ubuntu-2004:202201-02
|
||||
image: ubuntu-2004:2022.10.1
|
||||
shell: /usr/bin/env bash -euo pipefail -c
|
||||
working_directory: /home/circleci/go/src/github.com/hashicorp/vault
|
||||
steps:
|
||||
|
@ -358,7 +358,7 @@ jobs:
|
|||
- GOTESTSUM_VERSION: 0.5.2
|
||||
fmt:
|
||||
machine:
|
||||
image: ubuntu-2004:202201-02
|
||||
image: ubuntu-2004:2022.10.1
|
||||
shell: /usr/bin/env bash -euo pipefail -c
|
||||
working_directory: /home/circleci/go/src/github.com/hashicorp/vault
|
||||
steps:
|
||||
|
@ -858,7 +858,7 @@ jobs:
|
|||
name: Run Semgrep Rules
|
||||
pre-flight-checks:
|
||||
machine:
|
||||
image: ubuntu-2004:202201-02
|
||||
image: ubuntu-2004:2022.10.1
|
||||
shell: /usr/bin/env bash -euo pipefail -c
|
||||
working_directory: /home/circleci/go/src/github.com/hashicorp/vault
|
||||
steps:
|
||||
|
|
|
@ -5,10 +5,9 @@ references:
|
|||
GOFUMPT_VERSION: 0.3.1 # Pin gofumpt to patch version (ex: 1.2.3)
|
||||
GO_TAGS: ""
|
||||
GO_IMAGE: &GO_IMAGE "docker.mirror.hashicorp.services/cimg/go:1.19.3"
|
||||
|
||||
go-machine:
|
||||
machine:
|
||||
image: ubuntu-2004:202201-02
|
||||
image: ubuntu-2004:2022.10.1
|
||||
environment: *ENVIRONMENT
|
||||
shell: /usr/bin/env bash -euo pipefail -c
|
||||
working_directory: /home/circleci/go/src/github.com/hashicorp/vault
|
||||
|
|
Loading…
Reference in New Issue