Skip to content

Commit

Permalink
backport of commit 0f0fe19
Browse files Browse the repository at this point in the history
  • Loading branch information
ccapurso committed Nov 22, 2022
1 parent 4690c54 commit ca7e290
Show file tree
Hide file tree
Showing 1,299 changed files with 21,732 additions and 206,567 deletions.
41 changes: 13 additions & 28 deletions .circleci/config.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion .circleci/config/commands/go_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ parameters:
save_cache:
type: boolean
default: false
go_image:
type: string
default: "docker.mirror.hashicorp.services/cimg/go:1.19.2"
use_docker:
type: boolean
default: false
Expand Down Expand Up @@ -134,7 +137,7 @@ steps:
-e NO_PROXY \
-e VAULT_TEST_LOG_DIR=<< parameters.log_dir >> \
--network ${TEST_DOCKER_NETWORK_NAME} \
$GO_IMAGE \
<< parameters.go_image >> \
tail -f /dev/null)"
mkdir workspace
echo ${CONTAINER_ID} > workspace/container_id
Expand Down
3 changes: 1 addition & 2 deletions .circleci/config/commands/setup-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,11 @@ parameters:
default: github.com/hashicorp/*
steps:
- run:
working_directory: ~/
name: Setup Go
command: |
GO_VERSION=$(cat .go-version)
[ -n "$GO_VERSION" ] || { echo "You must set GO_VERSION"; exit 1; }
# Install Go
cd ~
curl -sSLO "https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go${GO_VERSION}.linux-amd64.tar.gz"
Expand Down
33 changes: 18 additions & 15 deletions .circleci/config/executors/@executors.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
references:
environment: &ENVIRONMENT
CIRCLECI_CLI_VERSION: 0.1.5546 # Pin CircleCI CLI to patch version (ex: 1.2.3)
GOTESTSUM_VERSION: 0.5.2 # Pin gotestsum to patch version (ex: 1.2.3)
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.2"

go-machine:
machine:
image: ubuntu-2004:202201-02
environment: *ENVIRONMENT
shell: /usr/bin/env bash -euo pipefail -c
environment:
CIRCLECI_CLI_VERSION: 0.1.5546 # Pin CircleCI CLI to patch version (ex: 1.2.3)
GO_VERSION: 1.19.2 # Pin Go to patch version (ex: 1.2.3)
GOTESTSUM_VERSION: 0.5.2 # Pin gotestsum to patch version (ex: 1.2.3)
GOFUMPT_VERSION: 0.3.1 # Pin gofumpt to patch version (ex: 1.2.3)
GO_TAGS: ""
working_directory: /home/circleci/go/src/github.com/hashicorp/vault
node:
docker:
Expand All @@ -33,18 +30,24 @@ semgrep:
docker-env-go-test-remote-docker:
resource_class: medium
docker:
- image: *GO_IMAGE
environment: *ENVIRONMENT
- image: "docker.mirror.hashicorp.services/cimg/go:1.19.2"
environment:
CIRCLECI_CLI_VERSION: 0.1.5546 # Pin CircleCI CLI to patch version (ex: 1.2.3)
GO_TAGS: ""
working_directory: /home/circleci/go/src/github.com/hashicorp/vault
docker-env-go-test:
resource_class: large
docker:
- image: *GO_IMAGE
environment: *ENVIRONMENT
- image: "docker.mirror.hashicorp.services/cimg/go:1.19.2"
environment:
CIRCLECI_CLI_VERSION: 0.1.5546 # Pin CircleCI CLI to patch version (ex: 1.2.3)
GO_TAGS: ""
working_directory: /home/circleci/go/src/github.com/hashicorp/vault
docker-env-go-test-race:
resource_class: xlarge
docker:
- image: *GO_IMAGE
environment: *ENVIRONMENT
- image: "docker.mirror.hashicorp.services/cimg/go:1.19.2"
environment:
CIRCLECI_CLI_VERSION: 0.1.5546 # Pin CircleCI CLI to patch version (ex: 1.2.3)
GO_TAGS: ""
working_directory: /home/circleci/go/src/github.com/hashicorp/vault
2 changes: 1 addition & 1 deletion .circleci/config/jobs/build-go-dev.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
executor: go-machine
steps:
- checkout
- setup-go
- checkout
- restore_go_mod_cache
- attach_workspace:
at: .
Expand Down
2 changes: 1 addition & 1 deletion .circleci/config/jobs/fmt.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
description: Ensure go formatting is correct.
executor: go-machine
steps:
- checkout
# Setup Go enabling the proxy for downloading modules.
- setup-go:
GOPROXY: https://proxy.golang.org,direct
- checkout
- run:
name: make fmt
command: |
Expand Down
2 changes: 1 addition & 1 deletion .circleci/config/jobs/pre-flight-checks.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
description: Ensure nothing obvious is broken, and pre-cache Go modules.
executor: go-machine
steps:
- checkout
# Setup Go enabling the proxy for downloading modules.
- setup-go:
GOPROXY: https://proxy.golang.org,direct
- checkout
- run:
name: Install CircleCI CLI
environment:
Expand Down
2 changes: 1 addition & 1 deletion .circleci/config/jobs/test-go-nightly.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
executor: go-machine
steps:
- checkout
- setup-go
- checkout
- restore_go_mod_cache
- go_test:
log_dir: "/tmp/testlogs"
Expand Down
24 changes: 24 additions & 0 deletions .github/enos-run-matrices/ent.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"include": [
{
"scenario": "smoke backend:consul consul_version:1.12.3 distro:ubuntu seal:awskms arch:amd64 builder:crt edition:ent",
"aws_region": "us-west-1"
},
{
"scenario": "smoke backend:raft consul_version:1.12.3 distro:ubuntu seal:shamir arch:amd64 builder:crt edition:ent",
"aws_region": "us-west-2"
},
{
"scenario": "upgrade backend:raft consul_version:1.11.7 distro:rhel seal:shamir arch:amd64 builder:crt edition:ent",
"aws_region": "us-west-1"
},
{
"scenario": "upgrade backend:consul consul_version:1.11.7 distro:rhel seal:awskms arch:amd64 builder:crt edition:ent",
"aws_region": "us-west-2"
},
{
"scenario": "autopilot distro:ubuntu seal:shamir arch:amd64 builder:crt edition:ent",
"aws_region": "us-west-1"
}
]
}
20 changes: 20 additions & 0 deletions .github/enos-run-matrices/oss.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"include": [
{
"scenario": "smoke backend:consul consul_version:1.12.3 distro:ubuntu seal:awskms arch:amd64 builder:crt edition:oss",
"aws_region": "us-west-1"
},
{
"scenario": "smoke backend:raft consul_version:1.12.3 distro:ubuntu seal:shamir arch:amd64 builder:crt edition:oss",
"aws_region": "us-west-2"
},
{
"scenario": "upgrade backend:raft consul_version:1.11.7 distro:rhel seal:shamir arch:amd64 builder:crt edition:oss",
"aws_region": "us-west-1"
},
{
"scenario": "upgrade backend:consul consul_version:1.11.7 distro:rhel seal:awskms arch:amd64 builder:crt edition:oss",
"aws_region": "us-west-2"
}
]
}
4 changes: 2 additions & 2 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
backport-targeted-release-branch:
if: github.event.pull_request.merged
runs-on: ubuntu-latest
container: hashicorpdev/backport-assistant:0.3.0
container: hashicorpdev/backport-assistant:0.2.5
steps:
- name: Backport changes to targeted release branch
run: |
backport-assistant backport -merge-method=squash -gh-automerge
backport-assistant backport
env:
BACKPORT_LABEL_REGEXP: "backport/(?P<target>\\d+\\.\\d+\\.[+\\w]+)"
BACKPORT_TARGET_TEMPLATE: "release/{{.target}}"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build-vault-oss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ jobs:
GOARCH: ${{ inputs.goarch }}
GOOS: ${{ inputs.goos }}
GO_TAGS: ${{ inputs.go-tags }}
# We started stripping symbol tables in 1.13.x
KEEP_SYMBOLS: true
run: make crt-build
- name: Determine artifact basename
env:
Expand Down

0 comments on commit ca7e290

Please sign in to comment.