mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-29 17:52:32 +00:00
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:
@@ -35,6 +35,8 @@ CONFIG_SOURCE := Makefile $(SOURCE_YML) | $(SOURCE_DIR)
|
|||||||
OUT := config.yml
|
OUT := config.yml
|
||||||
TMP := .tmp/config-processed
|
TMP := .tmp/config-processed
|
||||||
CONFIG_PACKED := .tmp/config-packed
|
CONFIG_PACKED := .tmp/config-packed
|
||||||
|
GO_VERSION_FILE := ../.go-version
|
||||||
|
GO_VERSION := $(shell cat $(GO_VERSION_FILE))
|
||||||
|
|
||||||
default: help
|
default: help
|
||||||
|
|
||||||
@@ -54,7 +56,7 @@ $(SOURCE_DIR):
|
|||||||
$(shell [ -d .tmp ] || mkdir .tmp)
|
$(shell [ -d .tmp ] || mkdir .tmp)
|
||||||
|
|
||||||
.PHONY: $(CONFIG)
|
.PHONY: $(CONFIG)
|
||||||
$(CONFIG): $(OUT)
|
$(CONFIG): $(OUT) $(GO_VERSION_FILE)
|
||||||
|
|
||||||
.PHONY: $(VERIFY)
|
.PHONY: $(VERIFY)
|
||||||
$(VERIFY): config-up-to-date
|
$(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
|
# 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.
|
# make doesn't consider a half-baked file up to date.
|
||||||
define GEN_CONFIG
|
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)
|
@$(CIRCLECI) config pack $(SOURCE_DIR) > $(CONFIG_PACKED)
|
||||||
@echo "$$GENERATED_FILE_HEADER" > $@.tmp || { rm -f $@; exit 1; }
|
@echo "$$GENERATED_FILE_HEADER" > $@.tmp || { rm -f $@; exit 1; }
|
||||||
@$(CIRCLECI) config process $(CONFIG_PACKED) >> $@.tmp || { rm -f $@.tmp; exit 1; }
|
@$(CIRCLECI) config process $(CONFIG_PACKED) >> $@.tmp || { rm -f $@.tmp; exit 1; }
|
||||||
|
|||||||
6
.circleci/config.yml
generated
6
.circleci/config.yml
generated
@@ -73,7 +73,7 @@ jobs:
|
|||||||
path: ui/test-results
|
path: ui/test-results
|
||||||
build-go-dev:
|
build-go-dev:
|
||||||
machine:
|
machine:
|
||||||
image: ubuntu-2004:202201-02
|
image: ubuntu-2004:2022.10.1
|
||||||
shell: /usr/bin/env bash -euo pipefail -c
|
shell: /usr/bin/env bash -euo pipefail -c
|
||||||
working_directory: /home/circleci/go/src/github.com/hashicorp/vault
|
working_directory: /home/circleci/go/src/github.com/hashicorp/vault
|
||||||
steps:
|
steps:
|
||||||
@@ -358,7 +358,7 @@ jobs:
|
|||||||
- GOTESTSUM_VERSION: 0.5.2
|
- GOTESTSUM_VERSION: 0.5.2
|
||||||
fmt:
|
fmt:
|
||||||
machine:
|
machine:
|
||||||
image: ubuntu-2004:202201-02
|
image: ubuntu-2004:2022.10.1
|
||||||
shell: /usr/bin/env bash -euo pipefail -c
|
shell: /usr/bin/env bash -euo pipefail -c
|
||||||
working_directory: /home/circleci/go/src/github.com/hashicorp/vault
|
working_directory: /home/circleci/go/src/github.com/hashicorp/vault
|
||||||
steps:
|
steps:
|
||||||
@@ -858,7 +858,7 @@ jobs:
|
|||||||
name: Run Semgrep Rules
|
name: Run Semgrep Rules
|
||||||
pre-flight-checks:
|
pre-flight-checks:
|
||||||
machine:
|
machine:
|
||||||
image: ubuntu-2004:202201-02
|
image: ubuntu-2004:2022.10.1
|
||||||
shell: /usr/bin/env bash -euo pipefail -c
|
shell: /usr/bin/env bash -euo pipefail -c
|
||||||
working_directory: /home/circleci/go/src/github.com/hashicorp/vault
|
working_directory: /home/circleci/go/src/github.com/hashicorp/vault
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
@@ -5,10 +5,9 @@ references:
|
|||||||
GOFUMPT_VERSION: 0.3.1 # Pin gofumpt to patch version (ex: 1.2.3)
|
GOFUMPT_VERSION: 0.3.1 # Pin gofumpt to patch version (ex: 1.2.3)
|
||||||
GO_TAGS: ""
|
GO_TAGS: ""
|
||||||
GO_IMAGE: &GO_IMAGE "docker.mirror.hashicorp.services/cimg/go:1.19.3"
|
GO_IMAGE: &GO_IMAGE "docker.mirror.hashicorp.services/cimg/go:1.19.3"
|
||||||
|
|
||||||
go-machine:
|
go-machine:
|
||||||
machine:
|
machine:
|
||||||
image: ubuntu-2004:202201-02
|
image: ubuntu-2004:2022.10.1
|
||||||
environment: *ENVIRONMENT
|
environment: *ENVIRONMENT
|
||||||
shell: /usr/bin/env bash -euo pipefail -c
|
shell: /usr/bin/env bash -euo pipefail -c
|
||||||
working_directory: /home/circleci/go/src/github.com/hashicorp/vault
|
working_directory: /home/circleci/go/src/github.com/hashicorp/vault
|
||||||
|
|||||||
Reference in New Issue
Block a user