25137a1702
* add packagespec build system
- The majority of changes in this commit are files generated
by packagespec (everything in the packages-oss.lock directory).
* add .yamllint
* update to packagespec@fd54aea4
* ci: bust packagespec cache
- Change to packagespec results in package IDs that can use
git tag refs, not just commit refs.
* update to packagepsec@5fc121d0
- This busts all caches, because of a change to the way we
no longer traverse from tag refs to commit refs, due to
the potential confusion this can cause.
- See fd54aea482
for the original change to packagespec necessitating this.
* update to packagespec@5e6c87b6
- This completes the change to allowing git tag refs
to be used for source IDs, begun in f130b940a8fbe3e9398225b08ea1d63420bef7b6
* update to packagespec@4d3c9e8b
- This busts cache, needed to apply previous change.
* remove RELEASE_BUILD_WORKFLOW_NAME
* update packagespec, add watch-ci target
* fix package names (do not refer to EDITION)
* remove EDITION input from packages-oss.yml
* bump package cache, update packagespec
* update packagespec, add 'aliases' target
* update packagespec; less output noise
* ci: give release bundle file a better name
- When performing a release build, this will include the build ID
as part of the name, making it easier to distinguish from other
builds.
* ci: create aliases tarball artifact
* ci: cache package metadata files
* ci: add metadata artifact
* ci: bust circleci package cache
* Revert "ci: bust circleci package cache"
This reverts commit 1320d182613466f0999d63f5742db12ac17f8e92.
* ci: remove aliases artifact
* ci: use buildID not workflowName to id artifacts
* packages: add BUNDLE_NAME metadata
* do not cache package metadata with binaries
* ci: bump package cache
* ci: debugging
* ci: fix package cache; update packagespec
* ci: update packagespec to 10e7beb2
* ci: write package metadata and aliases
* ci: switch to .zip artifacts
* switch package bundle back to tar.gz (from zip)
- Because of the way zip works, the zip archive was over 2GB rather than under 750MB as with tar.gz.
* bump packagespec, adds list-staged-builds
* update packagespec
* add publish stub + general tidy up
* bump packagespec
* bump packagespec; add make publish-config
* Makefile: tidy up packagespec targets
* pass PRODUCT_REPO_ROOT to packagespec
* bump go to 1.14.6
* packages-oss.yml: use more explicit base image
* bump packagespec to b899b7c1
* bump packagespec to f040ce8f
* packages-oss.yml: pin base image to digest
- This digest is pointed to by debian:buster-20200720
- Using a specific digest ensures that builds use the same
base image in all contexts
* add release-repo; bump packagespec
* remove BUILD_TAGS and -tags flag
* bump packagespec to e444f742
* bump to go1.14.7
* ci: bump to go1.14.7
1890 lines
90 KiB
YAML
Generated
1890 lines
90 KiB
YAML
Generated
### ***
|
|
### WARNING: DO NOT manually EDIT or MERGE this file, it is generated by 'make ci-config'.
|
|
### INSTEAD: Edit or merge the source in config/ then run 'make ci-config'.
|
|
### ***
|
|
# Orb 'circleci/slack@3.2.0' resolved to 'circleci/slack@3.2.0'
|
|
version: 2
|
|
jobs:
|
|
bundle-releases:
|
|
docker:
|
|
- image: circleci/buildpack-deps
|
|
shell: /usr/bin/env bash -euo pipefail -c
|
|
steps:
|
|
- checkout
|
|
- run:
|
|
command: make -C packages*.lock write-all-package-cache-keys
|
|
name: Write package cache key
|
|
- restore_cache:
|
|
key: cache002-package-6ecbed65dd0bf47f2ac0bdf9ba43463ca4022975-{{checksum ".buildcache/cache-keys/package-6ecbed65dd0bf47f2ac0bdf9ba43463ca4022975"}}
|
|
- run:
|
|
command: |
|
|
make package-meta
|
|
environment:
|
|
PACKAGE_SPEC_ID: 6ecbed65dd0bf47f2ac0bdf9ba43463ca4022975
|
|
name: Write package metadata for darwin_386_package
|
|
- restore_cache:
|
|
key: cache002-package-0da26820d5d57b78fc2a40fbde910f35134641fb-{{checksum ".buildcache/cache-keys/package-0da26820d5d57b78fc2a40fbde910f35134641fb"}}
|
|
- run:
|
|
command: |
|
|
make package-meta
|
|
environment:
|
|
PACKAGE_SPEC_ID: 0da26820d5d57b78fc2a40fbde910f35134641fb
|
|
name: Write package metadata for darwin_amd64_package
|
|
- restore_cache:
|
|
key: cache002-package-2c42b76fce423e8344a693f6338f73fd29e98624-{{checksum ".buildcache/cache-keys/package-2c42b76fce423e8344a693f6338f73fd29e98624"}}
|
|
- run:
|
|
command: |
|
|
make package-meta
|
|
environment:
|
|
PACKAGE_SPEC_ID: 2c42b76fce423e8344a693f6338f73fd29e98624
|
|
name: Write package metadata for freebsd_386_package
|
|
- restore_cache:
|
|
key: cache002-package-3b321dd5965180de92badfcb47e1d7d9fefad345-{{checksum ".buildcache/cache-keys/package-3b321dd5965180de92badfcb47e1d7d9fefad345"}}
|
|
- run:
|
|
command: |
|
|
make package-meta
|
|
environment:
|
|
PACKAGE_SPEC_ID: 3b321dd5965180de92badfcb47e1d7d9fefad345
|
|
name: Write package metadata for freebsd_amd64_package
|
|
- restore_cache:
|
|
key: cache002-package-f4c1638cf9088643d2eaa85c9293d4d13090347b-{{checksum ".buildcache/cache-keys/package-f4c1638cf9088643d2eaa85c9293d4d13090347b"}}
|
|
- run:
|
|
command: |
|
|
make package-meta
|
|
environment:
|
|
PACKAGE_SPEC_ID: f4c1638cf9088643d2eaa85c9293d4d13090347b
|
|
name: Write package metadata for freebsd_arm_package
|
|
- restore_cache:
|
|
key: cache002-package-fff30935fd8d2e7eda837a9b3b1ae76f3d3e17d4-{{checksum ".buildcache/cache-keys/package-fff30935fd8d2e7eda837a9b3b1ae76f3d3e17d4"}}
|
|
- run:
|
|
command: |
|
|
make package-meta
|
|
environment:
|
|
PACKAGE_SPEC_ID: fff30935fd8d2e7eda837a9b3b1ae76f3d3e17d4
|
|
name: Write package metadata for linux_386_package
|
|
- restore_cache:
|
|
key: cache002-package-9297f3261f472d23a5c60680d84edfa4a96314aa-{{checksum ".buildcache/cache-keys/package-9297f3261f472d23a5c60680d84edfa4a96314aa"}}
|
|
- run:
|
|
command: |
|
|
make package-meta
|
|
environment:
|
|
PACKAGE_SPEC_ID: 9297f3261f472d23a5c60680d84edfa4a96314aa
|
|
name: Write package metadata for linux_amd64_package
|
|
- restore_cache:
|
|
key: cache002-package-9181ed8700d5728b59ed5ecdd50e9dabc978d75a-{{checksum ".buildcache/cache-keys/package-9181ed8700d5728b59ed5ecdd50e9dabc978d75a"}}
|
|
- run:
|
|
command: |
|
|
make package-meta
|
|
environment:
|
|
PACKAGE_SPEC_ID: 9181ed8700d5728b59ed5ecdd50e9dabc978d75a
|
|
name: Write package metadata for linux_arm_package
|
|
- restore_cache:
|
|
key: cache002-package-754a1c4a0ae3a6d376c503ec409cd4c859ef93e3-{{checksum ".buildcache/cache-keys/package-754a1c4a0ae3a6d376c503ec409cd4c859ef93e3"}}
|
|
- run:
|
|
command: |
|
|
make package-meta
|
|
environment:
|
|
PACKAGE_SPEC_ID: 754a1c4a0ae3a6d376c503ec409cd4c859ef93e3
|
|
name: Write package metadata for linux_arm64_package
|
|
- restore_cache:
|
|
key: cache002-package-8e6c5ce10bd50ee45b5b7331c070b2ab238bb6f5-{{checksum ".buildcache/cache-keys/package-8e6c5ce10bd50ee45b5b7331c070b2ab238bb6f5"}}
|
|
- run:
|
|
command: |
|
|
make package-meta
|
|
environment:
|
|
PACKAGE_SPEC_ID: 8e6c5ce10bd50ee45b5b7331c070b2ab238bb6f5
|
|
name: Write package metadata for netbsd_386_package
|
|
- restore_cache:
|
|
key: cache002-package-c10a90c43455013e1fa0728c48ea3d191c898708-{{checksum ".buildcache/cache-keys/package-c10a90c43455013e1fa0728c48ea3d191c898708"}}
|
|
- run:
|
|
command: |
|
|
make package-meta
|
|
environment:
|
|
PACKAGE_SPEC_ID: c10a90c43455013e1fa0728c48ea3d191c898708
|
|
name: Write package metadata for netbsd_amd64_package
|
|
- restore_cache:
|
|
key: cache002-package-5fc368162156389c1b51df490a8e90a752ec0dcb-{{checksum ".buildcache/cache-keys/package-5fc368162156389c1b51df490a8e90a752ec0dcb"}}
|
|
- run:
|
|
command: |
|
|
make package-meta
|
|
environment:
|
|
PACKAGE_SPEC_ID: 5fc368162156389c1b51df490a8e90a752ec0dcb
|
|
name: Write package metadata for openbsd_386_package
|
|
- restore_cache:
|
|
key: cache002-package-d2c7b10d9e440b8ef015ec1d1d9b8552d00a83e4-{{checksum ".buildcache/cache-keys/package-d2c7b10d9e440b8ef015ec1d1d9b8552d00a83e4"}}
|
|
- run:
|
|
command: |
|
|
make package-meta
|
|
environment:
|
|
PACKAGE_SPEC_ID: d2c7b10d9e440b8ef015ec1d1d9b8552d00a83e4
|
|
name: Write package metadata for openbsd_amd64_package
|
|
- restore_cache:
|
|
key: cache002-package-4d598d9ae868f9aa6558d2a7e867387255eaaca2-{{checksum ".buildcache/cache-keys/package-4d598d9ae868f9aa6558d2a7e867387255eaaca2"}}
|
|
- run:
|
|
command: |
|
|
make package-meta
|
|
environment:
|
|
PACKAGE_SPEC_ID: 4d598d9ae868f9aa6558d2a7e867387255eaaca2
|
|
name: Write package metadata for solaris_amd64_package
|
|
- restore_cache:
|
|
key: cache002-package-4baf794616dc672040bb22e27a708ec1d437c067-{{checksum ".buildcache/cache-keys/package-4baf794616dc672040bb22e27a708ec1d437c067"}}
|
|
- run:
|
|
command: |
|
|
make package-meta
|
|
environment:
|
|
PACKAGE_SPEC_ID: 4baf794616dc672040bb22e27a708ec1d437c067
|
|
name: Write package metadata for windows_386_package
|
|
- restore_cache:
|
|
key: cache002-package-f48ce178467000a26549f481df1a3775eb5322bf-{{checksum ".buildcache/cache-keys/package-f48ce178467000a26549f481df1a3775eb5322bf"}}
|
|
- run:
|
|
command: |
|
|
make package-meta
|
|
environment:
|
|
PACKAGE_SPEC_ID: f48ce178467000a26549f481df1a3775eb5322bf
|
|
name: Write package metadata for windows_amd64_package
|
|
- run:
|
|
command: make aliases
|
|
name: Write package aliases
|
|
- run:
|
|
command: ls -lahR .buildcache
|
|
name: List Build Cache
|
|
- store_artifacts:
|
|
destination: packages-standalone
|
|
path: .buildcache/packages
|
|
- run:
|
|
command: tar -czf packages-standalone.tar.gz .buildcache/packages
|
|
- store_artifacts:
|
|
destination: packages-standalone.tar.gz
|
|
path: packages-standalone.tar.gz
|
|
- run:
|
|
command: tar -czf meta-standalone.tar.gz .buildcache/packages/store/*.json
|
|
- store_artifacts:
|
|
destination: meta-standalone.tar.gz
|
|
path: meta-standalone.tar.gz
|
|
environment:
|
|
- AUTO_INSTALL_TOOLS: 'YES'
|
|
- PRODUCT_REVISION: ''
|
|
darwin_amd64_package:
|
|
docker:
|
|
- image: circleci/buildpack-deps
|
|
shell: /usr/bin/env bash -euo pipefail -c
|
|
environment:
|
|
- AUTO_INSTALL_TOOLS: 'YES'
|
|
- PRODUCT_REVISION: ''
|
|
- PACKAGE_SPEC_ID: 0da26820d5d57b78fc2a40fbde910f35134641fb
|
|
steps:
|
|
- setup_remote_docker
|
|
- checkout
|
|
- run:
|
|
command: make -C packages*.lock write-package-cache-key
|
|
name: Write package cache key
|
|
- restore_cache:
|
|
key: cache002-package-0da26820d5d57b78fc2a40fbde910f35134641fb-{{checksum ".buildcache/cache-keys/package-0da26820d5d57b78fc2a40fbde910f35134641fb"}}
|
|
- run:
|
|
command: |
|
|
if ! { PKG=$(find .buildcache/packages/store -maxdepth 1 -mindepth 1 -name '*.zip' 2> /dev/null) && [ -n "$PKG" ]; }; then
|
|
echo "No package found, continuing with build."
|
|
exit 0
|
|
fi
|
|
echo "Package already cached, skipping build."
|
|
circleci-agent step halt
|
|
name: Check the cache status.
|
|
- run:
|
|
command: make -C packages*.lock write-builder-cache-keys
|
|
name: Write builder layer cache keys
|
|
- restore_cache:
|
|
keys:
|
|
- cache002-copy-source_f4f9_{{checksum ".buildcache/cache-keys/copy-source-f4f9d205876325505a719298391e7c233b5a1ac7"}}
|
|
- cache002-warm-go-build-vendor-cache_1c18_{{checksum ".buildcache/cache-keys/warm-go-build-vendor-cache-1c18a76adf11382eaf4b84b8403c66cf104174d7"}}
|
|
- cache002-build-static-assets_33a6_{{checksum ".buildcache/cache-keys/build-static-assets-33a6e8f0029b730ae0a37427888d22c992a0824e"}}
|
|
- cache002-build-ui_5659_{{checksum ".buildcache/cache-keys/build-ui-5659d3f1f758c2f3a4c5fca4c1fcbaac3720693b"}}
|
|
- cache002-ui-dependencies_58f2_{{checksum ".buildcache/cache-keys/ui-dependencies-58f2ea77b8fe39e82bb587e5246d1b62f9a7cb81"}}
|
|
- cache002-install-yarn_aab7_{{checksum ".buildcache/cache-keys/install-yarn-aab71c56a60048647c1c6c4a7fd5649aee7f2319"}}
|
|
- cache002-set-workdir_8253_{{checksum ".buildcache/cache-keys/set-workdir-8253e91d0841cdc71fb0416f84f9eaa52bea9049"}}
|
|
- cache002-install-go-tools_b7a0_{{checksum ".buildcache/cache-keys/install-go-tools-b7a0056ff8c7f40e047993ec4b1c0a6eab3ab44e"}}
|
|
- cache002-install-go_df55_{{checksum ".buildcache/cache-keys/install-go-df55de749899e75ed655c4eab8cb2c22f1028590"}}
|
|
- cache002-base_a1d9_{{checksum ".buildcache/cache-keys/base-a1d961bcff31b1cdadaa9422452ba72d8b4a85a9"}}
|
|
- run:
|
|
command: make -C packages*.lock load-builder-cache
|
|
- run:
|
|
command: make -C packages*.lock package
|
|
- run:
|
|
command: ls -lahR .buildcache/packages
|
|
- save_cache:
|
|
key: cache002-package-0da26820d5d57b78fc2a40fbde910f35134641fb-{{checksum ".buildcache/cache-keys/package-0da26820d5d57b78fc2a40fbde910f35134641fb"}}
|
|
paths:
|
|
- .buildcache/packages/store
|
|
- run:
|
|
command: |
|
|
if [ -f .buildcache/archives/08-warm-go-build-vendor-cache-1c18a76adf11382eaf4b84b8403c66cf104174d7.tar.gz ]; then
|
|
echo "Builder image already cached, skipping cache step."
|
|
circleci-agent step halt
|
|
fi
|
|
name: Check builder cache status
|
|
- run:
|
|
command: make -f packages*.lock/layer.mk 08-warm-go-build-vendor-cache-1c18a76adf11382eaf4b84b8403c66cf104174d7-save
|
|
- save_cache:
|
|
key: cache002-warm-go-build-vendor-cache_1c18_{{checksum ".buildcache/cache-keys/warm-go-build-vendor-cache-1c18a76adf11382eaf4b84b8403c66cf104174d7"}}
|
|
paths:
|
|
- .buildcache/archives/08-warm-go-build-vendor-cache-1c18a76adf11382eaf4b84b8403c66cf104174d7.tar.gz
|
|
windows_386_package:
|
|
docker:
|
|
- image: circleci/buildpack-deps
|
|
shell: /usr/bin/env bash -euo pipefail -c
|
|
environment:
|
|
- AUTO_INSTALL_TOOLS: 'YES'
|
|
- PRODUCT_REVISION: ''
|
|
- PACKAGE_SPEC_ID: 4baf794616dc672040bb22e27a708ec1d437c067
|
|
steps:
|
|
- setup_remote_docker
|
|
- checkout
|
|
- run:
|
|
command: make -C packages*.lock write-package-cache-key
|
|
name: Write package cache key
|
|
- restore_cache:
|
|
key: cache002-package-4baf794616dc672040bb22e27a708ec1d437c067-{{checksum ".buildcache/cache-keys/package-4baf794616dc672040bb22e27a708ec1d437c067"}}
|
|
- run:
|
|
command: |
|
|
if ! { PKG=$(find .buildcache/packages/store -maxdepth 1 -mindepth 1 -name '*.zip' 2> /dev/null) && [ -n "$PKG" ]; }; then
|
|
echo "No package found, continuing with build."
|
|
exit 0
|
|
fi
|
|
echo "Package already cached, skipping build."
|
|
circleci-agent step halt
|
|
name: Check the cache status.
|
|
- run:
|
|
command: make -C packages*.lock write-builder-cache-keys
|
|
name: Write builder layer cache keys
|
|
- restore_cache:
|
|
keys:
|
|
- cache002-copy-source_3f89_{{checksum ".buildcache/cache-keys/copy-source-3f890eaccfc0039dc98cdcaa578bb355cfa43a57"}}
|
|
- cache002-warm-go-build-vendor-cache_8a05_{{checksum ".buildcache/cache-keys/warm-go-build-vendor-cache-8a055286bfdd3c2b0f3ce25f54f88375384a2400"}}
|
|
- cache002-build-static-assets_33a6_{{checksum ".buildcache/cache-keys/build-static-assets-33a6e8f0029b730ae0a37427888d22c992a0824e"}}
|
|
- cache002-build-ui_5659_{{checksum ".buildcache/cache-keys/build-ui-5659d3f1f758c2f3a4c5fca4c1fcbaac3720693b"}}
|
|
- cache002-ui-dependencies_58f2_{{checksum ".buildcache/cache-keys/ui-dependencies-58f2ea77b8fe39e82bb587e5246d1b62f9a7cb81"}}
|
|
- cache002-install-yarn_aab7_{{checksum ".buildcache/cache-keys/install-yarn-aab71c56a60048647c1c6c4a7fd5649aee7f2319"}}
|
|
- cache002-set-workdir_8253_{{checksum ".buildcache/cache-keys/set-workdir-8253e91d0841cdc71fb0416f84f9eaa52bea9049"}}
|
|
- cache002-install-go-tools_b7a0_{{checksum ".buildcache/cache-keys/install-go-tools-b7a0056ff8c7f40e047993ec4b1c0a6eab3ab44e"}}
|
|
- cache002-install-go_df55_{{checksum ".buildcache/cache-keys/install-go-df55de749899e75ed655c4eab8cb2c22f1028590"}}
|
|
- cache002-base_a1d9_{{checksum ".buildcache/cache-keys/base-a1d961bcff31b1cdadaa9422452ba72d8b4a85a9"}}
|
|
- run:
|
|
command: make -C packages*.lock load-builder-cache
|
|
- run:
|
|
command: make -C packages*.lock package
|
|
- run:
|
|
command: ls -lahR .buildcache/packages
|
|
- save_cache:
|
|
key: cache002-package-4baf794616dc672040bb22e27a708ec1d437c067-{{checksum ".buildcache/cache-keys/package-4baf794616dc672040bb22e27a708ec1d437c067"}}
|
|
paths:
|
|
- .buildcache/packages/store
|
|
- run:
|
|
command: |
|
|
if [ -f .buildcache/archives/08-warm-go-build-vendor-cache-8a055286bfdd3c2b0f3ce25f54f88375384a2400.tar.gz ]; then
|
|
echo "Builder image already cached, skipping cache step."
|
|
circleci-agent step halt
|
|
fi
|
|
name: Check builder cache status
|
|
- run:
|
|
command: make -f packages*.lock/layer.mk 08-warm-go-build-vendor-cache-8a055286bfdd3c2b0f3ce25f54f88375384a2400-save
|
|
- save_cache:
|
|
key: cache002-warm-go-build-vendor-cache_8a05_{{checksum ".buildcache/cache-keys/warm-go-build-vendor-cache-8a055286bfdd3c2b0f3ce25f54f88375384a2400"}}
|
|
paths:
|
|
- .buildcache/archives/08-warm-go-build-vendor-cache-8a055286bfdd3c2b0f3ce25f54f88375384a2400.tar.gz
|
|
install-ui-dependencies:
|
|
docker:
|
|
- image: node:10-buster
|
|
shell: /usr/bin/env bash -euo pipefail -c
|
|
working_directory: /go/src/github.com/hashicorp/vault
|
|
steps:
|
|
- checkout
|
|
- restore_cache:
|
|
key: yarn-lock-v6-{{ checksum "ui/yarn.lock" }}
|
|
- run:
|
|
command: |
|
|
cd ui
|
|
yarn install
|
|
npm rebuild node-sass
|
|
name: Install UI dependencies
|
|
- save_cache:
|
|
key: yarn-lock-v6-{{ checksum "ui/yarn.lock" }}
|
|
paths:
|
|
- ui/node_modules
|
|
linux_arm64_package:
|
|
docker:
|
|
- image: circleci/buildpack-deps
|
|
shell: /usr/bin/env bash -euo pipefail -c
|
|
environment:
|
|
- AUTO_INSTALL_TOOLS: 'YES'
|
|
- PRODUCT_REVISION: ''
|
|
- PACKAGE_SPEC_ID: 754a1c4a0ae3a6d376c503ec409cd4c859ef93e3
|
|
steps:
|
|
- setup_remote_docker
|
|
- checkout
|
|
- run:
|
|
command: make -C packages*.lock write-package-cache-key
|
|
name: Write package cache key
|
|
- restore_cache:
|
|
key: cache002-package-754a1c4a0ae3a6d376c503ec409cd4c859ef93e3-{{checksum ".buildcache/cache-keys/package-754a1c4a0ae3a6d376c503ec409cd4c859ef93e3"}}
|
|
- run:
|
|
command: |
|
|
if ! { PKG=$(find .buildcache/packages/store -maxdepth 1 -mindepth 1 -name '*.zip' 2> /dev/null) && [ -n "$PKG" ]; }; then
|
|
echo "No package found, continuing with build."
|
|
exit 0
|
|
fi
|
|
echo "Package already cached, skipping build."
|
|
circleci-agent step halt
|
|
name: Check the cache status.
|
|
- run:
|
|
command: make -C packages*.lock write-builder-cache-keys
|
|
name: Write builder layer cache keys
|
|
- restore_cache:
|
|
keys:
|
|
- cache002-copy-source_f976_{{checksum ".buildcache/cache-keys/copy-source-f976e4b1eb1e3dee4cbd089a1b97edc2f63f5d84"}}
|
|
- cache002-warm-go-build-vendor-cache_2863_{{checksum ".buildcache/cache-keys/warm-go-build-vendor-cache-28637de51e735a2eca5909e5685278b304ac5b15"}}
|
|
- cache002-build-static-assets_33a6_{{checksum ".buildcache/cache-keys/build-static-assets-33a6e8f0029b730ae0a37427888d22c992a0824e"}}
|
|
- cache002-build-ui_5659_{{checksum ".buildcache/cache-keys/build-ui-5659d3f1f758c2f3a4c5fca4c1fcbaac3720693b"}}
|
|
- cache002-ui-dependencies_58f2_{{checksum ".buildcache/cache-keys/ui-dependencies-58f2ea77b8fe39e82bb587e5246d1b62f9a7cb81"}}
|
|
- cache002-install-yarn_aab7_{{checksum ".buildcache/cache-keys/install-yarn-aab71c56a60048647c1c6c4a7fd5649aee7f2319"}}
|
|
- cache002-set-workdir_8253_{{checksum ".buildcache/cache-keys/set-workdir-8253e91d0841cdc71fb0416f84f9eaa52bea9049"}}
|
|
- cache002-install-go-tools_b7a0_{{checksum ".buildcache/cache-keys/install-go-tools-b7a0056ff8c7f40e047993ec4b1c0a6eab3ab44e"}}
|
|
- cache002-install-go_df55_{{checksum ".buildcache/cache-keys/install-go-df55de749899e75ed655c4eab8cb2c22f1028590"}}
|
|
- cache002-base_a1d9_{{checksum ".buildcache/cache-keys/base-a1d961bcff31b1cdadaa9422452ba72d8b4a85a9"}}
|
|
- run:
|
|
command: make -C packages*.lock load-builder-cache
|
|
- run:
|
|
command: make -C packages*.lock package
|
|
- run:
|
|
command: ls -lahR .buildcache/packages
|
|
- save_cache:
|
|
key: cache002-package-754a1c4a0ae3a6d376c503ec409cd4c859ef93e3-{{checksum ".buildcache/cache-keys/package-754a1c4a0ae3a6d376c503ec409cd4c859ef93e3"}}
|
|
paths:
|
|
- .buildcache/packages/store
|
|
- run:
|
|
command: |
|
|
if [ -f .buildcache/archives/08-warm-go-build-vendor-cache-28637de51e735a2eca5909e5685278b304ac5b15.tar.gz ]; then
|
|
echo "Builder image already cached, skipping cache step."
|
|
circleci-agent step halt
|
|
fi
|
|
name: Check builder cache status
|
|
- run:
|
|
command: make -f packages*.lock/layer.mk 08-warm-go-build-vendor-cache-28637de51e735a2eca5909e5685278b304ac5b15-save
|
|
- save_cache:
|
|
key: cache002-warm-go-build-vendor-cache_2863_{{checksum ".buildcache/cache-keys/warm-go-build-vendor-cache-28637de51e735a2eca5909e5685278b304ac5b15"}}
|
|
paths:
|
|
- .buildcache/archives/08-warm-go-build-vendor-cache-28637de51e735a2eca5909e5685278b304ac5b15.tar.gz
|
|
test-ui:
|
|
docker:
|
|
- image: node:10-buster
|
|
shell: /usr/bin/env bash -euo pipefail -c
|
|
working_directory: /go/src/github.com/hashicorp/vault
|
|
resource_class: medium+
|
|
steps:
|
|
- checkout
|
|
- restore_cache:
|
|
key: yarn-lock-v6-{{ checksum "ui/yarn.lock" }}
|
|
- attach_workspace:
|
|
at: .
|
|
- run:
|
|
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}"
|
|
|
|
# Run Ember tests
|
|
cd ui
|
|
mkdir -p test-results/qunit
|
|
yarn test:oss
|
|
name: Test UI
|
|
- store_artifacts:
|
|
path: ui/test-results
|
|
- store_test_results:
|
|
path: ui/test-results
|
|
linux_arm_package:
|
|
docker:
|
|
- image: circleci/buildpack-deps
|
|
shell: /usr/bin/env bash -euo pipefail -c
|
|
environment:
|
|
- AUTO_INSTALL_TOOLS: 'YES'
|
|
- PRODUCT_REVISION: ''
|
|
- PACKAGE_SPEC_ID: 9181ed8700d5728b59ed5ecdd50e9dabc978d75a
|
|
steps:
|
|
- setup_remote_docker
|
|
- checkout
|
|
- run:
|
|
command: make -C packages*.lock write-package-cache-key
|
|
name: Write package cache key
|
|
- restore_cache:
|
|
key: cache002-package-9181ed8700d5728b59ed5ecdd50e9dabc978d75a-{{checksum ".buildcache/cache-keys/package-9181ed8700d5728b59ed5ecdd50e9dabc978d75a"}}
|
|
- run:
|
|
command: |
|
|
if ! { PKG=$(find .buildcache/packages/store -maxdepth 1 -mindepth 1 -name '*.zip' 2> /dev/null) && [ -n "$PKG" ]; }; then
|
|
echo "No package found, continuing with build."
|
|
exit 0
|
|
fi
|
|
echo "Package already cached, skipping build."
|
|
circleci-agent step halt
|
|
name: Check the cache status.
|
|
- run:
|
|
command: make -C packages*.lock write-builder-cache-keys
|
|
name: Write builder layer cache keys
|
|
- restore_cache:
|
|
keys:
|
|
- cache002-copy-source_8490_{{checksum ".buildcache/cache-keys/copy-source-8490d401277a4001bbc44b278a91858049d76683"}}
|
|
- cache002-warm-go-build-vendor-cache_024e_{{checksum ".buildcache/cache-keys/warm-go-build-vendor-cache-024e5c62d2ad59cb7a139748ec3571828bc950a8"}}
|
|
- cache002-build-static-assets_33a6_{{checksum ".buildcache/cache-keys/build-static-assets-33a6e8f0029b730ae0a37427888d22c992a0824e"}}
|
|
- cache002-build-ui_5659_{{checksum ".buildcache/cache-keys/build-ui-5659d3f1f758c2f3a4c5fca4c1fcbaac3720693b"}}
|
|
- cache002-ui-dependencies_58f2_{{checksum ".buildcache/cache-keys/ui-dependencies-58f2ea77b8fe39e82bb587e5246d1b62f9a7cb81"}}
|
|
- cache002-install-yarn_aab7_{{checksum ".buildcache/cache-keys/install-yarn-aab71c56a60048647c1c6c4a7fd5649aee7f2319"}}
|
|
- cache002-set-workdir_8253_{{checksum ".buildcache/cache-keys/set-workdir-8253e91d0841cdc71fb0416f84f9eaa52bea9049"}}
|
|
- cache002-install-go-tools_b7a0_{{checksum ".buildcache/cache-keys/install-go-tools-b7a0056ff8c7f40e047993ec4b1c0a6eab3ab44e"}}
|
|
- cache002-install-go_df55_{{checksum ".buildcache/cache-keys/install-go-df55de749899e75ed655c4eab8cb2c22f1028590"}}
|
|
- cache002-base_a1d9_{{checksum ".buildcache/cache-keys/base-a1d961bcff31b1cdadaa9422452ba72d8b4a85a9"}}
|
|
- run:
|
|
command: make -C packages*.lock load-builder-cache
|
|
- run:
|
|
command: make -C packages*.lock package
|
|
- run:
|
|
command: ls -lahR .buildcache/packages
|
|
- save_cache:
|
|
key: cache002-package-9181ed8700d5728b59ed5ecdd50e9dabc978d75a-{{checksum ".buildcache/cache-keys/package-9181ed8700d5728b59ed5ecdd50e9dabc978d75a"}}
|
|
paths:
|
|
- .buildcache/packages/store
|
|
- run:
|
|
command: |
|
|
if [ -f .buildcache/archives/08-warm-go-build-vendor-cache-024e5c62d2ad59cb7a139748ec3571828bc950a8.tar.gz ]; then
|
|
echo "Builder image already cached, skipping cache step."
|
|
circleci-agent step halt
|
|
fi
|
|
name: Check builder cache status
|
|
- run:
|
|
command: make -f packages*.lock/layer.mk 08-warm-go-build-vendor-cache-024e5c62d2ad59cb7a139748ec3571828bc950a8-save
|
|
- save_cache:
|
|
key: cache002-warm-go-build-vendor-cache_024e_{{checksum ".buildcache/cache-keys/warm-go-build-vendor-cache-024e5c62d2ad59cb7a139748ec3571828bc950a8"}}
|
|
paths:
|
|
- .buildcache/archives/08-warm-go-build-vendor-cache-024e5c62d2ad59cb7a139748ec3571828bc950a8.tar.gz
|
|
test-ui-browserstack:
|
|
docker:
|
|
- image: node:10-buster
|
|
shell: /usr/bin/env bash -euo pipefail -c
|
|
working_directory: /go/src/github.com/hashicorp/vault
|
|
resource_class: medium+
|
|
steps:
|
|
- checkout
|
|
- restore_cache:
|
|
key: yarn-lock-v6-{{ checksum "ui/yarn.lock" }}
|
|
- attach_workspace:
|
|
at: .
|
|
- run:
|
|
command: |
|
|
# Add ./bin to the PATH so vault binary can be found.
|
|
export PATH="${PWD}"/bin:${PATH}
|
|
make test-ui-browserstack
|
|
name: Run Browserstack Tests
|
|
darwin_386_package:
|
|
docker:
|
|
- image: circleci/buildpack-deps
|
|
shell: /usr/bin/env bash -euo pipefail -c
|
|
environment:
|
|
- AUTO_INSTALL_TOOLS: 'YES'
|
|
- PRODUCT_REVISION: ''
|
|
- PACKAGE_SPEC_ID: 6ecbed65dd0bf47f2ac0bdf9ba43463ca4022975
|
|
steps:
|
|
- setup_remote_docker
|
|
- checkout
|
|
- run:
|
|
command: make -C packages*.lock write-package-cache-key
|
|
name: Write package cache key
|
|
- restore_cache:
|
|
key: cache002-package-6ecbed65dd0bf47f2ac0bdf9ba43463ca4022975-{{checksum ".buildcache/cache-keys/package-6ecbed65dd0bf47f2ac0bdf9ba43463ca4022975"}}
|
|
- run:
|
|
command: |
|
|
if ! { PKG=$(find .buildcache/packages/store -maxdepth 1 -mindepth 1 -name '*.zip' 2> /dev/null) && [ -n "$PKG" ]; }; then
|
|
echo "No package found, continuing with build."
|
|
exit 0
|
|
fi
|
|
echo "Package already cached, skipping build."
|
|
circleci-agent step halt
|
|
name: Check the cache status.
|
|
- run:
|
|
command: make -C packages*.lock write-builder-cache-keys
|
|
name: Write builder layer cache keys
|
|
- restore_cache:
|
|
keys:
|
|
- cache002-copy-source_bfc9_{{checksum ".buildcache/cache-keys/copy-source-bfc92f40ed9ac5e09826cc8473f9bf7b7403bd60"}}
|
|
- cache002-warm-go-build-vendor-cache_e917_{{checksum ".buildcache/cache-keys/warm-go-build-vendor-cache-e91703d9d7092bb5c13b3569d75ca4bb34511607"}}
|
|
- cache002-build-static-assets_33a6_{{checksum ".buildcache/cache-keys/build-static-assets-33a6e8f0029b730ae0a37427888d22c992a0824e"}}
|
|
- cache002-build-ui_5659_{{checksum ".buildcache/cache-keys/build-ui-5659d3f1f758c2f3a4c5fca4c1fcbaac3720693b"}}
|
|
- cache002-ui-dependencies_58f2_{{checksum ".buildcache/cache-keys/ui-dependencies-58f2ea77b8fe39e82bb587e5246d1b62f9a7cb81"}}
|
|
- cache002-install-yarn_aab7_{{checksum ".buildcache/cache-keys/install-yarn-aab71c56a60048647c1c6c4a7fd5649aee7f2319"}}
|
|
- cache002-set-workdir_8253_{{checksum ".buildcache/cache-keys/set-workdir-8253e91d0841cdc71fb0416f84f9eaa52bea9049"}}
|
|
- cache002-install-go-tools_b7a0_{{checksum ".buildcache/cache-keys/install-go-tools-b7a0056ff8c7f40e047993ec4b1c0a6eab3ab44e"}}
|
|
- cache002-install-go_df55_{{checksum ".buildcache/cache-keys/install-go-df55de749899e75ed655c4eab8cb2c22f1028590"}}
|
|
- cache002-base_a1d9_{{checksum ".buildcache/cache-keys/base-a1d961bcff31b1cdadaa9422452ba72d8b4a85a9"}}
|
|
- run:
|
|
command: make -C packages*.lock load-builder-cache
|
|
- run:
|
|
command: make -C packages*.lock package
|
|
- run:
|
|
command: ls -lahR .buildcache/packages
|
|
- save_cache:
|
|
key: cache002-package-6ecbed65dd0bf47f2ac0bdf9ba43463ca4022975-{{checksum ".buildcache/cache-keys/package-6ecbed65dd0bf47f2ac0bdf9ba43463ca4022975"}}
|
|
paths:
|
|
- .buildcache/packages/store
|
|
- run:
|
|
command: |
|
|
if [ -f .buildcache/archives/08-warm-go-build-vendor-cache-e91703d9d7092bb5c13b3569d75ca4bb34511607.tar.gz ]; then
|
|
echo "Builder image already cached, skipping cache step."
|
|
circleci-agent step halt
|
|
fi
|
|
name: Check builder cache status
|
|
- run:
|
|
command: make -f packages*.lock/layer.mk 08-warm-go-build-vendor-cache-e91703d9d7092bb5c13b3569d75ca4bb34511607-save
|
|
- save_cache:
|
|
key: cache002-warm-go-build-vendor-cache_e917_{{checksum ".buildcache/cache-keys/warm-go-build-vendor-cache-e91703d9d7092bb5c13b3569d75ca4bb34511607"}}
|
|
paths:
|
|
- .buildcache/archives/08-warm-go-build-vendor-cache-e91703d9d7092bb5c13b3569d75ca4bb34511607.tar.gz
|
|
build-go-dev:
|
|
machine: true
|
|
shell: /usr/bin/env bash -euo pipefail -c
|
|
working_directory: /go/src/github.com/hashicorp/vault
|
|
steps:
|
|
- run:
|
|
command: |
|
|
[ -n "$GO_VERSION" ] || { echo "You must set GO_VERSION"; exit 1; }
|
|
# 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"
|
|
GOPATH="/go"
|
|
mkdir $GOPATH 2>/dev/null || { sudo mkdir $GOPATH && sudo chmod 777 $GOPATH; }
|
|
echo "export GOPATH='$GOPATH'" >> "$BASH_ENV"
|
|
echo "export PATH='$PATH:$GOPATH/bin:/usr/local/go/bin'" >> "$BASH_ENV"
|
|
|
|
echo "$ go version"
|
|
go version
|
|
name: Setup Go
|
|
working_directory: ~/
|
|
- checkout
|
|
- attach_workspace:
|
|
at: .
|
|
- run:
|
|
command: |
|
|
# Move dev UI assets to expected location
|
|
rm -rf ./pkg
|
|
mkdir ./pkg
|
|
|
|
# Build dev binary
|
|
make ci-bootstrap dev
|
|
name: Build dev binary
|
|
- persist_to_workspace:
|
|
paths:
|
|
- bin
|
|
root: .
|
|
environment:
|
|
- CIRCLECI_CLI_VERSION: 0.1.5546
|
|
- GO_TAGS: ''
|
|
- GO_VERSION: 1.14.7
|
|
- GO111MODULE: 'off'
|
|
- GOTESTSUM_VERSION: 0.5.2
|
|
algolia-index:
|
|
docker:
|
|
- image: node:12
|
|
steps:
|
|
- checkout
|
|
- run:
|
|
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
|
|
name: Push content to Algolia Index
|
|
linux_386_package:
|
|
docker:
|
|
- image: circleci/buildpack-deps
|
|
shell: /usr/bin/env bash -euo pipefail -c
|
|
environment:
|
|
- AUTO_INSTALL_TOOLS: 'YES'
|
|
- PRODUCT_REVISION: ''
|
|
- PACKAGE_SPEC_ID: fff30935fd8d2e7eda837a9b3b1ae76f3d3e17d4
|
|
steps:
|
|
- setup_remote_docker
|
|
- checkout
|
|
- run:
|
|
command: make -C packages*.lock write-package-cache-key
|
|
name: Write package cache key
|
|
- restore_cache:
|
|
key: cache002-package-fff30935fd8d2e7eda837a9b3b1ae76f3d3e17d4-{{checksum ".buildcache/cache-keys/package-fff30935fd8d2e7eda837a9b3b1ae76f3d3e17d4"}}
|
|
- run:
|
|
command: |
|
|
if ! { PKG=$(find .buildcache/packages/store -maxdepth 1 -mindepth 1 -name '*.zip' 2> /dev/null) && [ -n "$PKG" ]; }; then
|
|
echo "No package found, continuing with build."
|
|
exit 0
|
|
fi
|
|
echo "Package already cached, skipping build."
|
|
circleci-agent step halt
|
|
name: Check the cache status.
|
|
- run:
|
|
command: make -C packages*.lock write-builder-cache-keys
|
|
name: Write builder layer cache keys
|
|
- restore_cache:
|
|
keys:
|
|
- cache002-copy-source_a750_{{checksum ".buildcache/cache-keys/copy-source-a750ca270a9586283d232f59f62b97733da7d3fb"}}
|
|
- cache002-warm-go-build-vendor-cache_6876_{{checksum ".buildcache/cache-keys/warm-go-build-vendor-cache-6876aa566f90846d4627c4a1c86ca155ccde2f1c"}}
|
|
- cache002-build-static-assets_33a6_{{checksum ".buildcache/cache-keys/build-static-assets-33a6e8f0029b730ae0a37427888d22c992a0824e"}}
|
|
- cache002-build-ui_5659_{{checksum ".buildcache/cache-keys/build-ui-5659d3f1f758c2f3a4c5fca4c1fcbaac3720693b"}}
|
|
- cache002-ui-dependencies_58f2_{{checksum ".buildcache/cache-keys/ui-dependencies-58f2ea77b8fe39e82bb587e5246d1b62f9a7cb81"}}
|
|
- cache002-install-yarn_aab7_{{checksum ".buildcache/cache-keys/install-yarn-aab71c56a60048647c1c6c4a7fd5649aee7f2319"}}
|
|
- cache002-set-workdir_8253_{{checksum ".buildcache/cache-keys/set-workdir-8253e91d0841cdc71fb0416f84f9eaa52bea9049"}}
|
|
- cache002-install-go-tools_b7a0_{{checksum ".buildcache/cache-keys/install-go-tools-b7a0056ff8c7f40e047993ec4b1c0a6eab3ab44e"}}
|
|
- cache002-install-go_df55_{{checksum ".buildcache/cache-keys/install-go-df55de749899e75ed655c4eab8cb2c22f1028590"}}
|
|
- cache002-base_a1d9_{{checksum ".buildcache/cache-keys/base-a1d961bcff31b1cdadaa9422452ba72d8b4a85a9"}}
|
|
- run:
|
|
command: make -C packages*.lock load-builder-cache
|
|
- run:
|
|
command: make -C packages*.lock package
|
|
- run:
|
|
command: ls -lahR .buildcache/packages
|
|
- save_cache:
|
|
key: cache002-package-fff30935fd8d2e7eda837a9b3b1ae76f3d3e17d4-{{checksum ".buildcache/cache-keys/package-fff30935fd8d2e7eda837a9b3b1ae76f3d3e17d4"}}
|
|
paths:
|
|
- .buildcache/packages/store
|
|
- run:
|
|
command: |
|
|
if [ -f .buildcache/archives/08-warm-go-build-vendor-cache-6876aa566f90846d4627c4a1c86ca155ccde2f1c.tar.gz ]; then
|
|
echo "Builder image already cached, skipping cache step."
|
|
circleci-agent step halt
|
|
fi
|
|
name: Check builder cache status
|
|
- run:
|
|
command: make -f packages*.lock/layer.mk 08-warm-go-build-vendor-cache-6876aa566f90846d4627c4a1c86ca155ccde2f1c-save
|
|
- save_cache:
|
|
key: cache002-warm-go-build-vendor-cache_6876_{{checksum ".buildcache/cache-keys/warm-go-build-vendor-cache-6876aa566f90846d4627c4a1c86ca155ccde2f1c"}}
|
|
paths:
|
|
- .buildcache/archives/08-warm-go-build-vendor-cache-6876aa566f90846d4627c4a1c86ca155ccde2f1c.tar.gz
|
|
freebsd_386_package:
|
|
docker:
|
|
- image: circleci/buildpack-deps
|
|
shell: /usr/bin/env bash -euo pipefail -c
|
|
environment:
|
|
- AUTO_INSTALL_TOOLS: 'YES'
|
|
- PRODUCT_REVISION: ''
|
|
- PACKAGE_SPEC_ID: 2c42b76fce423e8344a693f6338f73fd29e98624
|
|
steps:
|
|
- setup_remote_docker
|
|
- checkout
|
|
- run:
|
|
command: make -C packages*.lock write-package-cache-key
|
|
name: Write package cache key
|
|
- restore_cache:
|
|
key: cache002-package-2c42b76fce423e8344a693f6338f73fd29e98624-{{checksum ".buildcache/cache-keys/package-2c42b76fce423e8344a693f6338f73fd29e98624"}}
|
|
- run:
|
|
command: |
|
|
if ! { PKG=$(find .buildcache/packages/store -maxdepth 1 -mindepth 1 -name '*.zip' 2> /dev/null) && [ -n "$PKG" ]; }; then
|
|
echo "No package found, continuing with build."
|
|
exit 0
|
|
fi
|
|
echo "Package already cached, skipping build."
|
|
circleci-agent step halt
|
|
name: Check the cache status.
|
|
- run:
|
|
command: make -C packages*.lock write-builder-cache-keys
|
|
name: Write builder layer cache keys
|
|
- restore_cache:
|
|
keys:
|
|
- cache002-copy-source_9320_{{checksum ".buildcache/cache-keys/copy-source-93206299230604edb276a2550a83dec3324eb86f"}}
|
|
- cache002-warm-go-build-vendor-cache_0245_{{checksum ".buildcache/cache-keys/warm-go-build-vendor-cache-0245576886d78da53ffbd161a95bd0ca099e5fc1"}}
|
|
- cache002-build-static-assets_33a6_{{checksum ".buildcache/cache-keys/build-static-assets-33a6e8f0029b730ae0a37427888d22c992a0824e"}}
|
|
- cache002-build-ui_5659_{{checksum ".buildcache/cache-keys/build-ui-5659d3f1f758c2f3a4c5fca4c1fcbaac3720693b"}}
|
|
- cache002-ui-dependencies_58f2_{{checksum ".buildcache/cache-keys/ui-dependencies-58f2ea77b8fe39e82bb587e5246d1b62f9a7cb81"}}
|
|
- cache002-install-yarn_aab7_{{checksum ".buildcache/cache-keys/install-yarn-aab71c56a60048647c1c6c4a7fd5649aee7f2319"}}
|
|
- cache002-set-workdir_8253_{{checksum ".buildcache/cache-keys/set-workdir-8253e91d0841cdc71fb0416f84f9eaa52bea9049"}}
|
|
- cache002-install-go-tools_b7a0_{{checksum ".buildcache/cache-keys/install-go-tools-b7a0056ff8c7f40e047993ec4b1c0a6eab3ab44e"}}
|
|
- cache002-install-go_df55_{{checksum ".buildcache/cache-keys/install-go-df55de749899e75ed655c4eab8cb2c22f1028590"}}
|
|
- cache002-base_a1d9_{{checksum ".buildcache/cache-keys/base-a1d961bcff31b1cdadaa9422452ba72d8b4a85a9"}}
|
|
- run:
|
|
command: make -C packages*.lock load-builder-cache
|
|
- run:
|
|
command: make -C packages*.lock package
|
|
- run:
|
|
command: ls -lahR .buildcache/packages
|
|
- save_cache:
|
|
key: cache002-package-2c42b76fce423e8344a693f6338f73fd29e98624-{{checksum ".buildcache/cache-keys/package-2c42b76fce423e8344a693f6338f73fd29e98624"}}
|
|
paths:
|
|
- .buildcache/packages/store
|
|
- run:
|
|
command: |
|
|
if [ -f .buildcache/archives/08-warm-go-build-vendor-cache-0245576886d78da53ffbd161a95bd0ca099e5fc1.tar.gz ]; then
|
|
echo "Builder image already cached, skipping cache step."
|
|
circleci-agent step halt
|
|
fi
|
|
name: Check builder cache status
|
|
- run:
|
|
command: make -f packages*.lock/layer.mk 08-warm-go-build-vendor-cache-0245576886d78da53ffbd161a95bd0ca099e5fc1-save
|
|
- save_cache:
|
|
key: cache002-warm-go-build-vendor-cache_0245_{{checksum ".buildcache/cache-keys/warm-go-build-vendor-cache-0245576886d78da53ffbd161a95bd0ca099e5fc1"}}
|
|
paths:
|
|
- .buildcache/archives/08-warm-go-build-vendor-cache-0245576886d78da53ffbd161a95bd0ca099e5fc1.tar.gz
|
|
test-go-race:
|
|
machine: true
|
|
shell: /usr/bin/env bash -euo pipefail -c
|
|
working_directory: /go/src/github.com/hashicorp/vault
|
|
steps:
|
|
- run:
|
|
command: |
|
|
[ -n "$GO_VERSION" ] || { echo "You must set GO_VERSION"; exit 1; }
|
|
# 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"
|
|
GOPATH="/go"
|
|
mkdir $GOPATH 2>/dev/null || { sudo mkdir $GOPATH && sudo chmod 777 $GOPATH; }
|
|
echo "export GOPATH='$GOPATH'" >> "$BASH_ENV"
|
|
echo "export PATH='$PATH:$GOPATH/bin:/usr/local/go/bin'" >> "$BASH_ENV"
|
|
|
|
echo "$ go version"
|
|
go version
|
|
name: Setup Go
|
|
working_directory: ~/
|
|
- checkout
|
|
- run:
|
|
command: |
|
|
TZ=GMT date '+%Y%m%d' > /tmp/go-cache-key
|
|
name: Compute test cache key
|
|
- restore_cache:
|
|
keys:
|
|
- go-test-cache-date-v1-{{ checksum "/tmp/go-cache-key" }}
|
|
- run:
|
|
command: |
|
|
set -x
|
|
|
|
case "-race" in
|
|
*-race*) VAULT_CI_GO_TEST_RACE=1;;
|
|
esac
|
|
|
|
# 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 /integ \
|
|
| 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= \
|
|
GOCACHE=/tmp/go-cache \
|
|
VAULT_TEST_LOG_DIR=/tmp/testlogs \
|
|
gotestsum --format=short-verbose \
|
|
--junitfile test-results/go-test/results.xml \
|
|
--jsonfile test-results/go-test/results.json \
|
|
-- \
|
|
-tags "${GO_TAGS}" \
|
|
-timeout=60m \
|
|
-parallel=20 \
|
|
-race \
|
|
${package_names}
|
|
name: Run Go tests
|
|
no_output_timeout: 60m
|
|
- store_artifacts:
|
|
path: test-results
|
|
- store_test_results:
|
|
path: test-results
|
|
- store_artifacts:
|
|
path: /tmp/testlogs
|
|
environment:
|
|
- CIRCLECI_CLI_VERSION: 0.1.5546
|
|
- GO_TAGS: ''
|
|
- GO_VERSION: 1.14.7
|
|
- GO111MODULE: 'off'
|
|
- GOTESTSUM_VERSION: 0.5.2
|
|
freebsd_amd64_package:
|
|
docker:
|
|
- image: circleci/buildpack-deps
|
|
shell: /usr/bin/env bash -euo pipefail -c
|
|
environment:
|
|
- AUTO_INSTALL_TOOLS: 'YES'
|
|
- PRODUCT_REVISION: ''
|
|
- PACKAGE_SPEC_ID: 3b321dd5965180de92badfcb47e1d7d9fefad345
|
|
steps:
|
|
- setup_remote_docker
|
|
- checkout
|
|
- run:
|
|
command: make -C packages*.lock write-package-cache-key
|
|
name: Write package cache key
|
|
- restore_cache:
|
|
key: cache002-package-3b321dd5965180de92badfcb47e1d7d9fefad345-{{checksum ".buildcache/cache-keys/package-3b321dd5965180de92badfcb47e1d7d9fefad345"}}
|
|
- run:
|
|
command: |
|
|
if ! { PKG=$(find .buildcache/packages/store -maxdepth 1 -mindepth 1 -name '*.zip' 2> /dev/null) && [ -n "$PKG" ]; }; then
|
|
echo "No package found, continuing with build."
|
|
exit 0
|
|
fi
|
|
echo "Package already cached, skipping build."
|
|
circleci-agent step halt
|
|
name: Check the cache status.
|
|
- run:
|
|
command: make -C packages*.lock write-builder-cache-keys
|
|
name: Write builder layer cache keys
|
|
- restore_cache:
|
|
keys:
|
|
- cache002-copy-source_ac4d_{{checksum ".buildcache/cache-keys/copy-source-ac4d6f4024842c4a8e5893d22c0dfff9153ff69f"}}
|
|
- cache002-warm-go-build-vendor-cache_596d_{{checksum ".buildcache/cache-keys/warm-go-build-vendor-cache-596df758f200592b1270d44ea6a1b934949913f4"}}
|
|
- cache002-build-static-assets_33a6_{{checksum ".buildcache/cache-keys/build-static-assets-33a6e8f0029b730ae0a37427888d22c992a0824e"}}
|
|
- cache002-build-ui_5659_{{checksum ".buildcache/cache-keys/build-ui-5659d3f1f758c2f3a4c5fca4c1fcbaac3720693b"}}
|
|
- cache002-ui-dependencies_58f2_{{checksum ".buildcache/cache-keys/ui-dependencies-58f2ea77b8fe39e82bb587e5246d1b62f9a7cb81"}}
|
|
- cache002-install-yarn_aab7_{{checksum ".buildcache/cache-keys/install-yarn-aab71c56a60048647c1c6c4a7fd5649aee7f2319"}}
|
|
- cache002-set-workdir_8253_{{checksum ".buildcache/cache-keys/set-workdir-8253e91d0841cdc71fb0416f84f9eaa52bea9049"}}
|
|
- cache002-install-go-tools_b7a0_{{checksum ".buildcache/cache-keys/install-go-tools-b7a0056ff8c7f40e047993ec4b1c0a6eab3ab44e"}}
|
|
- cache002-install-go_df55_{{checksum ".buildcache/cache-keys/install-go-df55de749899e75ed655c4eab8cb2c22f1028590"}}
|
|
- cache002-base_a1d9_{{checksum ".buildcache/cache-keys/base-a1d961bcff31b1cdadaa9422452ba72d8b4a85a9"}}
|
|
- run:
|
|
command: make -C packages*.lock load-builder-cache
|
|
- run:
|
|
command: make -C packages*.lock package
|
|
- run:
|
|
command: ls -lahR .buildcache/packages
|
|
- save_cache:
|
|
key: cache002-package-3b321dd5965180de92badfcb47e1d7d9fefad345-{{checksum ".buildcache/cache-keys/package-3b321dd5965180de92badfcb47e1d7d9fefad345"}}
|
|
paths:
|
|
- .buildcache/packages/store
|
|
- run:
|
|
command: |
|
|
if [ -f .buildcache/archives/08-warm-go-build-vendor-cache-596df758f200592b1270d44ea6a1b934949913f4.tar.gz ]; then
|
|
echo "Builder image already cached, skipping cache step."
|
|
circleci-agent step halt
|
|
fi
|
|
name: Check builder cache status
|
|
- run:
|
|
command: make -f packages*.lock/layer.mk 08-warm-go-build-vendor-cache-596df758f200592b1270d44ea6a1b934949913f4-save
|
|
- save_cache:
|
|
key: cache002-warm-go-build-vendor-cache_596d_{{checksum ".buildcache/cache-keys/warm-go-build-vendor-cache-596df758f200592b1270d44ea6a1b934949913f4"}}
|
|
paths:
|
|
- .buildcache/archives/08-warm-go-build-vendor-cache-596df758f200592b1270d44ea6a1b934949913f4.tar.gz
|
|
openbsd_386_package:
|
|
docker:
|
|
- image: circleci/buildpack-deps
|
|
shell: /usr/bin/env bash -euo pipefail -c
|
|
environment:
|
|
- AUTO_INSTALL_TOOLS: 'YES'
|
|
- PRODUCT_REVISION: ''
|
|
- PACKAGE_SPEC_ID: 5fc368162156389c1b51df490a8e90a752ec0dcb
|
|
steps:
|
|
- setup_remote_docker
|
|
- checkout
|
|
- run:
|
|
command: make -C packages*.lock write-package-cache-key
|
|
name: Write package cache key
|
|
- restore_cache:
|
|
key: cache002-package-5fc368162156389c1b51df490a8e90a752ec0dcb-{{checksum ".buildcache/cache-keys/package-5fc368162156389c1b51df490a8e90a752ec0dcb"}}
|
|
- run:
|
|
command: |
|
|
if ! { PKG=$(find .buildcache/packages/store -maxdepth 1 -mindepth 1 -name '*.zip' 2> /dev/null) && [ -n "$PKG" ]; }; then
|
|
echo "No package found, continuing with build."
|
|
exit 0
|
|
fi
|
|
echo "Package already cached, skipping build."
|
|
circleci-agent step halt
|
|
name: Check the cache status.
|
|
- run:
|
|
command: make -C packages*.lock write-builder-cache-keys
|
|
name: Write builder layer cache keys
|
|
- restore_cache:
|
|
keys:
|
|
- cache002-copy-source_9e44_{{checksum ".buildcache/cache-keys/copy-source-9e44025163546ef6ed36d41a77b027c8d02ae044"}}
|
|
- cache002-warm-go-build-vendor-cache_b4bd_{{checksum ".buildcache/cache-keys/warm-go-build-vendor-cache-b4bd76934c25a387356bd1fb0e28c95124eef902"}}
|
|
- cache002-build-static-assets_33a6_{{checksum ".buildcache/cache-keys/build-static-assets-33a6e8f0029b730ae0a37427888d22c992a0824e"}}
|
|
- cache002-build-ui_5659_{{checksum ".buildcache/cache-keys/build-ui-5659d3f1f758c2f3a4c5fca4c1fcbaac3720693b"}}
|
|
- cache002-ui-dependencies_58f2_{{checksum ".buildcache/cache-keys/ui-dependencies-58f2ea77b8fe39e82bb587e5246d1b62f9a7cb81"}}
|
|
- cache002-install-yarn_aab7_{{checksum ".buildcache/cache-keys/install-yarn-aab71c56a60048647c1c6c4a7fd5649aee7f2319"}}
|
|
- cache002-set-workdir_8253_{{checksum ".buildcache/cache-keys/set-workdir-8253e91d0841cdc71fb0416f84f9eaa52bea9049"}}
|
|
- cache002-install-go-tools_b7a0_{{checksum ".buildcache/cache-keys/install-go-tools-b7a0056ff8c7f40e047993ec4b1c0a6eab3ab44e"}}
|
|
- cache002-install-go_df55_{{checksum ".buildcache/cache-keys/install-go-df55de749899e75ed655c4eab8cb2c22f1028590"}}
|
|
- cache002-base_a1d9_{{checksum ".buildcache/cache-keys/base-a1d961bcff31b1cdadaa9422452ba72d8b4a85a9"}}
|
|
- run:
|
|
command: make -C packages*.lock load-builder-cache
|
|
- run:
|
|
command: make -C packages*.lock package
|
|
- run:
|
|
command: ls -lahR .buildcache/packages
|
|
- save_cache:
|
|
key: cache002-package-5fc368162156389c1b51df490a8e90a752ec0dcb-{{checksum ".buildcache/cache-keys/package-5fc368162156389c1b51df490a8e90a752ec0dcb"}}
|
|
paths:
|
|
- .buildcache/packages/store
|
|
- run:
|
|
command: |
|
|
if [ -f .buildcache/archives/08-warm-go-build-vendor-cache-b4bd76934c25a387356bd1fb0e28c95124eef902.tar.gz ]; then
|
|
echo "Builder image already cached, skipping cache step."
|
|
circleci-agent step halt
|
|
fi
|
|
name: Check builder cache status
|
|
- run:
|
|
command: make -f packages*.lock/layer.mk 08-warm-go-build-vendor-cache-b4bd76934c25a387356bd1fb0e28c95124eef902-save
|
|
- save_cache:
|
|
key: cache002-warm-go-build-vendor-cache_b4bd_{{checksum ".buildcache/cache-keys/warm-go-build-vendor-cache-b4bd76934c25a387356bd1fb0e28c95124eef902"}}
|
|
paths:
|
|
- .buildcache/archives/08-warm-go-build-vendor-cache-b4bd76934c25a387356bd1fb0e28c95124eef902.tar.gz
|
|
linux_amd64_package:
|
|
docker:
|
|
- image: circleci/buildpack-deps
|
|
shell: /usr/bin/env bash -euo pipefail -c
|
|
environment:
|
|
- AUTO_INSTALL_TOOLS: 'YES'
|
|
- PRODUCT_REVISION: ''
|
|
- PACKAGE_SPEC_ID: 9297f3261f472d23a5c60680d84edfa4a96314aa
|
|
steps:
|
|
- setup_remote_docker
|
|
- checkout
|
|
- run:
|
|
command: make -C packages*.lock write-package-cache-key
|
|
name: Write package cache key
|
|
- restore_cache:
|
|
key: cache002-package-9297f3261f472d23a5c60680d84edfa4a96314aa-{{checksum ".buildcache/cache-keys/package-9297f3261f472d23a5c60680d84edfa4a96314aa"}}
|
|
- run:
|
|
command: |
|
|
if ! { PKG=$(find .buildcache/packages/store -maxdepth 1 -mindepth 1 -name '*.zip' 2> /dev/null) && [ -n "$PKG" ]; }; then
|
|
echo "No package found, continuing with build."
|
|
exit 0
|
|
fi
|
|
echo "Package already cached, skipping build."
|
|
circleci-agent step halt
|
|
name: Check the cache status.
|
|
- run:
|
|
command: make -C packages*.lock write-builder-cache-keys
|
|
name: Write builder layer cache keys
|
|
- restore_cache:
|
|
keys:
|
|
- cache002-copy-source_679a_{{checksum ".buildcache/cache-keys/copy-source-679a76162b839df3b7ee21a5bac42c44533454c8"}}
|
|
- cache002-warm-go-build-vendor-cache_6f6a_{{checksum ".buildcache/cache-keys/warm-go-build-vendor-cache-6f6af7dce883f6e1b09b7c622ff1b527ea5f77f1"}}
|
|
- cache002-build-static-assets_33a6_{{checksum ".buildcache/cache-keys/build-static-assets-33a6e8f0029b730ae0a37427888d22c992a0824e"}}
|
|
- cache002-build-ui_5659_{{checksum ".buildcache/cache-keys/build-ui-5659d3f1f758c2f3a4c5fca4c1fcbaac3720693b"}}
|
|
- cache002-ui-dependencies_58f2_{{checksum ".buildcache/cache-keys/ui-dependencies-58f2ea77b8fe39e82bb587e5246d1b62f9a7cb81"}}
|
|
- cache002-install-yarn_aab7_{{checksum ".buildcache/cache-keys/install-yarn-aab71c56a60048647c1c6c4a7fd5649aee7f2319"}}
|
|
- cache002-set-workdir_8253_{{checksum ".buildcache/cache-keys/set-workdir-8253e91d0841cdc71fb0416f84f9eaa52bea9049"}}
|
|
- cache002-install-go-tools_b7a0_{{checksum ".buildcache/cache-keys/install-go-tools-b7a0056ff8c7f40e047993ec4b1c0a6eab3ab44e"}}
|
|
- cache002-install-go_df55_{{checksum ".buildcache/cache-keys/install-go-df55de749899e75ed655c4eab8cb2c22f1028590"}}
|
|
- cache002-base_a1d9_{{checksum ".buildcache/cache-keys/base-a1d961bcff31b1cdadaa9422452ba72d8b4a85a9"}}
|
|
- run:
|
|
command: make -C packages*.lock load-builder-cache
|
|
- run:
|
|
command: make -C packages*.lock package
|
|
- run:
|
|
command: ls -lahR .buildcache/packages
|
|
- save_cache:
|
|
key: cache002-package-9297f3261f472d23a5c60680d84edfa4a96314aa-{{checksum ".buildcache/cache-keys/package-9297f3261f472d23a5c60680d84edfa4a96314aa"}}
|
|
paths:
|
|
- .buildcache/packages/store
|
|
- run:
|
|
command: |
|
|
if [ -f .buildcache/archives/08-warm-go-build-vendor-cache-6f6af7dce883f6e1b09b7c622ff1b527ea5f77f1.tar.gz ]; then
|
|
echo "Builder image already cached, skipping cache step."
|
|
circleci-agent step halt
|
|
fi
|
|
name: Check builder cache status
|
|
- run:
|
|
command: make -f packages*.lock/layer.mk 08-warm-go-build-vendor-cache-6f6af7dce883f6e1b09b7c622ff1b527ea5f77f1-save
|
|
- save_cache:
|
|
key: cache002-warm-go-build-vendor-cache_6f6a_{{checksum ".buildcache/cache-keys/warm-go-build-vendor-cache-6f6af7dce883f6e1b09b7c622ff1b527ea5f77f1"}}
|
|
paths:
|
|
- .buildcache/archives/08-warm-go-build-vendor-cache-6f6af7dce883f6e1b09b7c622ff1b527ea5f77f1.tar.gz
|
|
website-docker-image:
|
|
docker:
|
|
- image: circleci/buildpack-deps
|
|
shell: /usr/bin/env bash -euo pipefail -c
|
|
steps:
|
|
- checkout
|
|
- setup_remote_docker
|
|
- run:
|
|
command: |
|
|
IMAGE_TAG="$(git rev-list -n1 HEAD -- website/Dockerfile website/package-lock.json)"
|
|
echo "Using $IMAGE_TAG"
|
|
if [ "$CIRCLE_REPOSITORY_URL" != "git@github.com:hashicorp/vault.git" ]; then
|
|
echo "Not Vault OSS Repo, not building website docker image"
|
|
elif curl https://hub.docker.com/v2/repositories/hashicorp/vault-website/tags/$IMAGE_TAG -fsL > /dev/null; then
|
|
echo "Dependencies have not changed, not building a new website docker image."
|
|
else
|
|
cd website/
|
|
docker build -t hashicorp/vault-website:$IMAGE_TAG .
|
|
docker tag hashicorp/vault-website:$IMAGE_TAG hashicorp/vault-website:latest
|
|
docker login -u $WEBSITE_DOCKER_USER -p $WEBSITE_DOCKER_PASS
|
|
docker push hashicorp/vault-website
|
|
fi
|
|
name: Build Docker Image if Necessary
|
|
solaris_amd64_package:
|
|
docker:
|
|
- image: circleci/buildpack-deps
|
|
shell: /usr/bin/env bash -euo pipefail -c
|
|
environment:
|
|
- AUTO_INSTALL_TOOLS: 'YES'
|
|
- PRODUCT_REVISION: ''
|
|
- PACKAGE_SPEC_ID: 4d598d9ae868f9aa6558d2a7e867387255eaaca2
|
|
steps:
|
|
- setup_remote_docker
|
|
- checkout
|
|
- run:
|
|
command: make -C packages*.lock write-package-cache-key
|
|
name: Write package cache key
|
|
- restore_cache:
|
|
key: cache002-package-4d598d9ae868f9aa6558d2a7e867387255eaaca2-{{checksum ".buildcache/cache-keys/package-4d598d9ae868f9aa6558d2a7e867387255eaaca2"}}
|
|
- run:
|
|
command: |
|
|
if ! { PKG=$(find .buildcache/packages/store -maxdepth 1 -mindepth 1 -name '*.zip' 2> /dev/null) && [ -n "$PKG" ]; }; then
|
|
echo "No package found, continuing with build."
|
|
exit 0
|
|
fi
|
|
echo "Package already cached, skipping build."
|
|
circleci-agent step halt
|
|
name: Check the cache status.
|
|
- run:
|
|
command: make -C packages*.lock write-builder-cache-keys
|
|
name: Write builder layer cache keys
|
|
- restore_cache:
|
|
keys:
|
|
- cache002-copy-source_60a5_{{checksum ".buildcache/cache-keys/copy-source-60a56a8f1d39f238d784cb1129f22ccaafe580de"}}
|
|
- cache002-warm-go-build-vendor-cache_a088_{{checksum ".buildcache/cache-keys/warm-go-build-vendor-cache-a0884ebd3bcd667787991bce276f3a9be2061998"}}
|
|
- cache002-build-static-assets_33a6_{{checksum ".buildcache/cache-keys/build-static-assets-33a6e8f0029b730ae0a37427888d22c992a0824e"}}
|
|
- cache002-build-ui_5659_{{checksum ".buildcache/cache-keys/build-ui-5659d3f1f758c2f3a4c5fca4c1fcbaac3720693b"}}
|
|
- cache002-ui-dependencies_58f2_{{checksum ".buildcache/cache-keys/ui-dependencies-58f2ea77b8fe39e82bb587e5246d1b62f9a7cb81"}}
|
|
- cache002-install-yarn_aab7_{{checksum ".buildcache/cache-keys/install-yarn-aab71c56a60048647c1c6c4a7fd5649aee7f2319"}}
|
|
- cache002-set-workdir_8253_{{checksum ".buildcache/cache-keys/set-workdir-8253e91d0841cdc71fb0416f84f9eaa52bea9049"}}
|
|
- cache002-install-go-tools_b7a0_{{checksum ".buildcache/cache-keys/install-go-tools-b7a0056ff8c7f40e047993ec4b1c0a6eab3ab44e"}}
|
|
- cache002-install-go_df55_{{checksum ".buildcache/cache-keys/install-go-df55de749899e75ed655c4eab8cb2c22f1028590"}}
|
|
- cache002-base_a1d9_{{checksum ".buildcache/cache-keys/base-a1d961bcff31b1cdadaa9422452ba72d8b4a85a9"}}
|
|
- run:
|
|
command: make -C packages*.lock load-builder-cache
|
|
- run:
|
|
command: make -C packages*.lock package
|
|
- run:
|
|
command: ls -lahR .buildcache/packages
|
|
- save_cache:
|
|
key: cache002-package-4d598d9ae868f9aa6558d2a7e867387255eaaca2-{{checksum ".buildcache/cache-keys/package-4d598d9ae868f9aa6558d2a7e867387255eaaca2"}}
|
|
paths:
|
|
- .buildcache/packages/store
|
|
- run:
|
|
command: |
|
|
if [ -f .buildcache/archives/08-warm-go-build-vendor-cache-a0884ebd3bcd667787991bce276f3a9be2061998.tar.gz ]; then
|
|
echo "Builder image already cached, skipping cache step."
|
|
circleci-agent step halt
|
|
fi
|
|
name: Check builder cache status
|
|
- run:
|
|
command: make -f packages*.lock/layer.mk 08-warm-go-build-vendor-cache-a0884ebd3bcd667787991bce276f3a9be2061998-save
|
|
- save_cache:
|
|
key: cache002-warm-go-build-vendor-cache_a088_{{checksum ".buildcache/cache-keys/warm-go-build-vendor-cache-a0884ebd3bcd667787991bce276f3a9be2061998"}}
|
|
paths:
|
|
- .buildcache/archives/08-warm-go-build-vendor-cache-a0884ebd3bcd667787991bce276f3a9be2061998.tar.gz
|
|
test-go:
|
|
machine: true
|
|
shell: /usr/bin/env bash -euo pipefail -c
|
|
working_directory: /go/src/github.com/hashicorp/vault
|
|
parallelism: 2
|
|
steps:
|
|
- run:
|
|
command: |
|
|
# If the branch being tested starts with ui/ or docs/ we want to exit the job without failing
|
|
[[ "$CIRCLE_BRANCH" = ui/* || "$CIRCLE_BRANCH" = docs/* ]] && {
|
|
# stop the job from this step
|
|
circleci-agent step halt
|
|
}
|
|
# exit with success either way
|
|
exit 0
|
|
name: Check branch name
|
|
working_directory: ~/
|
|
- run:
|
|
command: |
|
|
[ -n "$GO_VERSION" ] || { echo "You must set GO_VERSION"; exit 1; }
|
|
# 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"
|
|
GOPATH="/go"
|
|
mkdir $GOPATH 2>/dev/null || { sudo mkdir $GOPATH && sudo chmod 777 $GOPATH; }
|
|
echo "export GOPATH='$GOPATH'" >> "$BASH_ENV"
|
|
echo "export PATH='$PATH:$GOPATH/bin:/usr/local/go/bin'" >> "$BASH_ENV"
|
|
|
|
echo "$ go version"
|
|
go version
|
|
name: Setup Go
|
|
working_directory: ~/
|
|
- checkout
|
|
- run:
|
|
command: |
|
|
TZ=GMT date '+%Y%m%d' > /tmp/go-cache-key
|
|
name: Compute test cache key
|
|
- restore_cache:
|
|
keys:
|
|
- go-test-cache-date-v1-{{ checksum "/tmp/go-cache-key" }}
|
|
- run:
|
|
command: |
|
|
set -x
|
|
|
|
case "" in
|
|
*-race*) VAULT_CI_GO_TEST_RACE=1;;
|
|
esac
|
|
|
|
# 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 /integ \
|
|
| 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= \
|
|
GOCACHE=/tmp/go-cache \
|
|
VAULT_TEST_LOG_DIR=/tmp/testlogs \
|
|
gotestsum --format=short-verbose \
|
|
--junitfile test-results/go-test/results.xml \
|
|
--jsonfile test-results/go-test/results.json \
|
|
-- \
|
|
-tags "${GO_TAGS}" \
|
|
-timeout=60m \
|
|
-parallel=20 \
|
|
\
|
|
${package_names}
|
|
name: Run Go tests
|
|
no_output_timeout: 60m
|
|
- store_artifacts:
|
|
path: test-results
|
|
- store_test_results:
|
|
path: test-results
|
|
- store_artifacts:
|
|
path: /tmp/testlogs
|
|
environment:
|
|
- CIRCLECI_CLI_VERSION: 0.1.5546
|
|
- GO_TAGS: ''
|
|
- GO_VERSION: 1.14.7
|
|
- GO111MODULE: 'off'
|
|
- GOTESTSUM_VERSION: 0.5.2
|
|
test-go-nightly:
|
|
machine: true
|
|
shell: /usr/bin/env bash -euo pipefail -c
|
|
working_directory: /go/src/github.com/hashicorp/vault
|
|
steps:
|
|
- run:
|
|
command: |
|
|
# If the branch being tested starts with ui/ or docs/ we want to exit the job without failing
|
|
[[ "$CIRCLE_BRANCH" = ui/* || "$CIRCLE_BRANCH" = docs/* ]] && {
|
|
# stop the job from this step
|
|
circleci-agent step halt
|
|
}
|
|
# exit with success either way
|
|
exit 0
|
|
name: Check branch name
|
|
working_directory: ~/
|
|
- run:
|
|
command: |
|
|
[ -n "$GO_VERSION" ] || { echo "You must set GO_VERSION"; exit 1; }
|
|
# 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"
|
|
GOPATH="/go"
|
|
mkdir $GOPATH 2>/dev/null || { sudo mkdir $GOPATH && sudo chmod 777 $GOPATH; }
|
|
echo "export GOPATH='$GOPATH'" >> "$BASH_ENV"
|
|
echo "export PATH='$PATH:$GOPATH/bin:/usr/local/go/bin'" >> "$BASH_ENV"
|
|
|
|
echo "$ go version"
|
|
go version
|
|
name: Setup Go
|
|
working_directory: ~/
|
|
- checkout
|
|
- run:
|
|
command: |
|
|
TZ=GMT date '+%Y%m%d' > /tmp/go-cache-key
|
|
name: Compute test cache key
|
|
- restore_cache:
|
|
keys:
|
|
- go-test-cache-date-v1-{{ checksum "/tmp/go-cache-key" }}
|
|
- run:
|
|
command: |
|
|
set -x
|
|
|
|
case "" in
|
|
*-race*) VAULT_CI_GO_TEST_RACE=1;;
|
|
esac
|
|
|
|
# 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 /integ \
|
|
| 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= \
|
|
GOCACHE=/tmp/go-cache \
|
|
VAULT_TEST_LOG_DIR=/tmp/testlogs \
|
|
gotestsum --format=short-verbose \
|
|
--junitfile test-results/go-test/results.xml \
|
|
--jsonfile test-results/go-test/results.json \
|
|
-- \
|
|
-tags "${GO_TAGS}" \
|
|
-timeout=60m \
|
|
-parallel=20 \
|
|
\
|
|
${package_names}
|
|
name: Run Go tests
|
|
no_output_timeout: 60m
|
|
- save_cache:
|
|
key: go-test-cache-date-v1-{{ checksum "/tmp/go-cache-key" }}
|
|
paths:
|
|
- /tmp/go-cache
|
|
when: always
|
|
- store_artifacts:
|
|
path: test-results
|
|
- store_test_results:
|
|
path: test-results
|
|
- store_artifacts:
|
|
path: /tmp/testlogs
|
|
environment:
|
|
- CIRCLECI_CLI_VERSION: 0.1.5546
|
|
- GO_TAGS: ''
|
|
- GO_VERSION: 1.14.7
|
|
- GO111MODULE: 'off'
|
|
- GOTESTSUM_VERSION: 0.5.2
|
|
netbsd_amd64_package:
|
|
docker:
|
|
- image: circleci/buildpack-deps
|
|
shell: /usr/bin/env bash -euo pipefail -c
|
|
environment:
|
|
- AUTO_INSTALL_TOOLS: 'YES'
|
|
- PRODUCT_REVISION: ''
|
|
- PACKAGE_SPEC_ID: c10a90c43455013e1fa0728c48ea3d191c898708
|
|
steps:
|
|
- setup_remote_docker
|
|
- checkout
|
|
- run:
|
|
command: make -C packages*.lock write-package-cache-key
|
|
name: Write package cache key
|
|
- restore_cache:
|
|
key: cache002-package-c10a90c43455013e1fa0728c48ea3d191c898708-{{checksum ".buildcache/cache-keys/package-c10a90c43455013e1fa0728c48ea3d191c898708"}}
|
|
- run:
|
|
command: |
|
|
if ! { PKG=$(find .buildcache/packages/store -maxdepth 1 -mindepth 1 -name '*.zip' 2> /dev/null) && [ -n "$PKG" ]; }; then
|
|
echo "No package found, continuing with build."
|
|
exit 0
|
|
fi
|
|
echo "Package already cached, skipping build."
|
|
circleci-agent step halt
|
|
name: Check the cache status.
|
|
- run:
|
|
command: make -C packages*.lock write-builder-cache-keys
|
|
name: Write builder layer cache keys
|
|
- restore_cache:
|
|
keys:
|
|
- cache002-copy-source_1819_{{checksum ".buildcache/cache-keys/copy-source-18193d6bd814c6d4efbbc07eacb02c69434894e1"}}
|
|
- cache002-warm-go-build-vendor-cache_92c6_{{checksum ".buildcache/cache-keys/warm-go-build-vendor-cache-92c62793dfcc5b64255bfe2356532882a7d7b3aa"}}
|
|
- cache002-build-static-assets_33a6_{{checksum ".buildcache/cache-keys/build-static-assets-33a6e8f0029b730ae0a37427888d22c992a0824e"}}
|
|
- cache002-build-ui_5659_{{checksum ".buildcache/cache-keys/build-ui-5659d3f1f758c2f3a4c5fca4c1fcbaac3720693b"}}
|
|
- cache002-ui-dependencies_58f2_{{checksum ".buildcache/cache-keys/ui-dependencies-58f2ea77b8fe39e82bb587e5246d1b62f9a7cb81"}}
|
|
- cache002-install-yarn_aab7_{{checksum ".buildcache/cache-keys/install-yarn-aab71c56a60048647c1c6c4a7fd5649aee7f2319"}}
|
|
- cache002-set-workdir_8253_{{checksum ".buildcache/cache-keys/set-workdir-8253e91d0841cdc71fb0416f84f9eaa52bea9049"}}
|
|
- cache002-install-go-tools_b7a0_{{checksum ".buildcache/cache-keys/install-go-tools-b7a0056ff8c7f40e047993ec4b1c0a6eab3ab44e"}}
|
|
- cache002-install-go_df55_{{checksum ".buildcache/cache-keys/install-go-df55de749899e75ed655c4eab8cb2c22f1028590"}}
|
|
- cache002-base_a1d9_{{checksum ".buildcache/cache-keys/base-a1d961bcff31b1cdadaa9422452ba72d8b4a85a9"}}
|
|
- run:
|
|
command: make -C packages*.lock load-builder-cache
|
|
- run:
|
|
command: make -C packages*.lock package
|
|
- run:
|
|
command: ls -lahR .buildcache/packages
|
|
- save_cache:
|
|
key: cache002-package-c10a90c43455013e1fa0728c48ea3d191c898708-{{checksum ".buildcache/cache-keys/package-c10a90c43455013e1fa0728c48ea3d191c898708"}}
|
|
paths:
|
|
- .buildcache/packages/store
|
|
- run:
|
|
command: |
|
|
if [ -f .buildcache/archives/08-warm-go-build-vendor-cache-92c62793dfcc5b64255bfe2356532882a7d7b3aa.tar.gz ]; then
|
|
echo "Builder image already cached, skipping cache step."
|
|
circleci-agent step halt
|
|
fi
|
|
name: Check builder cache status
|
|
- run:
|
|
command: make -f packages*.lock/layer.mk 08-warm-go-build-vendor-cache-92c62793dfcc5b64255bfe2356532882a7d7b3aa-save
|
|
- save_cache:
|
|
key: cache002-warm-go-build-vendor-cache_92c6_{{checksum ".buildcache/cache-keys/warm-go-build-vendor-cache-92c62793dfcc5b64255bfe2356532882a7d7b3aa"}}
|
|
paths:
|
|
- .buildcache/archives/08-warm-go-build-vendor-cache-92c62793dfcc5b64255bfe2356532882a7d7b3aa.tar.gz
|
|
openbsd_amd64_package:
|
|
docker:
|
|
- image: circleci/buildpack-deps
|
|
shell: /usr/bin/env bash -euo pipefail -c
|
|
environment:
|
|
- AUTO_INSTALL_TOOLS: 'YES'
|
|
- PRODUCT_REVISION: ''
|
|
- PACKAGE_SPEC_ID: d2c7b10d9e440b8ef015ec1d1d9b8552d00a83e4
|
|
steps:
|
|
- setup_remote_docker
|
|
- checkout
|
|
- run:
|
|
command: make -C packages*.lock write-package-cache-key
|
|
name: Write package cache key
|
|
- restore_cache:
|
|
key: cache002-package-d2c7b10d9e440b8ef015ec1d1d9b8552d00a83e4-{{checksum ".buildcache/cache-keys/package-d2c7b10d9e440b8ef015ec1d1d9b8552d00a83e4"}}
|
|
- run:
|
|
command: |
|
|
if ! { PKG=$(find .buildcache/packages/store -maxdepth 1 -mindepth 1 -name '*.zip' 2> /dev/null) && [ -n "$PKG" ]; }; then
|
|
echo "No package found, continuing with build."
|
|
exit 0
|
|
fi
|
|
echo "Package already cached, skipping build."
|
|
circleci-agent step halt
|
|
name: Check the cache status.
|
|
- run:
|
|
command: make -C packages*.lock write-builder-cache-keys
|
|
name: Write builder layer cache keys
|
|
- restore_cache:
|
|
keys:
|
|
- cache002-copy-source_349c_{{checksum ".buildcache/cache-keys/copy-source-349c919c8e22d66bcd624b975da386c3fc5ab716"}}
|
|
- cache002-warm-go-build-vendor-cache_7d95_{{checksum ".buildcache/cache-keys/warm-go-build-vendor-cache-7d95ca17ed2ed063335c6fdfe31177f9d88dc293"}}
|
|
- cache002-build-static-assets_33a6_{{checksum ".buildcache/cache-keys/build-static-assets-33a6e8f0029b730ae0a37427888d22c992a0824e"}}
|
|
- cache002-build-ui_5659_{{checksum ".buildcache/cache-keys/build-ui-5659d3f1f758c2f3a4c5fca4c1fcbaac3720693b"}}
|
|
- cache002-ui-dependencies_58f2_{{checksum ".buildcache/cache-keys/ui-dependencies-58f2ea77b8fe39e82bb587e5246d1b62f9a7cb81"}}
|
|
- cache002-install-yarn_aab7_{{checksum ".buildcache/cache-keys/install-yarn-aab71c56a60048647c1c6c4a7fd5649aee7f2319"}}
|
|
- cache002-set-workdir_8253_{{checksum ".buildcache/cache-keys/set-workdir-8253e91d0841cdc71fb0416f84f9eaa52bea9049"}}
|
|
- cache002-install-go-tools_b7a0_{{checksum ".buildcache/cache-keys/install-go-tools-b7a0056ff8c7f40e047993ec4b1c0a6eab3ab44e"}}
|
|
- cache002-install-go_df55_{{checksum ".buildcache/cache-keys/install-go-df55de749899e75ed655c4eab8cb2c22f1028590"}}
|
|
- cache002-base_a1d9_{{checksum ".buildcache/cache-keys/base-a1d961bcff31b1cdadaa9422452ba72d8b4a85a9"}}
|
|
- run:
|
|
command: make -C packages*.lock load-builder-cache
|
|
- run:
|
|
command: make -C packages*.lock package
|
|
- run:
|
|
command: ls -lahR .buildcache/packages
|
|
- save_cache:
|
|
key: cache002-package-d2c7b10d9e440b8ef015ec1d1d9b8552d00a83e4-{{checksum ".buildcache/cache-keys/package-d2c7b10d9e440b8ef015ec1d1d9b8552d00a83e4"}}
|
|
paths:
|
|
- .buildcache/packages/store
|
|
- run:
|
|
command: |
|
|
if [ -f .buildcache/archives/08-warm-go-build-vendor-cache-7d95ca17ed2ed063335c6fdfe31177f9d88dc293.tar.gz ]; then
|
|
echo "Builder image already cached, skipping cache step."
|
|
circleci-agent step halt
|
|
fi
|
|
name: Check builder cache status
|
|
- run:
|
|
command: make -f packages*.lock/layer.mk 08-warm-go-build-vendor-cache-7d95ca17ed2ed063335c6fdfe31177f9d88dc293-save
|
|
- save_cache:
|
|
key: cache002-warm-go-build-vendor-cache_7d95_{{checksum ".buildcache/cache-keys/warm-go-build-vendor-cache-7d95ca17ed2ed063335c6fdfe31177f9d88dc293"}}
|
|
paths:
|
|
- .buildcache/archives/08-warm-go-build-vendor-cache-7d95ca17ed2ed063335c6fdfe31177f9d88dc293.tar.gz
|
|
netbsd_386_package:
|
|
docker:
|
|
- image: circleci/buildpack-deps
|
|
shell: /usr/bin/env bash -euo pipefail -c
|
|
environment:
|
|
- AUTO_INSTALL_TOOLS: 'YES'
|
|
- PRODUCT_REVISION: ''
|
|
- PACKAGE_SPEC_ID: 8e6c5ce10bd50ee45b5b7331c070b2ab238bb6f5
|
|
steps:
|
|
- setup_remote_docker
|
|
- checkout
|
|
- run:
|
|
command: make -C packages*.lock write-package-cache-key
|
|
name: Write package cache key
|
|
- restore_cache:
|
|
key: cache002-package-8e6c5ce10bd50ee45b5b7331c070b2ab238bb6f5-{{checksum ".buildcache/cache-keys/package-8e6c5ce10bd50ee45b5b7331c070b2ab238bb6f5"}}
|
|
- run:
|
|
command: |
|
|
if ! { PKG=$(find .buildcache/packages/store -maxdepth 1 -mindepth 1 -name '*.zip' 2> /dev/null) && [ -n "$PKG" ]; }; then
|
|
echo "No package found, continuing with build."
|
|
exit 0
|
|
fi
|
|
echo "Package already cached, skipping build."
|
|
circleci-agent step halt
|
|
name: Check the cache status.
|
|
- run:
|
|
command: make -C packages*.lock write-builder-cache-keys
|
|
name: Write builder layer cache keys
|
|
- restore_cache:
|
|
keys:
|
|
- cache002-copy-source_390a_{{checksum ".buildcache/cache-keys/copy-source-390a90074e7186bf31ffb8081efb4bdd47a1d052"}}
|
|
- cache002-warm-go-build-vendor-cache_4e5f_{{checksum ".buildcache/cache-keys/warm-go-build-vendor-cache-4e5f0a9a53d17957205ff9c63cd50d3161af517a"}}
|
|
- cache002-build-static-assets_33a6_{{checksum ".buildcache/cache-keys/build-static-assets-33a6e8f0029b730ae0a37427888d22c992a0824e"}}
|
|
- cache002-build-ui_5659_{{checksum ".buildcache/cache-keys/build-ui-5659d3f1f758c2f3a4c5fca4c1fcbaac3720693b"}}
|
|
- cache002-ui-dependencies_58f2_{{checksum ".buildcache/cache-keys/ui-dependencies-58f2ea77b8fe39e82bb587e5246d1b62f9a7cb81"}}
|
|
- cache002-install-yarn_aab7_{{checksum ".buildcache/cache-keys/install-yarn-aab71c56a60048647c1c6c4a7fd5649aee7f2319"}}
|
|
- cache002-set-workdir_8253_{{checksum ".buildcache/cache-keys/set-workdir-8253e91d0841cdc71fb0416f84f9eaa52bea9049"}}
|
|
- cache002-install-go-tools_b7a0_{{checksum ".buildcache/cache-keys/install-go-tools-b7a0056ff8c7f40e047993ec4b1c0a6eab3ab44e"}}
|
|
- cache002-install-go_df55_{{checksum ".buildcache/cache-keys/install-go-df55de749899e75ed655c4eab8cb2c22f1028590"}}
|
|
- cache002-base_a1d9_{{checksum ".buildcache/cache-keys/base-a1d961bcff31b1cdadaa9422452ba72d8b4a85a9"}}
|
|
- run:
|
|
command: make -C packages*.lock load-builder-cache
|
|
- run:
|
|
command: make -C packages*.lock package
|
|
- run:
|
|
command: ls -lahR .buildcache/packages
|
|
- save_cache:
|
|
key: cache002-package-8e6c5ce10bd50ee45b5b7331c070b2ab238bb6f5-{{checksum ".buildcache/cache-keys/package-8e6c5ce10bd50ee45b5b7331c070b2ab238bb6f5"}}
|
|
paths:
|
|
- .buildcache/packages/store
|
|
- run:
|
|
command: |
|
|
if [ -f .buildcache/archives/08-warm-go-build-vendor-cache-4e5f0a9a53d17957205ff9c63cd50d3161af517a.tar.gz ]; then
|
|
echo "Builder image already cached, skipping cache step."
|
|
circleci-agent step halt
|
|
fi
|
|
name: Check builder cache status
|
|
- run:
|
|
command: make -f packages*.lock/layer.mk 08-warm-go-build-vendor-cache-4e5f0a9a53d17957205ff9c63cd50d3161af517a-save
|
|
- save_cache:
|
|
key: cache002-warm-go-build-vendor-cache_4e5f_{{checksum ".buildcache/cache-keys/warm-go-build-vendor-cache-4e5f0a9a53d17957205ff9c63cd50d3161af517a"}}
|
|
paths:
|
|
- .buildcache/archives/08-warm-go-build-vendor-cache-4e5f0a9a53d17957205ff9c63cd50d3161af517a.tar.gz
|
|
freebsd_arm_package:
|
|
docker:
|
|
- image: circleci/buildpack-deps
|
|
shell: /usr/bin/env bash -euo pipefail -c
|
|
environment:
|
|
- AUTO_INSTALL_TOOLS: 'YES'
|
|
- PRODUCT_REVISION: ''
|
|
- PACKAGE_SPEC_ID: f4c1638cf9088643d2eaa85c9293d4d13090347b
|
|
steps:
|
|
- setup_remote_docker
|
|
- checkout
|
|
- run:
|
|
command: make -C packages*.lock write-package-cache-key
|
|
name: Write package cache key
|
|
- restore_cache:
|
|
key: cache002-package-f4c1638cf9088643d2eaa85c9293d4d13090347b-{{checksum ".buildcache/cache-keys/package-f4c1638cf9088643d2eaa85c9293d4d13090347b"}}
|
|
- run:
|
|
command: |
|
|
if ! { PKG=$(find .buildcache/packages/store -maxdepth 1 -mindepth 1 -name '*.zip' 2> /dev/null) && [ -n "$PKG" ]; }; then
|
|
echo "No package found, continuing with build."
|
|
exit 0
|
|
fi
|
|
echo "Package already cached, skipping build."
|
|
circleci-agent step halt
|
|
name: Check the cache status.
|
|
- run:
|
|
command: make -C packages*.lock write-builder-cache-keys
|
|
name: Write builder layer cache keys
|
|
- restore_cache:
|
|
keys:
|
|
- cache002-copy-source_28b4_{{checksum ".buildcache/cache-keys/copy-source-28b442b0f8382760addf43d2e9d4457f81e18592"}}
|
|
- cache002-warm-go-build-vendor-cache_0ae7_{{checksum ".buildcache/cache-keys/warm-go-build-vendor-cache-0ae71d132fc340d89dec170f4164e4eed2cab17e"}}
|
|
- cache002-build-static-assets_33a6_{{checksum ".buildcache/cache-keys/build-static-assets-33a6e8f0029b730ae0a37427888d22c992a0824e"}}
|
|
- cache002-build-ui_5659_{{checksum ".buildcache/cache-keys/build-ui-5659d3f1f758c2f3a4c5fca4c1fcbaac3720693b"}}
|
|
- cache002-ui-dependencies_58f2_{{checksum ".buildcache/cache-keys/ui-dependencies-58f2ea77b8fe39e82bb587e5246d1b62f9a7cb81"}}
|
|
- cache002-install-yarn_aab7_{{checksum ".buildcache/cache-keys/install-yarn-aab71c56a60048647c1c6c4a7fd5649aee7f2319"}}
|
|
- cache002-set-workdir_8253_{{checksum ".buildcache/cache-keys/set-workdir-8253e91d0841cdc71fb0416f84f9eaa52bea9049"}}
|
|
- cache002-install-go-tools_b7a0_{{checksum ".buildcache/cache-keys/install-go-tools-b7a0056ff8c7f40e047993ec4b1c0a6eab3ab44e"}}
|
|
- cache002-install-go_df55_{{checksum ".buildcache/cache-keys/install-go-df55de749899e75ed655c4eab8cb2c22f1028590"}}
|
|
- cache002-base_a1d9_{{checksum ".buildcache/cache-keys/base-a1d961bcff31b1cdadaa9422452ba72d8b4a85a9"}}
|
|
- run:
|
|
command: make -C packages*.lock load-builder-cache
|
|
- run:
|
|
command: make -C packages*.lock package
|
|
- run:
|
|
command: ls -lahR .buildcache/packages
|
|
- save_cache:
|
|
key: cache002-package-f4c1638cf9088643d2eaa85c9293d4d13090347b-{{checksum ".buildcache/cache-keys/package-f4c1638cf9088643d2eaa85c9293d4d13090347b"}}
|
|
paths:
|
|
- .buildcache/packages/store
|
|
- run:
|
|
command: |
|
|
if [ -f .buildcache/archives/08-warm-go-build-vendor-cache-0ae71d132fc340d89dec170f4164e4eed2cab17e.tar.gz ]; then
|
|
echo "Builder image already cached, skipping cache step."
|
|
circleci-agent step halt
|
|
fi
|
|
name: Check builder cache status
|
|
- run:
|
|
command: make -f packages*.lock/layer.mk 08-warm-go-build-vendor-cache-0ae71d132fc340d89dec170f4164e4eed2cab17e-save
|
|
- save_cache:
|
|
key: cache002-warm-go-build-vendor-cache_0ae7_{{checksum ".buildcache/cache-keys/warm-go-build-vendor-cache-0ae71d132fc340d89dec170f4164e4eed2cab17e"}}
|
|
paths:
|
|
- .buildcache/archives/08-warm-go-build-vendor-cache-0ae71d132fc340d89dec170f4164e4eed2cab17e.tar.gz
|
|
windows_amd64_package:
|
|
docker:
|
|
- image: circleci/buildpack-deps
|
|
shell: /usr/bin/env bash -euo pipefail -c
|
|
environment:
|
|
- AUTO_INSTALL_TOOLS: 'YES'
|
|
- PRODUCT_REVISION: ''
|
|
- PACKAGE_SPEC_ID: f48ce178467000a26549f481df1a3775eb5322bf
|
|
steps:
|
|
- setup_remote_docker
|
|
- checkout
|
|
- run:
|
|
command: make -C packages*.lock write-package-cache-key
|
|
name: Write package cache key
|
|
- restore_cache:
|
|
key: cache002-package-f48ce178467000a26549f481df1a3775eb5322bf-{{checksum ".buildcache/cache-keys/package-f48ce178467000a26549f481df1a3775eb5322bf"}}
|
|
- run:
|
|
command: |
|
|
if ! { PKG=$(find .buildcache/packages/store -maxdepth 1 -mindepth 1 -name '*.zip' 2> /dev/null) && [ -n "$PKG" ]; }; then
|
|
echo "No package found, continuing with build."
|
|
exit 0
|
|
fi
|
|
echo "Package already cached, skipping build."
|
|
circleci-agent step halt
|
|
name: Check the cache status.
|
|
- run:
|
|
command: make -C packages*.lock write-builder-cache-keys
|
|
name: Write builder layer cache keys
|
|
- restore_cache:
|
|
keys:
|
|
- cache002-copy-source_226d_{{checksum ".buildcache/cache-keys/copy-source-226d84bde56c14526d6fce9bec6a47a9bef01ecb"}}
|
|
- cache002-warm-go-build-vendor-cache_487f_{{checksum ".buildcache/cache-keys/warm-go-build-vendor-cache-487f59a5948b3519a6a17192f127e67b01b0fb6e"}}
|
|
- cache002-build-static-assets_33a6_{{checksum ".buildcache/cache-keys/build-static-assets-33a6e8f0029b730ae0a37427888d22c992a0824e"}}
|
|
- cache002-build-ui_5659_{{checksum ".buildcache/cache-keys/build-ui-5659d3f1f758c2f3a4c5fca4c1fcbaac3720693b"}}
|
|
- cache002-ui-dependencies_58f2_{{checksum ".buildcache/cache-keys/ui-dependencies-58f2ea77b8fe39e82bb587e5246d1b62f9a7cb81"}}
|
|
- cache002-install-yarn_aab7_{{checksum ".buildcache/cache-keys/install-yarn-aab71c56a60048647c1c6c4a7fd5649aee7f2319"}}
|
|
- cache002-set-workdir_8253_{{checksum ".buildcache/cache-keys/set-workdir-8253e91d0841cdc71fb0416f84f9eaa52bea9049"}}
|
|
- cache002-install-go-tools_b7a0_{{checksum ".buildcache/cache-keys/install-go-tools-b7a0056ff8c7f40e047993ec4b1c0a6eab3ab44e"}}
|
|
- cache002-install-go_df55_{{checksum ".buildcache/cache-keys/install-go-df55de749899e75ed655c4eab8cb2c22f1028590"}}
|
|
- cache002-base_a1d9_{{checksum ".buildcache/cache-keys/base-a1d961bcff31b1cdadaa9422452ba72d8b4a85a9"}}
|
|
- run:
|
|
command: make -C packages*.lock load-builder-cache
|
|
- run:
|
|
command: make -C packages*.lock package
|
|
- run:
|
|
command: ls -lahR .buildcache/packages
|
|
- save_cache:
|
|
key: cache002-package-f48ce178467000a26549f481df1a3775eb5322bf-{{checksum ".buildcache/cache-keys/package-f48ce178467000a26549f481df1a3775eb5322bf"}}
|
|
paths:
|
|
- .buildcache/packages/store
|
|
- run:
|
|
command: |
|
|
if [ -f .buildcache/archives/08-warm-go-build-vendor-cache-487f59a5948b3519a6a17192f127e67b01b0fb6e.tar.gz ]; then
|
|
echo "Builder image already cached, skipping cache step."
|
|
circleci-agent step halt
|
|
fi
|
|
name: Check builder cache status
|
|
- run:
|
|
command: make -f packages*.lock/layer.mk 08-warm-go-build-vendor-cache-487f59a5948b3519a6a17192f127e67b01b0fb6e-save
|
|
- save_cache:
|
|
key: cache002-warm-go-build-vendor-cache_487f_{{checksum ".buildcache/cache-keys/warm-go-build-vendor-cache-487f59a5948b3519a6a17192f127e67b01b0fb6e"}}
|
|
paths:
|
|
- .buildcache/archives/08-warm-go-build-vendor-cache-487f59a5948b3519a6a17192f127e67b01b0fb6e.tar.gz
|
|
pre-flight-checks:
|
|
docker:
|
|
- image: circleci/buildpack-deps
|
|
environment:
|
|
- CCI_VERSION: 0.1.5691
|
|
shell: /usr/bin/env bash -euo pipefail
|
|
steps:
|
|
- checkout
|
|
- run:
|
|
command: |
|
|
export CCI_PATH=/tmp/circleci-cli/$CCI_VERSION
|
|
mkdir -p $CCI_PATH
|
|
NAME=circleci-cli_${CCI_VERSION}_${ARCH}
|
|
URL=$BASE/v${CCI_VERSION}/${NAME}.tar.gz
|
|
curl -sSL $URL \
|
|
| tar --overwrite --strip-components=1 -xz -C $CCI_PATH "${NAME}/circleci"
|
|
# Add circleci to the path for subsequent steps.
|
|
echo "export PATH=$CCI_PATH:\$PATH" >> $BASH_ENV
|
|
# Done, print some debug info.
|
|
set -x
|
|
. $BASH_ENV
|
|
which circleci
|
|
circleci version
|
|
environment:
|
|
ARCH: linux_amd64
|
|
BASE: https://github.com/CircleCI-Public/circleci-cli/releases/download
|
|
name: Install CircleCI CLI
|
|
- run:
|
|
command: make ci-verify
|
|
cache-builder-images:
|
|
docker:
|
|
- image: circleci/buildpack-deps
|
|
shell: /usr/bin/env bash -euo pipefail -c
|
|
steps:
|
|
- setup_remote_docker
|
|
- checkout
|
|
- run:
|
|
command: make -C packages*.lock write-builder-cache-keys
|
|
name: Write builder layer cache keys
|
|
- restore_cache:
|
|
keys:
|
|
- cache002-build-static-assets_33a6_{{checksum ".buildcache/cache-keys/build-static-assets-33a6e8f0029b730ae0a37427888d22c992a0824e"}}
|
|
- cache002-build-ui_5659_{{checksum ".buildcache/cache-keys/build-ui-5659d3f1f758c2f3a4c5fca4c1fcbaac3720693b"}}
|
|
- cache002-ui-dependencies_58f2_{{checksum ".buildcache/cache-keys/ui-dependencies-58f2ea77b8fe39e82bb587e5246d1b62f9a7cb81"}}
|
|
- cache002-install-yarn_aab7_{{checksum ".buildcache/cache-keys/install-yarn-aab71c56a60048647c1c6c4a7fd5649aee7f2319"}}
|
|
- cache002-set-workdir_8253_{{checksum ".buildcache/cache-keys/set-workdir-8253e91d0841cdc71fb0416f84f9eaa52bea9049"}}
|
|
- cache002-install-go-tools_b7a0_{{checksum ".buildcache/cache-keys/install-go-tools-b7a0056ff8c7f40e047993ec4b1c0a6eab3ab44e"}}
|
|
- cache002-install-go_df55_{{checksum ".buildcache/cache-keys/install-go-df55de749899e75ed655c4eab8cb2c22f1028590"}}
|
|
- cache002-base_a1d9_{{checksum ".buildcache/cache-keys/base-a1d961bcff31b1cdadaa9422452ba72d8b4a85a9"}}
|
|
- run:
|
|
command: |
|
|
if [ -f .buildcache/archives/07-build-static-assets-33a6e8f0029b730ae0a37427888d22c992a0824e.tar.gz ]; then
|
|
echo "Exact match found in cache, skipping build."
|
|
circleci-agent step halt
|
|
else
|
|
echo "No exact match found, proceeding with build."
|
|
fi
|
|
name: Finish early if loaded exact match from cache.
|
|
- run:
|
|
command: LAYER_SPEC_ID=07-build-static-assets-33a6e8f0029b730ae0a37427888d22c992a0824e make -C packages*.lock load-builder-cache
|
|
- run:
|
|
command: make -f packages*.lock/layer.mk 00-base-a1d961bcff31b1cdadaa9422452ba72d8b4a85a9-image
|
|
- run:
|
|
command: make -f packages*.lock/layer.mk 01-install-go-df55de749899e75ed655c4eab8cb2c22f1028590-image
|
|
- run:
|
|
command: make -f packages*.lock/layer.mk 02-install-go-tools-b7a0056ff8c7f40e047993ec4b1c0a6eab3ab44e-image
|
|
- run:
|
|
command: make -f packages*.lock/layer.mk 03-set-workdir-8253e91d0841cdc71fb0416f84f9eaa52bea9049-image
|
|
- run:
|
|
command: make -f packages*.lock/layer.mk 04-install-yarn-aab71c56a60048647c1c6c4a7fd5649aee7f2319-image
|
|
- run:
|
|
command: make -f packages*.lock/layer.mk 05-ui-dependencies-58f2ea77b8fe39e82bb587e5246d1b62f9a7cb81-image
|
|
- run:
|
|
command: make -f packages*.lock/layer.mk 06-build-ui-5659d3f1f758c2f3a4c5fca4c1fcbaac3720693b-image
|
|
- run:
|
|
command: make -f packages*.lock/layer.mk 07-build-static-assets-33a6e8f0029b730ae0a37427888d22c992a0824e-image
|
|
- run:
|
|
command: make -f packages*.lock/layer.mk 07-build-static-assets-33a6e8f0029b730ae0a37427888d22c992a0824e-save
|
|
- save_cache:
|
|
key: cache002-build-static-assets_33a6_{{checksum ".buildcache/cache-keys/build-static-assets-33a6e8f0029b730ae0a37427888d22c992a0824e"}}
|
|
paths:
|
|
- .buildcache/archives/07-build-static-assets-33a6e8f0029b730ae0a37427888d22c992a0824e.tar.gz
|
|
- run:
|
|
command: mv .buildcache/archives/07-build-static-assets-33a6e8f0029b730ae0a37427888d22c992a0824e.tar.gz .buildcache/archives/06-build-ui-5659d3f1f758c2f3a4c5fca4c1fcbaac3720693b.tar.gz
|
|
- save_cache:
|
|
key: cache002-build-ui_5659_{{checksum ".buildcache/cache-keys/build-ui-5659d3f1f758c2f3a4c5fca4c1fcbaac3720693b"}}
|
|
paths:
|
|
- .buildcache/archives/06-build-ui-5659d3f1f758c2f3a4c5fca4c1fcbaac3720693b.tar.gz
|
|
- run:
|
|
command: mv .buildcache/archives/06-build-ui-5659d3f1f758c2f3a4c5fca4c1fcbaac3720693b.tar.gz .buildcache/archives/05-ui-dependencies-58f2ea77b8fe39e82bb587e5246d1b62f9a7cb81.tar.gz
|
|
- save_cache:
|
|
key: cache002-ui-dependencies_58f2_{{checksum ".buildcache/cache-keys/ui-dependencies-58f2ea77b8fe39e82bb587e5246d1b62f9a7cb81"}}
|
|
paths:
|
|
- .buildcache/archives/05-ui-dependencies-58f2ea77b8fe39e82bb587e5246d1b62f9a7cb81.tar.gz
|
|
- run:
|
|
command: mv .buildcache/archives/05-ui-dependencies-58f2ea77b8fe39e82bb587e5246d1b62f9a7cb81.tar.gz .buildcache/archives/04-install-yarn-aab71c56a60048647c1c6c4a7fd5649aee7f2319.tar.gz
|
|
- save_cache:
|
|
key: cache002-install-yarn_aab7_{{checksum ".buildcache/cache-keys/install-yarn-aab71c56a60048647c1c6c4a7fd5649aee7f2319"}}
|
|
paths:
|
|
- .buildcache/archives/04-install-yarn-aab71c56a60048647c1c6c4a7fd5649aee7f2319.tar.gz
|
|
- run:
|
|
command: mv .buildcache/archives/04-install-yarn-aab71c56a60048647c1c6c4a7fd5649aee7f2319.tar.gz .buildcache/archives/03-set-workdir-8253e91d0841cdc71fb0416f84f9eaa52bea9049.tar.gz
|
|
- save_cache:
|
|
key: cache002-set-workdir_8253_{{checksum ".buildcache/cache-keys/set-workdir-8253e91d0841cdc71fb0416f84f9eaa52bea9049"}}
|
|
paths:
|
|
- .buildcache/archives/03-set-workdir-8253e91d0841cdc71fb0416f84f9eaa52bea9049.tar.gz
|
|
- run:
|
|
command: mv .buildcache/archives/03-set-workdir-8253e91d0841cdc71fb0416f84f9eaa52bea9049.tar.gz .buildcache/archives/02-install-go-tools-b7a0056ff8c7f40e047993ec4b1c0a6eab3ab44e.tar.gz
|
|
- save_cache:
|
|
key: cache002-install-go-tools_b7a0_{{checksum ".buildcache/cache-keys/install-go-tools-b7a0056ff8c7f40e047993ec4b1c0a6eab3ab44e"}}
|
|
paths:
|
|
- .buildcache/archives/02-install-go-tools-b7a0056ff8c7f40e047993ec4b1c0a6eab3ab44e.tar.gz
|
|
- run:
|
|
command: mv .buildcache/archives/02-install-go-tools-b7a0056ff8c7f40e047993ec4b1c0a6eab3ab44e.tar.gz .buildcache/archives/01-install-go-df55de749899e75ed655c4eab8cb2c22f1028590.tar.gz
|
|
- save_cache:
|
|
key: cache002-install-go_df55_{{checksum ".buildcache/cache-keys/install-go-df55de749899e75ed655c4eab8cb2c22f1028590"}}
|
|
paths:
|
|
- .buildcache/archives/01-install-go-df55de749899e75ed655c4eab8cb2c22f1028590.tar.gz
|
|
- run:
|
|
command: mv .buildcache/archives/01-install-go-df55de749899e75ed655c4eab8cb2c22f1028590.tar.gz .buildcache/archives/00-base-a1d961bcff31b1cdadaa9422452ba72d8b4a85a9.tar.gz
|
|
- save_cache:
|
|
key: cache002-base_a1d9_{{checksum ".buildcache/cache-keys/base-a1d961bcff31b1cdadaa9422452ba72d8b4a85a9"}}
|
|
paths:
|
|
- .buildcache/archives/00-base-a1d961bcff31b1cdadaa9422452ba72d8b4a85a9.tar.gz
|
|
environment:
|
|
- AUTO_INSTALL_TOOLS: 'YES'
|
|
- PRODUCT_REVISION: ''
|
|
workflows:
|
|
build-standalone:
|
|
jobs:
|
|
- cache-builder-images:
|
|
filters:
|
|
branches:
|
|
only:
|
|
- /build-.*/
|
|
- /ci.*/
|
|
- darwin_386_package:
|
|
requires:
|
|
- cache-builder-images
|
|
- darwin_amd64_package:
|
|
requires:
|
|
- cache-builder-images
|
|
- freebsd_386_package:
|
|
requires:
|
|
- cache-builder-images
|
|
- freebsd_amd64_package:
|
|
requires:
|
|
- cache-builder-images
|
|
- freebsd_arm_package:
|
|
requires:
|
|
- cache-builder-images
|
|
- linux_386_package:
|
|
requires:
|
|
- cache-builder-images
|
|
- linux_amd64_package:
|
|
requires:
|
|
- cache-builder-images
|
|
- linux_arm_package:
|
|
requires:
|
|
- cache-builder-images
|
|
- linux_arm64_package:
|
|
requires:
|
|
- cache-builder-images
|
|
- netbsd_386_package:
|
|
requires:
|
|
- cache-builder-images
|
|
- netbsd_amd64_package:
|
|
requires:
|
|
- cache-builder-images
|
|
- openbsd_386_package:
|
|
requires:
|
|
- cache-builder-images
|
|
- openbsd_amd64_package:
|
|
requires:
|
|
- cache-builder-images
|
|
- solaris_amd64_package:
|
|
requires:
|
|
- cache-builder-images
|
|
- windows_386_package:
|
|
requires:
|
|
- cache-builder-images
|
|
- windows_amd64_package:
|
|
requires:
|
|
- cache-builder-images
|
|
- bundle-releases:
|
|
requires:
|
|
- darwin_386_package
|
|
- darwin_amd64_package
|
|
- freebsd_386_package
|
|
- freebsd_amd64_package
|
|
- freebsd_arm_package
|
|
- linux_386_package
|
|
- linux_amd64_package
|
|
- linux_arm_package
|
|
- linux_arm64_package
|
|
- netbsd_386_package
|
|
- netbsd_amd64_package
|
|
- openbsd_386_package
|
|
- openbsd_amd64_package
|
|
- solaris_amd64_package
|
|
- windows_386_package
|
|
- windows_amd64_package
|
|
ci:
|
|
jobs:
|
|
- pre-flight-checks
|
|
- install-ui-dependencies:
|
|
requires:
|
|
- pre-flight-checks
|
|
- build-go-dev:
|
|
requires:
|
|
- pre-flight-checks
|
|
- test-ui:
|
|
requires:
|
|
- install-ui-dependencies
|
|
- build-go-dev
|
|
- test-ui-browserstack:
|
|
filters:
|
|
branches:
|
|
ignore: /pull\/[0-9]+/
|
|
requires:
|
|
- install-ui-dependencies
|
|
- build-go-dev
|
|
- test-go:
|
|
requires:
|
|
- build-go-dev
|
|
- test-go-race:
|
|
filters:
|
|
branches:
|
|
ignore:
|
|
- /^docs\/.*/
|
|
- /^ui\/.*/
|
|
requires:
|
|
- build-go-dev
|
|
- website-docker-image:
|
|
filters:
|
|
branches:
|
|
only:
|
|
- master
|
|
context: vault-docs
|
|
- algolia-index:
|
|
filters:
|
|
branches:
|
|
only:
|
|
- stable-website
|
|
context: vault-docs
|
|
nightly-cachebuilder:
|
|
jobs:
|
|
- pre-flight-checks
|
|
- test-go-nightly
|
|
triggers:
|
|
- schedule:
|
|
cron: 0 9 * * *
|
|
filters:
|
|
branches:
|
|
only:
|
|
- master
|
|
version: 2
|