Skip to content

Commit

Permalink
Merge branch 'release/1.9.x' into backport/docs/typo-premise-to-premi…
Browse files Browse the repository at this point in the history
…ses/hardly-grand-caiman
  • Loading branch information
yhyakuna authored Aug 18, 2022
2 parents 6bc6d4e + 89bd5d5 commit 56da701
Show file tree
Hide file tree
Showing 424 changed files with 4,947 additions and 1,930 deletions.
56 changes: 33 additions & 23 deletions .circleci/config.yml

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

8 changes: 5 additions & 3 deletions .circleci/config/commands/@caches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ restore_go_mod_cache_permissive:
- restore_cache:
name: Restore closest matching go modules cache
keys:
- &gocachekey v1.4-{{checksum "go.sum"}}-{{checksum "sdk/go.sum"}}-{{checksum "api/go.sum"}}
- v1.4-{{checksum "go.sum"}}-{{checksum "sdk/go.sum"}}
- v1.4-{{checksum "go.sum"}}
- &gocachekey v1.5-{{checksum "go.sum"}}-{{checksum "sdk/go.sum"}}-{{checksum "api/go.sum"}}
- v1.5-{{checksum "go.sum"}}-{{checksum "sdk/go.sum"}}
- v1.5-{{checksum "go.sum"}}
restore_go_mod_cache:
steps:
- restore_cache:
Expand All @@ -40,6 +40,8 @@ refresh_go_mod_cache:
- run:
name: go mod download
command: |
# set GOPATH explicitly to download to the right cache
export GOPATH=$HOME/go
# go list ./... forces downloading some additional versions of modules that 'go mod
# download' misses. We need this because we make use of go list itself during
# code generation in later builds that rely on this module cache.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ steps:
name: Check branch name
command: |
case "$CIRCLE_BRANCH" in
main|ui/*|release/*|merge*) ;;
main|ui/*|backport/ui/*|release/*|merge*) ;;
*) # If the branch being tested doesn't match one of the above patterns,
# we don't need to run test-ui and can abort the job.
circleci-agent step halt
Expand Down
2 changes: 1 addition & 1 deletion .circleci/config/commands/go_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ parameters:
default: false
go_image:
type: string
default: "docker.mirror.hashicorp.services/cimg/go:1.17.5"
default: "docker.mirror.hashicorp.services/cimg/go:1.17.12"
use_docker:
type: boolean
default: false
Expand Down
1 change: 1 addition & 0 deletions .circleci/config/commands/setup-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ steps:
rm -f "go${GO_VERSION}.linux-amd64.tar.gz"
GOPATH="/home/circleci/go"
mkdir $GOPATH 2>/dev/null || { sudo mkdir $GOPATH && sudo chmod 777 $GOPATH; }
mkdir $GOPATH/bin 2>/dev/null || { sudo mkdir $GOPATH/bin && sudo chmod 777 $GOPATH/bin; }
echo "export GOPATH='$GOPATH'" >> "$BASH_ENV"
echo "export PATH='$PATH:$GOPATH/bin:/usr/local/go/bin'" >> "$BASH_ENV"
echo "export GOPROXY=<<parameters.GOPROXY>>" >> "$BASH_ENV"
Expand Down
11 changes: 6 additions & 5 deletions .circleci/config/executors/@executors.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
go-machine:
machine: true
machine:
image: ubuntu-2004:202201-02
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.17.5 # Pin Go to patch version (ex: 1.2.3)
GO_VERSION: 1.17.12 # Pin Go to patch version (ex: 1.2.3)
GOTESTSUM_VERSION: 0.5.2 # Pin gotestsum to patch version (ex: 1.2.3)
GO_TAGS: ""
working_directory: /home/circleci/go/src/github.com/hashicorp/vault
Expand All @@ -25,23 +26,23 @@ alpine:
docker-env-go-test-remote-docker:
resource_class: medium
docker:
- image: "docker.mirror.hashicorp.services/cimg/go:1.17.5"
- image: "docker.mirror.hashicorp.services/cimg/go:1.17.12"
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: "docker.mirror.hashicorp.services/cimg/go:1.17.5"
- image: "docker.mirror.hashicorp.services/cimg/go:1.17.12"
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: "docker.mirror.hashicorp.services/cimg/go:1.17.5"
- image: "docker.mirror.hashicorp.services/cimg/go:1.17.12"
environment:
CIRCLECI_CLI_VERSION: 0.1.5546 # Pin CircleCI CLI to patch version (ex: 1.2.3)
GO_TAGS: ""
Expand Down
7 changes: 6 additions & 1 deletion .circleci/config/jobs/pre-flight-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ steps:
. $BASH_ENV
which circleci
circleci version
- run: make ci-verify
- run:
name: Verify CircleCI
command: |
set -x
. $BASH_ENV
make ci-verify
- configure-git
- refresh_go_mod_cache
38 changes: 28 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
name: build

on:
push:
# Sequence of patterns matched against refs/heads
branches:
# Push events on release/1.9.x branch
- release/1.9.x
on: [ workflow_dispatch, push ]

env:
PKG_NAME: "vault"
Expand Down Expand Up @@ -34,7 +29,7 @@ jobs:
uses: actions/checkout@v2
- name: Generate metadata file
id: generate-metadata-file
uses: hashicorp/actions-generate-metadata@main
uses: hashicorp/actions-generate-metadata@v1
with:
version: ${{ needs.get-product-version.outputs.product-version }}
product: ${{ env.PKG_NAME }}
Expand All @@ -51,7 +46,7 @@ jobs:
matrix:
goos: [ freebsd, windows, netbsd, openbsd, solaris ]
goarch: [ "386", "amd64", "arm" ]
go: [ "1.17.5" ]
go: [ "1.17.12" ]
exclude:
- goos: solaris
goarch: 386
Expand Down Expand Up @@ -103,7 +98,7 @@ jobs:
matrix:
goos: [linux]
goarch: ["arm", "arm64", "386", "amd64"]
go: ["1.17.5"]
go: ["1.17.12"]
fail-fast: true

name: Go ${{ matrix.go }} ${{ matrix.goos }} ${{ matrix.goarch }} build
Expand Down Expand Up @@ -180,7 +175,7 @@ jobs:
matrix:
goos: [ darwin ]
goarch: [ "amd64", "arm64" ]
go: [ "1.17.5" ]
go: [ "1.17.12" ]
fail-fast: true
name: Go ${{ matrix.go }} ${{ matrix.goos }} ${{ matrix.goarch }} build
steps:
Expand Down Expand Up @@ -242,3 +237,26 @@ jobs:
tags: |
docker.io/hashicorp/${{env.repo}}:${{env.version}}
public.ecr.aws/hashicorp/${{env.repo}}:${{env.version}}
build-ubi:
name: Red Hat UBI ${{ matrix.arch }} build
needs:
- get-product-version
- build-linux
runs-on: ubuntu-latest
strategy:
matrix:
arch: ["amd64"]
env:
repo: ${{github.event.repository.name}}
version: ${{needs.get-product-version.outputs.product-version}}
steps:
- uses: actions/checkout@v2
- name: Docker Build (Action)
uses: hashicorp/actions-docker-build@v1
with:
version: ${{env.version}}
target: ubi
arch: ${{matrix.arch}}
zip_artifact_name: ${{ env.PKG_NAME }}_${{ needs.get-product-version.outputs.product-version }}_linux_${{ matrix.arch }}.zip
redhat_tag: scan.connect.redhat.com/ospid-f0a92725-d8c6-4023-9a87-ba785b94c3fd/${{env.repo}}:${{env.version}}-ubi
Loading

0 comments on commit 56da701

Please sign in to comment.