Skip to content

Commit

Permalink
backport of commit a07f28a
Browse files Browse the repository at this point in the history
  • Loading branch information
AnPucel committed Apr 20, 2022
1 parent 6b3c594 commit 3346c6c
Show file tree
Hide file tree
Showing 2,382 changed files with 62,093 additions and 93,568 deletions.
174 changes: 78 additions & 96 deletions .circleci/config.yml

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

14 changes: 7 additions & 7 deletions .circleci/config/commands/go_test.yml
Expand Up @@ -38,7 +38,7 @@ steps:
environment:
GOPRIVATE: 'github.com/hashicorp/*'
command: |
set -exo pipefail
set -x
EXTRA_TAGS=
case "<< parameters.extra_flags >>" in
Expand All @@ -65,21 +65,21 @@ steps:
for dir in "${modules[@]}"
do
pushd "$dir"
# On its own line so that -e will fail the tests if we detect errors here.
go list -test -json ./... > test-list.json
# Split Go tests by prior test times. If use_docker is true, only run
# tests that depend on docker, otherwise only those that don't.
# The appended true condition ensures the command will succeed if no packages are found
if [ $USE_DOCKER == 1 ]; then
package_names=$(< test-list.json jq -r 'select(.Deps != null) |
package_names=$(go list -test -json ./... |
jq -r 'select(.Deps != null) |
select(any(.Deps[] ; contains("github.com/hashicorp/vault/helper/testhelpers/docker"))) |
.ForTest | select(. != null)' |
sort -u | grep -v vault/integ | circleci tests split --split-by=timings --timings-type=classname || true)
sort -u | grep -v vault/integ | circleci tests split --split-by=timings --timings-type=classname) || true
else
package_names=$(< test-list.json jq -r 'select(.Deps != null) |
package_names=$(go list -test -json ./... |
jq -r 'select(.Deps != null) |
select(all(.Deps[] ; contains("github.com/hashicorp/vault/helper/testhelpers/docker")|not)) |
.ForTest | select(. != null)' |
sort -u | grep -v vault/integ | circleci tests split --split-by=timings --timings-type=classname || true)
sort -u | grep -v vault/integ | circleci tests split --split-by=timings --timings-type=classname) || true
fi
# Move back into root directory
popd
Expand Down
14 changes: 0 additions & 14 deletions .circleci/config/commands/setup-semgrep.yml

This file was deleted.

1 change: 0 additions & 1 deletion .circleci/config/executors/@executors.yml
Expand Up @@ -5,7 +5,6 @@ go-machine:
CIRCLECI_CLI_VERSION: 0.1.5546 # Pin CircleCI CLI to patch version (ex: 1.2.3)
GO_VERSION: 1.17.9 # 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:
Expand Down
14 changes: 14 additions & 0 deletions .circleci/config/jobs/algolia-index.yml
@@ -0,0 +1,14 @@
docker:
- image: node:12
steps:
- checkout
- run:
name: Push content to Algolia Index
command: |
if [ "$CIRCLE_REPOSITORY_URL" != "git@github.com:hashicorp/vault.git" ]; then
echo "Not Vault OSS Repo, not indexing Algolia"
exit 0
fi
cd website/
npm install
node scripts/index_search_content.js

0 comments on commit 3346c6c

Please sign in to comment.