Skip to content

Commit

Permalink
backport of commit c8c138f
Browse files Browse the repository at this point in the history
  • Loading branch information
averche committed Aug 12, 2022
1 parent be4131f commit 676722f
Show file tree
Hide file tree
Showing 545 changed files with 4,959 additions and 14,781 deletions.
80 changes: 62 additions & 18 deletions .circleci/config.yml

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

2 changes: 1 addition & 1 deletion .circleci/config/commands/go_test.yml
Expand Up @@ -14,7 +14,7 @@ parameters:
default: false
go_image:
type: string
default: "docker.mirror.hashicorp.services/cimg/go:1.18.4"
default: "docker.mirror.hashicorp.services/cimg/go:1.17.12"
use_docker:
type: boolean
default: false
Expand Down
14 changes: 14 additions & 0 deletions .circleci/config/commands/setup-semgrep.yml
@@ -0,0 +1,14 @@
---
description: >
Ensure semgrep is installed.
steps:
- run:
working_directory: ~/
name: Setup Semgrep
command: |
apk add --no-cache python3 py3-pip make
python3 -m pip install --user semgrep==0.86.5
export PATH="$HOME/.local/bin:$PATH"
echo "$ semgrep --version"
semgrep --version
29 changes: 13 additions & 16 deletions .circleci/config/executors/@executors.yml
Expand Up @@ -3,51 +3,48 @@ go-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.18.4 # 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.2.1 # Pin gofumpt to patch version (ex: 1.2.3)
CIRCLECI_CLI_VERSION: 0.1.5546 # Pin CircleCI CLI 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)
GOFUMPT_VERSION: 0.2.1 # Pin gofumpt to patch version (ex: 1.2.3)
GO_TAGS: ""
working_directory: /home/circleci/go/src/github.com/hashicorp/vault
node:
docker:
- image: docker.mirror.hashicorp.services/circleci/node:14-browsers
environment:
# See https://git.io/vdao3 for details.
JOBS: 2
- image: docker.mirror.hashicorp.services/node:14-buster
shell: /usr/bin/env bash -euo pipefail -c
working_directory: /home/circleci/go/src/github.com/hashicorp/vault
python:
docker:
- image: docker.mirror.hashicorp.services/python:3-alpine
shell: /usr/bin/env bash -euo pipefail -c
working_directory: /home/circleci/go/src/github.com/hashicorp/vault
semgrep:
alpine:
docker:
- image: docker.mirror.hashicorp.services/returntocorp/semgrep:0.106.0
- image: docker.mirror.hashicorp.services/alpine:3.13
shell: /bin/sh
working_directory: /home/circleci/go/src/github.com/hashicorp/vault
docker-env-go-test-remote-docker:
resource_class: medium
docker:
- image: "docker.mirror.hashicorp.services/cimg/go:1.18.4"
- 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)
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.18.4"
- 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)
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.18.4"
- 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)
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
3 changes: 2 additions & 1 deletion .circleci/config/jobs/semgrep.yml
@@ -1,6 +1,7 @@
---
executor: semgrep
executor: alpine
steps:
- setup-semgrep
- checkout
- attach_workspace:
at: .
Expand Down
13 changes: 13 additions & 0 deletions .circleci/config/jobs/test-ui-browserstack.yml
@@ -0,0 +1,13 @@
executor: node
resource_class: xlarge
steps:
- checkout
- restore_yarn_cache
- attach_workspace:
at: .
- run:
name: Run Browserstack Tests
command: |
# Add ./bin to the PATH so vault binary can be found.
export PATH="${PWD}"/bin:${PATH}
make test-ui-browserstack
12 changes: 12 additions & 0 deletions .circleci/config/jobs/test-ui.yml
Expand Up @@ -9,6 +9,18 @@ steps:
- run:
name: Test UI
command: |
set -x
# Install Chrome
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub \
| apt-key add -
echo "deb http://dl.google.com/linux/chrome/deb/ stable main" \
| tee /etc/apt/sources.list.d/google-chrome.list
apt-get update
apt-get -y install google-chrome-stable
rm /etc/apt/sources.list.d/google-chrome.list
rm -rf /var/lib/apt/lists/* /var/cache/apt/*
# Add ./bin to the PATH so vault binary can be run by Ember tests
export PATH="${PWD}/bin:${PATH}"
Expand Down
12 changes: 10 additions & 2 deletions .circleci/config/workflows/ci.yml
Expand Up @@ -14,6 +14,14 @@ jobs:
# Only main, UI, release and merge branches need to run UI tests.
# We don't filter here however because test-ui is configured in github as
# required so it must run, instead we short-circuit within test-ui.
- test-ui-browserstack:
requires:
- install-ui-dependencies
- build-go-dev
filters:
branches:
# Forked pull requests have CIRCLE_BRANCH set to pull/XXX
ignore: /pull\/[0-9]+/
- test-go:
requires:
- pre-flight-checks
Expand All @@ -31,5 +39,5 @@ jobs:
requires:
- pre-flight-checks
- semgrep:
requires:
- pre-flight-checks
requires:
- pre-flight-checks
13 changes: 4 additions & 9 deletions .github/workflows/build.yml
@@ -1,11 +1,6 @@
name: build

on:
workflow_dispatch:
push:
branches-ignore:
- docs/**
- backport/docs/**
on: [ workflow_dispatch, push ]

env:
PKG_NAME: "vault"
Expand Down Expand Up @@ -66,7 +61,7 @@ jobs:
matrix:
goos: [ freebsd, windows, netbsd, openbsd, solaris ]
goarch: [ "386", "amd64", "arm" ]
go: [ "1.18.4" ]
go: [ "1.17.12" ]
exclude:
- goos: solaris
goarch: 386
Expand Down Expand Up @@ -118,7 +113,7 @@ jobs:
matrix:
goos: [linux]
goarch: ["arm", "arm64", "386", "amd64"]
go: ["1.18.4"]
go: ["1.17.12"]
fail-fast: true

name: Go ${{ matrix.go }} ${{ matrix.goos }} ${{ matrix.goarch }} build
Expand Down Expand Up @@ -195,7 +190,7 @@ jobs:
matrix:
goos: [ darwin ]
goarch: [ "amd64", "arm64" ]
go: [ "1.18.4" ]
go: [ "1.17.12" ]
fail-fast: true
name: Go ${{ matrix.go }} ${{ matrix.goos }} ${{ matrix.goarch }} build
steps:
Expand Down

0 comments on commit 676722f

Please sign in to comment.