-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into cdcr-backend-grpc
* master: (85 commits) UI icon - add size (#6736) Add Priority Queue library to sdk (#6664) Add spellcheck="false" to form fields (#6744) Maximum typo in Vault UI (#6743) docs: Fix Markdown formatting error in AWS Auth (#6745) changelog++ Update OIDC Provider Setup docs (#6739) Update to use newer sdk Copy LogInput from audit package, add OptMarshaler interface (#6735) docs: fixed typo (#6732) Fix typo changelog++ Use Go modules in CircleCI (#6729) Fix recovery key backup path documentation Vendoring updated grpc Add link to R client on libraries list (#6722) UI ember engines (#6718) changelog++ Update grpc and protos (#6725) changelog++ ...
- Loading branch information
Showing
664 changed files
with
8,497 additions
and
4,083 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,204 @@ | ||
version: 2 | ||
|
||
references: | ||
images: | ||
go: &GOLANG_IMAGE golang:1.12.4-stretch # Pin Go to patch version (ex: 1.2.3) | ||
node: &NODE_IMAGE node:10-stretch # Pin Node.js to major version (ex: 10) | ||
|
||
environment: &ENVIRONMENT | ||
CIRCLECI_CLI_VERSION: 0.1.5546 # Pin CircleCI CLI to patch version (ex: 1.2.3) | ||
GO_VERSION: 1.12.4 # Pin Go to patch version (ex: 1.2.3) | ||
GOTESTSUM_VERSION: 0.3.3 # Pin gotestsum to patch version (ex: 1.2.3) | ||
|
||
cache: | ||
go-sum: &GO_SUM_CACHE_KEY go-sum-v1-{{ checksum "go.sum" }} | ||
yarn-lock: &YARN_LOCK_CACHE_KEY yarn-lock-v1-{{ checksum "ui/yarn.lock" }} | ||
|
||
jobs: | ||
install-ui-dependencies: | ||
docker: | ||
- image: *NODE_IMAGE | ||
working_directory: /src | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
key: *YARN_LOCK_CACHE_KEY | ||
- run: | ||
name: Install UI dependencies | ||
command: | | ||
set -eux -o pipefail | ||
cd ui | ||
yarn install --ignore-optional | ||
npm rebuild node-sass | ||
- save_cache: | ||
key: *YARN_LOCK_CACHE_KEY | ||
paths: | ||
- ui/node_modules | ||
|
||
go-mod-download: | ||
docker: | ||
- image: *GOLANG_IMAGE | ||
working_directory: /src | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
key: *GO_SUM_CACHE_KEY | ||
- run: | ||
name: Download Go modules | ||
command: go mod download | ||
- run: | ||
name: Verify checksums of Go modules | ||
command: go mod verify | ||
- save_cache: | ||
key: *GO_SUM_CACHE_KEY | ||
paths: | ||
- /go/pkg/mod | ||
|
||
build-go-dev: | ||
docker: | ||
- image: *GOLANG_IMAGE | ||
working_directory: /src | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
key: *GO_SUM_CACHE_KEY | ||
- run: | ||
name: Build dev binary | ||
command: | | ||
set -eux -o pipefail | ||
# Move dev UI assets to expected location | ||
rm -rf ./pkg | ||
mkdir ./pkg | ||
# Build dev binary | ||
make bootstrap dev | ||
- persist_to_workspace: | ||
root: . | ||
paths: | ||
- bin | ||
|
||
test-ui: | ||
docker: | ||
- image: *NODE_IMAGE | ||
working_directory: /src | ||
resource_class: medium+ | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
key: *YARN_LOCK_CACHE_KEY | ||
- attach_workspace: | ||
at: . | ||
- run: | ||
name: Test UI | ||
command: | | ||
set -eux -o pipefail | ||
# 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} | ||
# Run Ember tests | ||
cd ui | ||
mkdir -p test-results/qunit | ||
yarn run test-oss | ||
- store_artifacts: | ||
path: ui/test-results | ||
- store_test_results: | ||
path: ui/test-results | ||
|
||
test-go: | ||
machine: true | ||
environment: | ||
<<: *ENVIRONMENT | ||
GO_TAGS: | ||
parallelism: 2 | ||
working_directory: ~/src | ||
steps: | ||
- checkout | ||
- run: | ||
name: Allow circleci user to restore Go modules cache | ||
command: | | ||
set -eux -o pipefail | ||
sudo mkdir /go | ||
sudo chown -R circleci:circleci /go | ||
- restore_cache: | ||
key: *GO_SUM_CACHE_KEY | ||
- run: | ||
name: Run Go tests | ||
command: | | ||
set -eux -o pipefail | ||
# Install Go | ||
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" | ||
rm -f "go${GO_VERSION}.linux-amd64.tar.gz" | ||
export GOPATH=/go | ||
export PATH="${PATH}:${GOPATH}/bin:/usr/local/go/bin" | ||
# Install CircleCI CLI | ||
curl -sSL \ | ||
"https://github.com/CircleCI-Public/circleci-cli/releases/download/v${CIRCLECI_CLI_VERSION}/circleci-cli_${CIRCLECI_CLI_VERSION}_linux_amd64.tar.gz" \ | ||
| sudo tar --overwrite -xz \ | ||
-C /usr/local/bin \ | ||
"circleci-cli_${CIRCLECI_CLI_VERSION}_linux_amd64/circleci" | ||
# Split Go tests by prior test times | ||
package_names=$(go list \ | ||
-tags "${GO_TAGS}" \ | ||
./... \ | ||
| grep -v /vendor/ \ | ||
| sort \ | ||
| circleci tests split --split-by=timings --timings-type=classname) | ||
# Install gotestsum | ||
curl -sSL "https://github.com/gotestyourself/gotestsum/releases/download/v${GOTESTSUM_VERSION}/gotestsum_${GOTESTSUM_VERSION}_linux_amd64.tar.gz" \ | ||
| sudo tar --overwrite -xz -C /usr/local/bin gotestsum | ||
# Run tests | ||
make prep | ||
mkdir -p test-results/go-test | ||
CGO_ENABLED= \ | ||
VAULT_ADDR= \ | ||
VAULT_TOKEN= \ | ||
VAULT_DEV_ROOT_TOKEN_ID= \ | ||
VAULT_ACC= \ | ||
gotestsum --format=short-verbose --junitfile test-results/go-test/results.xml -- \ | ||
-tags "${GO_TAGS}" \ | ||
-timeout=40m \ | ||
-parallel=20 \ | ||
${package_names} | ||
- store_artifacts: | ||
path: test-results | ||
- store_test_results: | ||
path: test-results | ||
|
||
workflows: | ||
version: 2 | ||
|
||
ci: | ||
jobs: | ||
- install-ui-dependencies | ||
- go-mod-download | ||
- build-go-dev: | ||
requires: | ||
- go-mod-download | ||
- test-ui: | ||
requires: | ||
- install-ui-dependencies | ||
- build-go-dev | ||
- test-go: | ||
requires: | ||
- build-go-dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.