From a1f80baf89c0de65d1c9d914c787308ba88c0910 Mon Sep 17 00:00:00 2001 From: Sam Salisbury Date: Wed, 25 Aug 2021 12:08:22 +0100 Subject: [PATCH 1/2] packagespec upgrade -version 0.2.8 --- .circleci/config.yml | 4100 +++++++++++++----------------------- packages-oss.lock/pkgs.yml | 2 +- 2 files changed, 1497 insertions(+), 2605 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 48fb25dd14cee..c30d37081db6f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,2659 +1,1551 @@ -### *** -### 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: docker.mirror.hashicorp.services/circleci/buildpack-deps - shell: /usr/bin/env bash -euo pipefail -c - steps: - - checkout: - path: . - - run: - command: make -C packages*.lock write-all-package-cache-keys - name: Write all package cache keys - - run: - command: mkdir -p .buildcache && echo "*" > .buildcache/.gitignore - name: Ignore .buildcache - - restore_cache: - key: package-3ebae663db95ad337451948afba2dd8e9644c1de-{{checksum ".buildcache/cache-keys/package-3ebae663db95ad337451948afba2dd8e9644c1de"}} - name: Restore package cache - - restore_cache: - key: package-70290ee80c00ff40a9baf8e2800a2778dd11bc34-{{checksum ".buildcache/cache-keys/package-70290ee80c00ff40a9baf8e2800a2778dd11bc34"}} - name: Restore package cache - - restore_cache: - key: package-73e5929eed187b34bc51c84dc9e68cfe4e6452e0-{{checksum ".buildcache/cache-keys/package-73e5929eed187b34bc51c84dc9e68cfe4e6452e0"}} - name: Restore package cache - - restore_cache: - key: package-2d48df616168bf8ae1cdbfce10f31b3c73759ef9-{{checksum ".buildcache/cache-keys/package-2d48df616168bf8ae1cdbfce10f31b3c73759ef9"}} - name: Restore package cache - - restore_cache: - key: package-552364a81ae60ec9e925bf03436153925235fa28-{{checksum ".buildcache/cache-keys/package-552364a81ae60ec9e925bf03436153925235fa28"}} - name: Restore package cache - - restore_cache: - key: package-0cfa14d59a028968575a92d27d1d41352eb6ce63-{{checksum ".buildcache/cache-keys/package-0cfa14d59a028968575a92d27d1d41352eb6ce63"}} - name: Restore package cache - - restore_cache: - key: package-86eb712fba163c80690185fe24c22b178dbd17f8-{{checksum ".buildcache/cache-keys/package-86eb712fba163c80690185fe24c22b178dbd17f8"}} - name: Restore package cache - - restore_cache: - key: package-bc0d94feb5922f5c16715af7cc85b2060a87ddc7-{{checksum ".buildcache/cache-keys/package-bc0d94feb5922f5c16715af7cc85b2060a87ddc7"}} - name: Restore package cache - - restore_cache: - key: package-d608f9c10443d43d15a161559d07d812a24dffd4-{{checksum ".buildcache/cache-keys/package-d608f9c10443d43d15a161559d07d812a24dffd4"}} - name: Restore package cache - - restore_cache: - key: package-113e2a29f4786b4f0b53955ceb8dcf6ba42a38c2-{{checksum ".buildcache/cache-keys/package-113e2a29f4786b4f0b53955ceb8dcf6ba42a38c2"}} - name: Restore package cache - - restore_cache: - key: package-c6ab5585544823405f0a5a44616458612459c3b2-{{checksum ".buildcache/cache-keys/package-c6ab5585544823405f0a5a44616458612459c3b2"}} - name: Restore package cache - - restore_cache: - key: package-15e0bf30e04ca7f3808ca5a0d872d99ec30fb2e7-{{checksum ".buildcache/cache-keys/package-15e0bf30e04ca7f3808ca5a0d872d99ec30fb2e7"}} - name: Restore package cache - - restore_cache: - key: package-96216af336fd2ce49b883ccd837f4cbae27fd647-{{checksum ".buildcache/cache-keys/package-96216af336fd2ce49b883ccd837f4cbae27fd647"}} - name: Restore package cache - - restore_cache: - key: package-359562b465a81cb702a7b863940395b5261ed70f-{{checksum ".buildcache/cache-keys/package-359562b465a81cb702a7b863940395b5261ed70f"}} - name: Restore package cache - - restore_cache: - key: package-5300f05b8cb6c55f464cf5e973f5b22625c3ce02-{{checksum ".buildcache/cache-keys/package-5300f05b8cb6c55f464cf5e973f5b22625c3ce02"}} - name: Restore package cache - - restore_cache: - key: package-38343475d76c802dd78fa4bee1dfb98cf2935923-{{checksum ".buildcache/cache-keys/package-38343475d76c802dd78fa4bee1dfb98cf2935923"}} - name: Restore package cache - - run: - command: make package-meta-all - name: Write Package Metadata - - run: - command: make aliases - name: Write package aliases - - run: - command: ls -lahR .buildcache - name: List Build Cache - - run: - command: cp packages*.lock/pkgs.yml lockfile-34b4dd57b4a937e7.yml - name: Update Lockfile Name - - run: - command: tar -czf packages-34b4dd57b4a937e7.tar.gz .buildcache/packages lockfile-34b4dd57b4a937e7.yml - name: Create Raw Package Tarball - - run: - command: tar -czf meta-34b4dd57b4a937e7.tar.gz .buildcache/packages/store/*.json lockfile-34b4dd57b4a937e7.yml - name: Create Metadata Tarball - - store_artifacts: - path: lockfile-34b4dd57b4a937e7.yml - - store_artifacts: - path: packages-34b4dd57b4a937e7.tar.gz - - store_artifacts: - path: meta-34b4dd57b4a937e7.tar.gz - - store_artifacts: - path: .buildcache/packages - environment: - - AUTO_INSTALL_TOOLS: 'YES' - - BUILDKIT_PROGRESS: plain - - PRODUCT_REVISION: '' - darwin_amd64_package: - docker: - - image: docker.mirror.hashicorp.services/circleci/buildpack-deps - shell: /usr/bin/env bash -euo pipefail -c - environment: - - AUTO_INSTALL_TOOLS: 'YES' - - BUILDKIT_PROGRESS: plain - - PRODUCT_REVISION: '' - - PACKAGE_SPEC_ID: 3ebae663db95ad337451948afba2dd8e9644c1de - steps: - - setup_remote_docker: - docker_layer_caching: false - version: 19.03.12 - - add_ssh_keys: - fingerprints: - - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 - - checkout: - path: . - - run: - command: make -C packages*.lock write-package-cache-key - name: Write package cache key - - restore_cache: - key: package-3ebae663db95ad337451948afba2dd8e9644c1de-{{checksum ".buildcache/cache-keys/package-3ebae663db95ad337451948afba2dd8e9644c1de"}} - name: Restore package cache - - run: - command: |2 - - 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 cache status - - run: - command: make -C packages*.lock write-builder-cache-keys - name: Write builder layer cache keys - - restore_cache: - key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} - keys: - - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} - - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} - - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} - - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} - - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} - - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} - - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} - - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} - - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} - name: 'Restore Builder Image Cache: copy-source' - - run: - command: make -C packages*.lock load-builder-cache - name: Load whatever builder cache we have (if any) into the Docker daemon - no_output_timeout: 30m - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." - fi - - make -C packages*.lock package - name: Compile Package - - run: - command: ls -lahR .buildcache/packages - name: List packages - - save_cache: - key: package-3ebae663db95ad337451948afba2dd8e9644c1de-{{checksum ".buildcache/cache-keys/package-3ebae663db95ad337451948afba2dd8e9644c1de"}} - name: Save package cache - paths: - - .buildcache/packages/store - darwin_arm64_package: +version: "2.1" +executors: + builder: docker: - - image: docker.mirror.hashicorp.services/circleci/buildpack-deps + - image: docker.mirror.hashicorp.services/circleci/buildpack-deps shell: /usr/bin/env bash -euo pipefail -c environment: - - AUTO_INSTALL_TOOLS: 'YES' - - BUILDKIT_PROGRESS: plain - - PRODUCT_REVISION: '' - - PACKAGE_SPEC_ID: 70290ee80c00ff40a9baf8e2800a2778dd11bc34 - steps: - - setup_remote_docker: - docker_layer_caching: false - version: 19.03.12 - - add_ssh_keys: - fingerprints: - - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 - - checkout: - path: . - - run: - command: make -C packages*.lock write-package-cache-key - name: Write package cache key - - restore_cache: - key: package-70290ee80c00ff40a9baf8e2800a2778dd11bc34-{{checksum ".buildcache/cache-keys/package-70290ee80c00ff40a9baf8e2800a2778dd11bc34"}} - name: Restore package cache - - run: - command: |2 - - 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 cache status - - run: - command: make -C packages*.lock write-builder-cache-keys - name: Write builder layer cache keys - - restore_cache: - key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} - keys: - - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} - - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} - - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} - - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} - - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} - - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} - - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} - - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} - - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} - name: 'Restore Builder Image Cache: copy-source' - - run: - command: make -C packages*.lock load-builder-cache - name: Load whatever builder cache we have (if any) into the Docker daemon - no_output_timeout: 30m - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." - fi - - make -C packages*.lock package - name: Compile Package - - run: - command: ls -lahR .buildcache/packages - name: List packages - - save_cache: - key: package-70290ee80c00ff40a9baf8e2800a2778dd11bc34-{{checksum ".buildcache/cache-keys/package-70290ee80c00ff40a9baf8e2800a2778dd11bc34"}} - name: Save package cache - paths: - - .buildcache/packages/store - windows_386_package: - docker: - - image: docker.mirror.hashicorp.services/circleci/buildpack-deps - shell: /usr/bin/env bash -euo pipefail -c - environment: - - AUTO_INSTALL_TOOLS: 'YES' - - BUILDKIT_PROGRESS: plain - - PRODUCT_REVISION: '' - - PACKAGE_SPEC_ID: 5300f05b8cb6c55f464cf5e973f5b22625c3ce02 - steps: - - setup_remote_docker: - docker_layer_caching: false - version: 19.03.12 - - add_ssh_keys: - fingerprints: - - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 - - checkout: - path: . - - run: - command: make -C packages*.lock write-package-cache-key - name: Write package cache key - - restore_cache: - key: package-5300f05b8cb6c55f464cf5e973f5b22625c3ce02-{{checksum ".buildcache/cache-keys/package-5300f05b8cb6c55f464cf5e973f5b22625c3ce02"}} - name: Restore package cache - - run: - command: |2 - - 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 cache status - - run: - command: make -C packages*.lock write-builder-cache-keys - name: Write builder layer cache keys - - restore_cache: - key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} - keys: - - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} - - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} - - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} - - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} - - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} - - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} - - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} - - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} - - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} - name: 'Restore Builder Image Cache: copy-source' - - run: - command: make -C packages*.lock load-builder-cache - name: Load whatever builder cache we have (if any) into the Docker daemon - no_output_timeout: 30m - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." - fi - - make -C packages*.lock package - name: Compile Package - - run: - command: ls -lahR .buildcache/packages - name: List packages - - save_cache: - key: package-5300f05b8cb6c55f464cf5e973f5b22625c3ce02-{{checksum ".buildcache/cache-keys/package-5300f05b8cb6c55f464cf5e973f5b22625c3ce02"}} - name: Save package cache - paths: - - .buildcache/packages/store - install-ui-dependencies: - docker: - - image: docker.mirror.hashicorp.services/node:14-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" }} - name: Restore yarn cache - - run: - command: | - cd ui - yarn install - npm rebuild node-sass - name: Install UI dependencies - - save_cache: - key: yarn-lock-v6-{{ checksum "ui/yarn.lock" }} - name: Save yarn cache - paths: - - ui/node_modules - build-common-layers: + AUTO_INSTALL_TOOLS: "YES" + BUILDKIT_PROGRESS: plain + PRODUCT_REVISION: "" + builder-machine: + resource_class: xlarge machine: image: ubuntu-1604:202007-01 - resource_class: xlarge - shell: /usr/bin/env bash -euo pipefail -c - steps: - - add_ssh_keys: - fingerprints: - - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 - - checkout: - path: . - - run: - command: make -C packages*.lock write-builder-cache-keys - name: Write builder layer cache keys - - restore_cache: - key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} - keys: - - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} - - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} - - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} - - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} - - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} - - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} - - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} - - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} - - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} - name: 'Restore Layer Cache: copy-source' - - run: - command: LAYER_SPEC_ID=09-copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77 make -C packages*.lock load-builder-cache - name: Load whatever builder cache we have (if any) into the Docker daemon - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." - fi - - make -f packages*.lock/layer.mk 00-base-c6cdf1b224722d2520e082320f2a71875913247c-image - name: Build base layer - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." - fi - - make -f packages*.lock/layer.mk 01-install-go-8856aed7b0bd773b4539b957c157d21ff7b05758-image - name: Build install-go layer - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." - fi - - make -f packages*.lock/layer.mk 02-install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485-image - name: Build install-go-tools layer - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." - fi - - make -f packages*.lock/layer.mk 03-set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173-image - name: Build set-workdir layer - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." - fi - - make -f packages*.lock/layer.mk 04-install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564-image - name: Build install-yarn layer - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." - fi - - make -f packages*.lock/layer.mk 05-ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf-image - name: Build ui-dependencies layer - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." - fi - - make -f packages*.lock/layer.mk 06-build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0-image - name: Build build-ui layer - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." - fi - - make -f packages*.lock/layer.mk 07-build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8-image - name: Build build-static-assets layer - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." - fi - - make -f packages*.lock/layer.mk 08-go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084-image - name: Build go-modules layer - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." - fi - - make -f packages*.lock/layer.mk 09-copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77-image - name: Build copy-source layer - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." - fi - - make -f packages*.lock/layer.mk 09-copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77-save - name: Build copy-source layer - - save_cache: - key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} - name: 'Save Layer Cache: copy-source' - paths: - - .buildcache/archives/09-copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77.tar.gz - environment: - - AUTO_INSTALL_TOOLS: 'YES' - - BUILDKIT_PROGRESS: plain - - PRODUCT_REVISION: '' - linux_arm64_package: - docker: - - image: docker.mirror.hashicorp.services/circleci/buildpack-deps - shell: /usr/bin/env bash -euo pipefail -c - environment: - - AUTO_INSTALL_TOOLS: 'YES' - - BUILDKIT_PROGRESS: plain - - PRODUCT_REVISION: '' - - PACKAGE_SPEC_ID: d608f9c10443d43d15a161559d07d812a24dffd4 - steps: - - setup_remote_docker: - docker_layer_caching: false - version: 19.03.12 - - add_ssh_keys: - fingerprints: - - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 - - checkout: - path: . - - run: - command: make -C packages*.lock write-package-cache-key - name: Write package cache key - - restore_cache: - key: package-d608f9c10443d43d15a161559d07d812a24dffd4-{{checksum ".buildcache/cache-keys/package-d608f9c10443d43d15a161559d07d812a24dffd4"}} - name: Restore package cache - - run: - command: |2 - - 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 cache status - - run: - command: make -C packages*.lock write-builder-cache-keys - name: Write builder layer cache keys - - restore_cache: - key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} - keys: - - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} - - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} - - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} - - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} - - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} - - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} - - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} - - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} - - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} - name: 'Restore Builder Image Cache: copy-source' - - run: - command: make -C packages*.lock load-builder-cache - name: Load whatever builder cache we have (if any) into the Docker daemon - no_output_timeout: 30m - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." - fi - - make -C packages*.lock package - name: Compile Package - - run: - command: ls -lahR .buildcache/packages - name: List packages - - save_cache: - key: package-d608f9c10443d43d15a161559d07d812a24dffd4-{{checksum ".buildcache/cache-keys/package-d608f9c10443d43d15a161559d07d812a24dffd4"}} - name: Save package cache - paths: - - .buildcache/packages/store - test-ui: - docker: - - image: docker.mirror.hashicorp.services/node:14-buster - shell: /usr/bin/env bash -euo pipefail -c - working_directory: /go/src/github.com/hashicorp/vault - resource_class: xlarge - steps: - - run: - command: | - case "$CIRCLE_BRANCH" in - main|ui/*|release/*|merge*) ;; - *) # If the branch being tested doesn't match one of the above patterns, - # we don't need to run test-ui and can abort the job. - circleci-agent step halt - ;; - esac - - # exit with success either way - exit 0 - name: Check branch name - working_directory: ~/ - - checkout - - restore_cache: - key: yarn-lock-v6-{{ checksum "ui/yarn.lock" }} - name: Restore yarn cache - - 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: docker.mirror.hashicorp.services/circleci/buildpack-deps shell: /usr/bin/env bash -euo pipefail -c environment: - - AUTO_INSTALL_TOOLS: 'YES' - - BUILDKIT_PROGRESS: plain - - PRODUCT_REVISION: '' - - PACKAGE_SPEC_ID: bc0d94feb5922f5c16715af7cc85b2060a87ddc7 - steps: - - setup_remote_docker: - docker_layer_caching: false - version: 19.03.12 - - add_ssh_keys: - fingerprints: - - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 - - checkout: - path: . - - run: - command: make -C packages*.lock write-package-cache-key - name: Write package cache key - - restore_cache: - key: package-bc0d94feb5922f5c16715af7cc85b2060a87ddc7-{{checksum ".buildcache/cache-keys/package-bc0d94feb5922f5c16715af7cc85b2060a87ddc7"}} - name: Restore package cache - - run: - command: |2 - - 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 cache status - - run: - command: make -C packages*.lock write-builder-cache-keys - name: Write builder layer cache keys - - restore_cache: - key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} - keys: - - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} - - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} - - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} - - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} - - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} - - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} - - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} - - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} - - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} - name: 'Restore Builder Image Cache: copy-source' - - run: - command: make -C packages*.lock load-builder-cache - name: Load whatever builder cache we have (if any) into the Docker daemon - no_output_timeout: 30m - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." - fi - - make -C packages*.lock package - name: Compile Package - - run: - command: ls -lahR .buildcache/packages - name: List packages - - save_cache: - key: package-bc0d94feb5922f5c16715af7cc85b2060a87ddc7-{{checksum ".buildcache/cache-keys/package-bc0d94feb5922f5c16715af7cc85b2060a87ddc7"}} - name: Save package cache - paths: - - .buildcache/packages/store - test-ui-browserstack: - docker: - - image: docker.mirror.hashicorp.services/node:14-buster - shell: /usr/bin/env bash -euo pipefail -c - working_directory: /go/src/github.com/hashicorp/vault - resource_class: xlarge + AUTO_INSTALL_TOOLS: "YES" + BUILDKIT_PROGRESS: plain + PRODUCT_REVISION: "" +jobs: + build-common-layers: + executor: builder-machine steps: - - checkout - - restore_cache: - key: yarn-lock-v6-{{ checksum "ui/yarn.lock" }} - name: Restore yarn cache - - 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 - build-go-dev: - machine: true - shell: /usr/bin/env bash -euo pipefail -c - working_directory: /go/src/github.com/hashicorp/vault + - add_ssh_keys: + fingerprints: + - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 + - checkout: + path: . + - run: + command: make -C packages*.lock write-builder-cache-keys + name: Write builder layer cache keys + - restore_cache: + key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} + keys: + - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} + - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} + - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} + - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} + - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} + - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} + - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} + - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} + - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} + name: 'Restore Layer Cache: copy-source' + - run: + command: LAYER_SPEC_ID=09-copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77 make -C packages*.lock load-builder-cache + name: Load whatever builder cache we have (if any) into the Docker daemon + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." + fi + + make -f packages*.lock/layer.mk 00-base-c6cdf1b224722d2520e082320f2a71875913247c-image + name: Build base layer + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." + fi + + make -f packages*.lock/layer.mk 01-install-go-8856aed7b0bd773b4539b957c157d21ff7b05758-image + name: Build install-go layer + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." + fi + + make -f packages*.lock/layer.mk 02-install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485-image + name: Build install-go-tools layer + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." + fi + + make -f packages*.lock/layer.mk 03-set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173-image + name: Build set-workdir layer + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." + fi + + make -f packages*.lock/layer.mk 04-install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564-image + name: Build install-yarn layer + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." + fi + + make -f packages*.lock/layer.mk 05-ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf-image + name: Build ui-dependencies layer + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." + fi + + make -f packages*.lock/layer.mk 06-build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0-image + name: Build build-ui layer + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." + fi + + make -f packages*.lock/layer.mk 07-build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8-image + name: Build build-static-assets layer + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." + fi + + make -f packages*.lock/layer.mk 08-go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084-image + name: Build go-modules layer + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." + fi + + make -f packages*.lock/layer.mk 09-copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77-image + name: Build copy-source layer + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." + fi + + make -f packages*.lock/layer.mk 09-copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77-save + name: Build copy-source layer + - save_cache: + paths: + - .buildcache/archives/09-copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77.tar.gz + key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} + name: 'Save Layer Cache: copy-source' + bundle-releases: + executor: builder 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 "export GOPROXY=off" >> "$BASH_ENV" - echo "export GOPRIVATE=github.com/hashicorp/*" >> "$BASH_ENV" - - echo "$ go version" - go version - name: Setup Go - working_directory: ~/ - - checkout - - restore_cache: - keys: - - v1.3-{{checksum "go.sum"}}-{{checksum "sdk/go.sum"}}-{{checksum "api/go.sum"}} - name: Restore exact go modules cache - - 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.16.7 - - GOTESTSUM_VERSION: 0.5.2 - algolia-index: - docker: - - image: node:12 + - checkout: + path: . + - run: + command: make -C packages*.lock write-all-package-cache-keys + name: Write all package cache keys + - run: + command: mkdir -p .buildcache && echo "*" > .buildcache/.gitignore + name: Ignore .buildcache + - restore_cache: + key: package-3ebae663db95ad337451948afba2dd8e9644c1de-{{checksum ".buildcache/cache-keys/package-3ebae663db95ad337451948afba2dd8e9644c1de"}} + name: Restore package cache + - restore_cache: + key: package-70290ee80c00ff40a9baf8e2800a2778dd11bc34-{{checksum ".buildcache/cache-keys/package-70290ee80c00ff40a9baf8e2800a2778dd11bc34"}} + name: Restore package cache + - restore_cache: + key: package-73e5929eed187b34bc51c84dc9e68cfe4e6452e0-{{checksum ".buildcache/cache-keys/package-73e5929eed187b34bc51c84dc9e68cfe4e6452e0"}} + name: Restore package cache + - restore_cache: + key: package-2d48df616168bf8ae1cdbfce10f31b3c73759ef9-{{checksum ".buildcache/cache-keys/package-2d48df616168bf8ae1cdbfce10f31b3c73759ef9"}} + name: Restore package cache + - restore_cache: + key: package-552364a81ae60ec9e925bf03436153925235fa28-{{checksum ".buildcache/cache-keys/package-552364a81ae60ec9e925bf03436153925235fa28"}} + name: Restore package cache + - restore_cache: + key: package-0cfa14d59a028968575a92d27d1d41352eb6ce63-{{checksum ".buildcache/cache-keys/package-0cfa14d59a028968575a92d27d1d41352eb6ce63"}} + name: Restore package cache + - restore_cache: + key: package-86eb712fba163c80690185fe24c22b178dbd17f8-{{checksum ".buildcache/cache-keys/package-86eb712fba163c80690185fe24c22b178dbd17f8"}} + name: Restore package cache + - restore_cache: + key: package-bc0d94feb5922f5c16715af7cc85b2060a87ddc7-{{checksum ".buildcache/cache-keys/package-bc0d94feb5922f5c16715af7cc85b2060a87ddc7"}} + name: Restore package cache + - restore_cache: + key: package-d608f9c10443d43d15a161559d07d812a24dffd4-{{checksum ".buildcache/cache-keys/package-d608f9c10443d43d15a161559d07d812a24dffd4"}} + name: Restore package cache + - restore_cache: + key: package-113e2a29f4786b4f0b53955ceb8dcf6ba42a38c2-{{checksum ".buildcache/cache-keys/package-113e2a29f4786b4f0b53955ceb8dcf6ba42a38c2"}} + name: Restore package cache + - restore_cache: + key: package-c6ab5585544823405f0a5a44616458612459c3b2-{{checksum ".buildcache/cache-keys/package-c6ab5585544823405f0a5a44616458612459c3b2"}} + name: Restore package cache + - restore_cache: + key: package-15e0bf30e04ca7f3808ca5a0d872d99ec30fb2e7-{{checksum ".buildcache/cache-keys/package-15e0bf30e04ca7f3808ca5a0d872d99ec30fb2e7"}} + name: Restore package cache + - restore_cache: + key: package-96216af336fd2ce49b883ccd837f4cbae27fd647-{{checksum ".buildcache/cache-keys/package-96216af336fd2ce49b883ccd837f4cbae27fd647"}} + name: Restore package cache + - restore_cache: + key: package-359562b465a81cb702a7b863940395b5261ed70f-{{checksum ".buildcache/cache-keys/package-359562b465a81cb702a7b863940395b5261ed70f"}} + name: Restore package cache + - restore_cache: + key: package-5300f05b8cb6c55f464cf5e973f5b22625c3ce02-{{checksum ".buildcache/cache-keys/package-5300f05b8cb6c55f464cf5e973f5b22625c3ce02"}} + name: Restore package cache + - restore_cache: + key: package-38343475d76c802dd78fa4bee1dfb98cf2935923-{{checksum ".buildcache/cache-keys/package-38343475d76c802dd78fa4bee1dfb98cf2935923"}} + name: Restore package cache + - run: + command: make package-meta-all + name: Write Package Metadata + - run: + command: make aliases + name: Write package aliases + - run: + command: ls -lahR .buildcache + name: List Build Cache + - run: + command: cp packages*.lock/pkgs.yml lockfile-4cdca257789ddb0a.yml + name: Update Lockfile Name + - run: + command: tar -czf packages-4cdca257789ddb0a.tar.gz .buildcache/packages lockfile-4cdca257789ddb0a.yml + name: Create Raw Package Tarball + - run: + command: tar -czf meta-4cdca257789ddb0a.tar.gz .buildcache/packages/store/*.json lockfile-4cdca257789ddb0a.yml + name: Create Metadata Tarball + - store_artifacts: + path: lockfile-4cdca257789ddb0a.yml + - store_artifacts: + path: packages-4cdca257789ddb0a.tar.gz + - store_artifacts: + path: meta-4cdca257789ddb0a.tar.gz + - store_artifacts: + path: .buildcache/packages + darwin_amd64_package: + executor: builder 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: docker.mirror.hashicorp.services/circleci/buildpack-deps - shell: /usr/bin/env bash -euo pipefail -c + - setup_remote_docker: + version: 19.03.12 + docker_layer_caching: false + - add_ssh_keys: + fingerprints: + - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 + - checkout: + path: . + - run: + command: make -C packages*.lock write-package-cache-key + name: Write package cache key + - restore_cache: + key: package-3ebae663db95ad337451948afba2dd8e9644c1de-{{checksum ".buildcache/cache-keys/package-3ebae663db95ad337451948afba2dd8e9644c1de"}} + name: Restore package cache + - run: + command: |2 + + 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 cache status + - run: + command: make -C packages*.lock write-builder-cache-keys + name: Write builder layer cache keys + - restore_cache: + key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} + keys: + - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} + - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} + - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} + - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} + - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} + - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} + - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} + - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} + - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} + name: 'Restore Builder Image Cache: copy-source' + - run: + command: make -C packages*.lock load-builder-cache + name: Load whatever builder cache we have (if any) into the Docker daemon + no_output_timeout: 30m + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." + fi + + make -C packages*.lock package + name: Compile Package + - run: + command: ls -lahR .buildcache/packages + name: List packages + - save_cache: + paths: + - .buildcache/packages/store + key: package-3ebae663db95ad337451948afba2dd8e9644c1de-{{checksum ".buildcache/cache-keys/package-3ebae663db95ad337451948afba2dd8e9644c1de"}} + name: Save package cache environment: - - AUTO_INSTALL_TOOLS: 'YES' - - BUILDKIT_PROGRESS: plain - - PRODUCT_REVISION: '' - - PACKAGE_SPEC_ID: 0cfa14d59a028968575a92d27d1d41352eb6ce63 - steps: - - setup_remote_docker: - docker_layer_caching: false - version: 19.03.12 - - add_ssh_keys: - fingerprints: - - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 - - checkout: - path: . - - run: - command: make -C packages*.lock write-package-cache-key - name: Write package cache key - - restore_cache: - key: package-0cfa14d59a028968575a92d27d1d41352eb6ce63-{{checksum ".buildcache/cache-keys/package-0cfa14d59a028968575a92d27d1d41352eb6ce63"}} - name: Restore package cache - - run: - command: |2 - - 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 cache status - - run: - command: make -C packages*.lock write-builder-cache-keys - name: Write builder layer cache keys - - restore_cache: - key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} - keys: - - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} - - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} - - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} - - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} - - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} - - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} - - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} - - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} - - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} - name: 'Restore Builder Image Cache: copy-source' - - run: - command: make -C packages*.lock load-builder-cache - name: Load whatever builder cache we have (if any) into the Docker daemon - no_output_timeout: 30m - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." - fi - - make -C packages*.lock package - name: Compile Package - - run: - command: ls -lahR .buildcache/packages - name: List packages - - save_cache: - key: package-0cfa14d59a028968575a92d27d1d41352eb6ce63-{{checksum ".buildcache/cache-keys/package-0cfa14d59a028968575a92d27d1d41352eb6ce63"}} - name: Save package cache - paths: - - .buildcache/packages/store - test-go-remote-docker: - docker: - - image: docker.mirror.hashicorp.services/circleci/golang:1.16.7-buster - resource_class: medium - working_directory: /go/src/github.com/hashicorp/vault - parallelism: 8 + PACKAGE_SPEC_ID: 3ebae663db95ad337451948afba2dd8e9644c1de + darwin_arm64_package: + executor: builder 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 + - setup_remote_docker: + version: 19.03.12 + docker_layer_caching: false + - add_ssh_keys: + fingerprints: + - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 + - checkout: + path: . + - run: + command: make -C packages*.lock write-package-cache-key + name: Write package cache key + - restore_cache: + key: package-70290ee80c00ff40a9baf8e2800a2778dd11bc34-{{checksum ".buildcache/cache-keys/package-70290ee80c00ff40a9baf8e2800a2778dd11bc34"}} + name: Restore package cache + - run: + command: |2 + + 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 - } - # exit with success either way - exit 0 - name: Check branch name - working_directory: ~/ - - checkout - - setup_remote_docker: - docker_layer_caching: true - version: 18.09.3 - - add_ssh_keys: - fingerprints: - - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 - - run: - command: | - git config --global url."git@github.com:".insteadOf https://github.com/ - - 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" }} - - restore_cache: - keys: - - v1.3-{{checksum "go.sum"}}-{{checksum "sdk/go.sum"}}-{{checksum "api/go.sum"}} - name: Restore exact go modules cache - - run: - command: | - set -x - - EXTRA_TAGS= - case "" in - *-race*) export VAULT_CI_GO_TEST_RACE=1;; - *) EXTRA_TAGS=deadlock;; - 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" - - USE_DOCKER=0 - USE_DOCKER=1 - - # 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. - if [ $USE_DOCKER == 1 ]; then - 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) - else - 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) - fi - - # After running tests split step, we are now running the following steps - # in multiple different containers, each getting a different subset of - # the test packages in their package_names variable. Each container - # has its own remote docker VM. - - make prep - mkdir -p test-results/go-test - - # We don't want VAULT_LICENSE set when running Go tests, because that's - # not what developers have in their environments and it could break some - # tests; it would be like setting VAULT_TOKEN. However some non-Go - # CI commands, like the UI tests, shouldn't have to worry about licensing. - # So we set VAULT_LICENSE in CI, and here we unset it. Instead of - # VAULT_LICENSE, we populate VAULT_LICENSE_CI, so that tests which want - # an externally supplied license can opt-in to using it. - export VAULT_LICENSE_CI="$VAULT_LICENSE" - VAULT_LICENSE= - - # Create a docker network for our testcontainer - if [ $USE_DOCKER == 1 ]; then - # Despite the fact that we're using a circleci image (thus getting the - # version they chose for the docker cli) and that we're specifying a - # docker version to use for the remote docker instances, we occasionally - # see "client version too new, max supported version 1.39" errors for - # reasons unclear. - export DOCKER_API_VERSION=1.39 - - export TEST_DOCKER_NETWORK_ID=$(docker network list -q -f 'name=vaulttest') - if [ -z $TEST_DOCKER_NETWORK_ID ]; then - TEST_DOCKER_NETWORK_ID=$(docker network create vaulttest) + name: Check cache status + - run: + command: make -C packages*.lock write-builder-cache-keys + name: Write builder layer cache keys + - restore_cache: + key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} + keys: + - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} + - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} + - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} + - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} + - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} + - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} + - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} + - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} + - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} + name: 'Restore Builder Image Cache: copy-source' + - run: + command: make -C packages*.lock load-builder-cache + name: Load whatever builder cache we have (if any) into the Docker daemon + no_output_timeout: 30m + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." fi - - - # Start a docker testcontainer to run the tests in - docker run -d \ - -e TEST_DOCKER_NETWORK_ID \ - -e GOPRIVATE \ - -e DOCKER_CERT_PATH \ - -e DOCKER_HOST \ - -e DOCKER_MACHINE_NAME \ - -e DOCKER_TLS_VERIFY \ - -e NO_PROXY \ - -e VAULT_TEST_LOG_DIR=/tmp/testlogs \ - --network vaulttest --name \ - testcontainer docker.mirror.hashicorp.services/circleci/golang:1.16.7-buster \ - tail -f /dev/null - - # Run tests - test -d /tmp/go-cache && docker cp /tmp/go-cache testcontainer:/tmp/gocache - docker exec testcontainer sh -c 'mkdir -p /go/src/github.com/hashicorp/vault' - docker cp . testcontainer:/go/src/github.com/hashicorp/vault/ - docker cp $DOCKER_CERT_PATH/ testcontainer:$DOCKER_CERT_PATH - - # Copy the downloaded modules inside the container. - docker exec testcontainer sh -c 'mkdir -p /go/pkg' - docker cp "$(go env GOPATH)/pkg/mod" testcontainer:/go/pkg/mod - - docker exec -w /go/src/github.com/hashicorp/vault/ \ - -e CIRCLECI -e VAULT_CI_GO_TEST_RACE \ - -e GOCACHE=/tmp/gocache \ - -e GO_TAGS \ - -e GOPROXY="off" \ - -e VAULT_LICENSE_CI \ - -e GOARCH=amd64 \ - testcontainer \ - gotestsum --format=short-verbose \ - --junitfile test-results/go-test/results.xml \ - --jsonfile test-results/go-test/results.json \ - -- \ - -tags "${GO_TAGS} ${EXTRA_TAGS}" \ - -timeout=60m \ - -parallel=20 \ - \ - ${package_names} - else - GOARCH=amd64 \ - GOCACHE=/tmp/go-cache \ - gotestsum --format=short-verbose \ - --junitfile test-results/go-test/results.xml \ - --jsonfile test-results/go-test/results.json \ - -- \ - -tags "${GO_TAGS} ${EXTRA_TAGS}" \ - -timeout=60m \ - -parallel=20 \ - \ - ${package_names} - fi - environment: - GOPRIVATE: github.com/hashicorp/* - name: Run Go tests - no_output_timeout: 60m - - run: - command: | - docker cp testcontainer:/go/src/github.com/hashicorp/vault/test-results . - docker cp testcontainer:/tmp/gocache /tmp/go-cache - name: Copy test results - when: always - - store_artifacts: - path: test-results - - store_test_results: - path: test-results - - store_artifacts: - path: /tmp/testlogs + make -C packages*.lock package + name: Compile Package + - run: + command: ls -lahR .buildcache/packages + name: List packages + - save_cache: + paths: + - .buildcache/packages/store + key: package-70290ee80c00ff40a9baf8e2800a2778dd11bc34-{{checksum ".buildcache/cache-keys/package-70290ee80c00ff40a9baf8e2800a2778dd11bc34"}} + name: Save package cache environment: - - CIRCLECI_CLI_VERSION: 0.1.5546 - - GO_TAGS: '' + PACKAGE_SPEC_ID: 70290ee80c00ff40a9baf8e2800a2778dd11bc34 freebsd_386_package: - docker: - - image: docker.mirror.hashicorp.services/circleci/buildpack-deps - shell: /usr/bin/env bash -euo pipefail -c - environment: - - AUTO_INSTALL_TOOLS: 'YES' - - BUILDKIT_PROGRESS: plain - - PRODUCT_REVISION: '' - - PACKAGE_SPEC_ID: 73e5929eed187b34bc51c84dc9e68cfe4e6452e0 - steps: - - setup_remote_docker: - docker_layer_caching: false - version: 19.03.12 - - add_ssh_keys: - fingerprints: - - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 - - checkout: - path: . - - run: - command: make -C packages*.lock write-package-cache-key - name: Write package cache key - - restore_cache: - key: package-73e5929eed187b34bc51c84dc9e68cfe4e6452e0-{{checksum ".buildcache/cache-keys/package-73e5929eed187b34bc51c84dc9e68cfe4e6452e0"}} - name: Restore package cache - - run: - command: |2 - - 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 cache status - - run: - command: make -C packages*.lock write-builder-cache-keys - name: Write builder layer cache keys - - restore_cache: - key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} - keys: - - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} - - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} - - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} - - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} - - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} - - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} - - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} - - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} - - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} - name: 'Restore Builder Image Cache: copy-source' - - run: - command: make -C packages*.lock load-builder-cache - name: Load whatever builder cache we have (if any) into the Docker daemon - no_output_timeout: 30m - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." - fi - - make -C packages*.lock package - name: Compile Package - - run: - command: ls -lahR .buildcache/packages - name: List packages - - save_cache: - key: package-73e5929eed187b34bc51c84dc9e68cfe4e6452e0-{{checksum ".buildcache/cache-keys/package-73e5929eed187b34bc51c84dc9e68cfe4e6452e0"}} - name: Save package cache - paths: - - .buildcache/packages/store - test-go-race: - docker: - - image: docker.mirror.hashicorp.services/circleci/golang:1.16.7-buster - resource_class: xlarge - working_directory: /go/src/github.com/hashicorp/vault - parallelism: 8 + executor: builder 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 + - setup_remote_docker: + version: 19.03.12 + docker_layer_caching: false + - add_ssh_keys: + fingerprints: + - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 + - checkout: + path: . + - run: + command: make -C packages*.lock write-package-cache-key + name: Write package cache key + - restore_cache: + key: package-73e5929eed187b34bc51c84dc9e68cfe4e6452e0-{{checksum ".buildcache/cache-keys/package-73e5929eed187b34bc51c84dc9e68cfe4e6452e0"}} + name: Restore package cache + - run: + command: |2 + + 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 - } - # exit with success either way - exit 0 - name: Check branch name - working_directory: ~/ - - checkout - - add_ssh_keys: - fingerprints: - - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 - - run: - command: | - git config --global url."git@github.com:".insteadOf https://github.com/ - - 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" }} - - restore_cache: - keys: - - v1.3-{{checksum "go.sum"}}-{{checksum "sdk/go.sum"}}-{{checksum "api/go.sum"}} - name: Restore exact go modules cache - - run: - command: | - set -x - - EXTRA_TAGS= - case "-race" in - *-race*) export VAULT_CI_GO_TEST_RACE=1;; - *) EXTRA_TAGS=deadlock;; - 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" - - USE_DOCKER=0 - - # 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. - if [ $USE_DOCKER == 1 ]; then - 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) - else - 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) - fi - - # After running tests split step, we are now running the following steps - # in multiple different containers, each getting a different subset of - # the test packages in their package_names variable. Each container - # has its own remote docker VM. - - make prep - mkdir -p test-results/go-test - - # We don't want VAULT_LICENSE set when running Go tests, because that's - # not what developers have in their environments and it could break some - # tests; it would be like setting VAULT_TOKEN. However some non-Go - # CI commands, like the UI tests, shouldn't have to worry about licensing. - # So we set VAULT_LICENSE in CI, and here we unset it. Instead of - # VAULT_LICENSE, we populate VAULT_LICENSE_CI, so that tests which want - # an externally supplied license can opt-in to using it. - export VAULT_LICENSE_CI="$VAULT_LICENSE" - VAULT_LICENSE= - - # Create a docker network for our testcontainer - if [ $USE_DOCKER == 1 ]; then - # Despite the fact that we're using a circleci image (thus getting the - # version they chose for the docker cli) and that we're specifying a - # docker version to use for the remote docker instances, we occasionally - # see "client version too new, max supported version 1.39" errors for - # reasons unclear. - export DOCKER_API_VERSION=1.39 - - export TEST_DOCKER_NETWORK_ID=$(docker network list -q -f 'name=vaulttest') - if [ -z $TEST_DOCKER_NETWORK_ID ]; then - TEST_DOCKER_NETWORK_ID=$(docker network create vaulttest) + name: Check cache status + - run: + command: make -C packages*.lock write-builder-cache-keys + name: Write builder layer cache keys + - restore_cache: + key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} + keys: + - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} + - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} + - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} + - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} + - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} + - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} + - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} + - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} + - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} + name: 'Restore Builder Image Cache: copy-source' + - run: + command: make -C packages*.lock load-builder-cache + name: Load whatever builder cache we have (if any) into the Docker daemon + no_output_timeout: 30m + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." fi - - - # Start a docker testcontainer to run the tests in - docker run -d \ - -e TEST_DOCKER_NETWORK_ID \ - -e GOPRIVATE \ - -e DOCKER_CERT_PATH \ - -e DOCKER_HOST \ - -e DOCKER_MACHINE_NAME \ - -e DOCKER_TLS_VERIFY \ - -e NO_PROXY \ - -e VAULT_TEST_LOG_DIR=/tmp/testlogs \ - --network vaulttest --name \ - testcontainer docker.mirror.hashicorp.services/circleci/golang:1.16.7-buster \ - tail -f /dev/null - - # Run tests - test -d /tmp/go-cache && docker cp /tmp/go-cache testcontainer:/tmp/gocache - docker exec testcontainer sh -c 'mkdir -p /go/src/github.com/hashicorp/vault' - docker cp . testcontainer:/go/src/github.com/hashicorp/vault/ - docker cp $DOCKER_CERT_PATH/ testcontainer:$DOCKER_CERT_PATH - - # Copy the downloaded modules inside the container. - docker exec testcontainer sh -c 'mkdir -p /go/pkg' - docker cp "$(go env GOPATH)/pkg/mod" testcontainer:/go/pkg/mod - - docker exec -w /go/src/github.com/hashicorp/vault/ \ - -e CIRCLECI -e VAULT_CI_GO_TEST_RACE \ - -e GOCACHE=/tmp/gocache \ - -e GO_TAGS \ - -e GOPROXY="off" \ - -e VAULT_LICENSE_CI \ - -e GOARCH=amd64 \ - testcontainer \ - gotestsum --format=short-verbose \ - --junitfile test-results/go-test/results.xml \ - --jsonfile test-results/go-test/results.json \ - -- \ - -tags "${GO_TAGS} ${EXTRA_TAGS}" \ - -timeout=60m \ - -parallel=20 \ - -race \ - ${package_names} - else - GOARCH=amd64 \ - GOCACHE=/tmp/go-cache \ - gotestsum --format=short-verbose \ - --junitfile test-results/go-test/results.xml \ - --jsonfile test-results/go-test/results.json \ - -- \ - -tags "${GO_TAGS} ${EXTRA_TAGS}" \ - -timeout=60m \ - -parallel=20 \ - -race \ - ${package_names} - fi - environment: - GOPRIVATE: github.com/hashicorp/* - name: Run Go tests - no_output_timeout: 60m - - store_artifacts: - path: test-results - - store_test_results: - path: test-results - - store_artifacts: - path: /tmp/testlogs + make -C packages*.lock package + name: Compile Package + - run: + command: ls -lahR .buildcache/packages + name: List packages + - save_cache: + paths: + - .buildcache/packages/store + key: package-73e5929eed187b34bc51c84dc9e68cfe4e6452e0-{{checksum ".buildcache/cache-keys/package-73e5929eed187b34bc51c84dc9e68cfe4e6452e0"}} + name: Save package cache environment: - - CIRCLECI_CLI_VERSION: 0.1.5546 - - GO_TAGS: '' + PACKAGE_SPEC_ID: 73e5929eed187b34bc51c84dc9e68cfe4e6452e0 freebsd_amd64_package: - docker: - - image: docker.mirror.hashicorp.services/circleci/buildpack-deps - shell: /usr/bin/env bash -euo pipefail -c - environment: - - AUTO_INSTALL_TOOLS: 'YES' - - BUILDKIT_PROGRESS: plain - - PRODUCT_REVISION: '' - - PACKAGE_SPEC_ID: 2d48df616168bf8ae1cdbfce10f31b3c73759ef9 + executor: builder steps: - - setup_remote_docker: - docker_layer_caching: false - version: 19.03.12 - - add_ssh_keys: - fingerprints: - - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 - - checkout: - path: . - - run: - command: make -C packages*.lock write-package-cache-key - name: Write package cache key - - restore_cache: - key: package-2d48df616168bf8ae1cdbfce10f31b3c73759ef9-{{checksum ".buildcache/cache-keys/package-2d48df616168bf8ae1cdbfce10f31b3c73759ef9"}} - name: Restore package cache - - run: - command: |2 - - 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 cache status - - run: - command: make -C packages*.lock write-builder-cache-keys - name: Write builder layer cache keys - - restore_cache: - key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} - keys: - - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} - - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} - - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} - - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} - - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} - - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} - - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} - - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} - - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} - name: 'Restore Builder Image Cache: copy-source' - - run: - command: make -C packages*.lock load-builder-cache - name: Load whatever builder cache we have (if any) into the Docker daemon - no_output_timeout: 30m - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." - fi - - make -C packages*.lock package - name: Compile Package - - run: - command: ls -lahR .buildcache/packages - name: List packages - - save_cache: - key: package-2d48df616168bf8ae1cdbfce10f31b3c73759ef9-{{checksum ".buildcache/cache-keys/package-2d48df616168bf8ae1cdbfce10f31b3c73759ef9"}} - name: Save package cache - paths: - - .buildcache/packages/store - openbsd_386_package: - docker: - - image: docker.mirror.hashicorp.services/circleci/buildpack-deps - shell: /usr/bin/env bash -euo pipefail -c + - setup_remote_docker: + version: 19.03.12 + docker_layer_caching: false + - add_ssh_keys: + fingerprints: + - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 + - checkout: + path: . + - run: + command: make -C packages*.lock write-package-cache-key + name: Write package cache key + - restore_cache: + key: package-2d48df616168bf8ae1cdbfce10f31b3c73759ef9-{{checksum ".buildcache/cache-keys/package-2d48df616168bf8ae1cdbfce10f31b3c73759ef9"}} + name: Restore package cache + - run: + command: |2 + + 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 cache status + - run: + command: make -C packages*.lock write-builder-cache-keys + name: Write builder layer cache keys + - restore_cache: + key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} + keys: + - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} + - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} + - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} + - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} + - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} + - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} + - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} + - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} + - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} + name: 'Restore Builder Image Cache: copy-source' + - run: + command: make -C packages*.lock load-builder-cache + name: Load whatever builder cache we have (if any) into the Docker daemon + no_output_timeout: 30m + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." + fi + + make -C packages*.lock package + name: Compile Package + - run: + command: ls -lahR .buildcache/packages + name: List packages + - save_cache: + paths: + - .buildcache/packages/store + key: package-2d48df616168bf8ae1cdbfce10f31b3c73759ef9-{{checksum ".buildcache/cache-keys/package-2d48df616168bf8ae1cdbfce10f31b3c73759ef9"}} + name: Save package cache environment: - - AUTO_INSTALL_TOOLS: 'YES' - - BUILDKIT_PROGRESS: plain - - PRODUCT_REVISION: '' - - PACKAGE_SPEC_ID: 15e0bf30e04ca7f3808ca5a0d872d99ec30fb2e7 + PACKAGE_SPEC_ID: 2d48df616168bf8ae1cdbfce10f31b3c73759ef9 + freebsd_arm_package: + executor: builder steps: - - setup_remote_docker: - docker_layer_caching: false - version: 19.03.12 - - add_ssh_keys: - fingerprints: - - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 - - checkout: - path: . - - run: - command: make -C packages*.lock write-package-cache-key - name: Write package cache key - - restore_cache: - key: package-15e0bf30e04ca7f3808ca5a0d872d99ec30fb2e7-{{checksum ".buildcache/cache-keys/package-15e0bf30e04ca7f3808ca5a0d872d99ec30fb2e7"}} - name: Restore package cache - - run: - command: |2 - - 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 cache status - - run: - command: make -C packages*.lock write-builder-cache-keys - name: Write builder layer cache keys - - restore_cache: - key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} - keys: - - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} - - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} - - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} - - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} - - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} - - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} - - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} - - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} - - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} - name: 'Restore Builder Image Cache: copy-source' - - run: - command: make -C packages*.lock load-builder-cache - name: Load whatever builder cache we have (if any) into the Docker daemon - no_output_timeout: 30m - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." - fi - - make -C packages*.lock package - name: Compile Package - - run: - command: ls -lahR .buildcache/packages - name: List packages - - save_cache: - key: package-15e0bf30e04ca7f3808ca5a0d872d99ec30fb2e7-{{checksum ".buildcache/cache-keys/package-15e0bf30e04ca7f3808ca5a0d872d99ec30fb2e7"}} - name: Save package cache - paths: - - .buildcache/packages/store - linux_amd64_package: - docker: - - image: docker.mirror.hashicorp.services/circleci/buildpack-deps - shell: /usr/bin/env bash -euo pipefail -c + - setup_remote_docker: + version: 19.03.12 + docker_layer_caching: false + - add_ssh_keys: + fingerprints: + - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 + - checkout: + path: . + - run: + command: make -C packages*.lock write-package-cache-key + name: Write package cache key + - restore_cache: + key: package-552364a81ae60ec9e925bf03436153925235fa28-{{checksum ".buildcache/cache-keys/package-552364a81ae60ec9e925bf03436153925235fa28"}} + name: Restore package cache + - run: + command: |2 + + 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 cache status + - run: + command: make -C packages*.lock write-builder-cache-keys + name: Write builder layer cache keys + - restore_cache: + key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} + keys: + - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} + - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} + - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} + - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} + - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} + - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} + - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} + - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} + - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} + name: 'Restore Builder Image Cache: copy-source' + - run: + command: make -C packages*.lock load-builder-cache + name: Load whatever builder cache we have (if any) into the Docker daemon + no_output_timeout: 30m + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." + fi + + make -C packages*.lock package + name: Compile Package + - run: + command: ls -lahR .buildcache/packages + name: List packages + - save_cache: + paths: + - .buildcache/packages/store + key: package-552364a81ae60ec9e925bf03436153925235fa28-{{checksum ".buildcache/cache-keys/package-552364a81ae60ec9e925bf03436153925235fa28"}} + name: Save package cache environment: - - AUTO_INSTALL_TOOLS: 'YES' - - BUILDKIT_PROGRESS: plain - - PRODUCT_REVISION: '' - - PACKAGE_SPEC_ID: 86eb712fba163c80690185fe24c22b178dbd17f8 - steps: - - setup_remote_docker: - docker_layer_caching: false - version: 19.03.12 - - add_ssh_keys: - fingerprints: - - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 - - checkout: - path: . - - run: - command: make -C packages*.lock write-package-cache-key - name: Write package cache key - - restore_cache: - key: package-86eb712fba163c80690185fe24c22b178dbd17f8-{{checksum ".buildcache/cache-keys/package-86eb712fba163c80690185fe24c22b178dbd17f8"}} - name: Restore package cache - - run: - command: |2 - - 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 cache status - - run: - command: make -C packages*.lock write-builder-cache-keys - name: Write builder layer cache keys - - restore_cache: - key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} - keys: - - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} - - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} - - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} - - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} - - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} - - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} - - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} - - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} - - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} - name: 'Restore Builder Image Cache: copy-source' - - run: - command: make -C packages*.lock load-builder-cache - name: Load whatever builder cache we have (if any) into the Docker daemon - no_output_timeout: 30m - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." - fi - - make -C packages*.lock package - name: Compile Package - - run: - command: ls -lahR .buildcache/packages - name: List packages - - save_cache: - key: package-86eb712fba163c80690185fe24c22b178dbd17f8-{{checksum ".buildcache/cache-keys/package-86eb712fba163c80690185fe24c22b178dbd17f8"}} - name: Save package cache - paths: - - .buildcache/packages/store - website-docker-image: - docker: - - image: circleci/buildpack-deps - shell: /usr/bin/env bash -euo pipefail -c + PACKAGE_SPEC_ID: 552364a81ae60ec9e925bf03436153925235fa28 + linux_386_package: + executor: builder 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: docker.mirror.hashicorp.services/circleci/buildpack-deps - shell: /usr/bin/env bash -euo pipefail -c + - setup_remote_docker: + version: 19.03.12 + docker_layer_caching: false + - add_ssh_keys: + fingerprints: + - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 + - checkout: + path: . + - run: + command: make -C packages*.lock write-package-cache-key + name: Write package cache key + - restore_cache: + key: package-0cfa14d59a028968575a92d27d1d41352eb6ce63-{{checksum ".buildcache/cache-keys/package-0cfa14d59a028968575a92d27d1d41352eb6ce63"}} + name: Restore package cache + - run: + command: |2 + + 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 cache status + - run: + command: make -C packages*.lock write-builder-cache-keys + name: Write builder layer cache keys + - restore_cache: + key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} + keys: + - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} + - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} + - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} + - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} + - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} + - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} + - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} + - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} + - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} + name: 'Restore Builder Image Cache: copy-source' + - run: + command: make -C packages*.lock load-builder-cache + name: Load whatever builder cache we have (if any) into the Docker daemon + no_output_timeout: 30m + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." + fi + + make -C packages*.lock package + name: Compile Package + - run: + command: ls -lahR .buildcache/packages + name: List packages + - save_cache: + paths: + - .buildcache/packages/store + key: package-0cfa14d59a028968575a92d27d1d41352eb6ce63-{{checksum ".buildcache/cache-keys/package-0cfa14d59a028968575a92d27d1d41352eb6ce63"}} + name: Save package cache environment: - - AUTO_INSTALL_TOOLS: 'YES' - - BUILDKIT_PROGRESS: plain - - PRODUCT_REVISION: '' - - PACKAGE_SPEC_ID: 359562b465a81cb702a7b863940395b5261ed70f + PACKAGE_SPEC_ID: 0cfa14d59a028968575a92d27d1d41352eb6ce63 + linux_amd64_package: + executor: builder steps: - - setup_remote_docker: - docker_layer_caching: false - version: 19.03.12 - - add_ssh_keys: - fingerprints: - - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 - - checkout: - path: . - - run: - command: make -C packages*.lock write-package-cache-key - name: Write package cache key - - restore_cache: - key: package-359562b465a81cb702a7b863940395b5261ed70f-{{checksum ".buildcache/cache-keys/package-359562b465a81cb702a7b863940395b5261ed70f"}} - name: Restore package cache - - run: - command: |2 - - 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 cache status - - run: - command: make -C packages*.lock write-builder-cache-keys - name: Write builder layer cache keys - - restore_cache: - key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} - keys: - - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} - - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} - - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} - - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} - - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} - - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} - - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} - - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} - - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} - name: 'Restore Builder Image Cache: copy-source' - - run: - command: make -C packages*.lock load-builder-cache - name: Load whatever builder cache we have (if any) into the Docker daemon - no_output_timeout: 30m - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." - fi - - make -C packages*.lock package - name: Compile Package - - run: - command: ls -lahR .buildcache/packages - name: List packages - - save_cache: - key: package-359562b465a81cb702a7b863940395b5261ed70f-{{checksum ".buildcache/cache-keys/package-359562b465a81cb702a7b863940395b5261ed70f"}} - name: Save package cache - paths: - - .buildcache/packages/store - test-go: - docker: - - image: docker.mirror.hashicorp.services/circleci/golang:1.16.7-buster - resource_class: large - working_directory: /go/src/github.com/hashicorp/vault - parallelism: 8 + - setup_remote_docker: + version: 19.03.12 + docker_layer_caching: false + - add_ssh_keys: + fingerprints: + - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 + - checkout: + path: . + - run: + command: make -C packages*.lock write-package-cache-key + name: Write package cache key + - restore_cache: + key: package-86eb712fba163c80690185fe24c22b178dbd17f8-{{checksum ".buildcache/cache-keys/package-86eb712fba163c80690185fe24c22b178dbd17f8"}} + name: Restore package cache + - run: + command: |2 + + 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 cache status + - run: + command: make -C packages*.lock write-builder-cache-keys + name: Write builder layer cache keys + - restore_cache: + key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} + keys: + - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} + - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} + - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} + - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} + - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} + - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} + - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} + - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} + - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} + name: 'Restore Builder Image Cache: copy-source' + - run: + command: make -C packages*.lock load-builder-cache + name: Load whatever builder cache we have (if any) into the Docker daemon + no_output_timeout: 30m + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." + fi + + make -C packages*.lock package + name: Compile Package + - run: + command: ls -lahR .buildcache/packages + name: List packages + - save_cache: + paths: + - .buildcache/packages/store + key: package-86eb712fba163c80690185fe24c22b178dbd17f8-{{checksum ".buildcache/cache-keys/package-86eb712fba163c80690185fe24c22b178dbd17f8"}} + name: Save package cache + environment: + PACKAGE_SPEC_ID: 86eb712fba163c80690185fe24c22b178dbd17f8 + linux_arm_package: + executor: builder 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 + - setup_remote_docker: + version: 19.03.12 + docker_layer_caching: false + - add_ssh_keys: + fingerprints: + - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 + - checkout: + path: . + - run: + command: make -C packages*.lock write-package-cache-key + name: Write package cache key + - restore_cache: + key: package-bc0d94feb5922f5c16715af7cc85b2060a87ddc7-{{checksum ".buildcache/cache-keys/package-bc0d94feb5922f5c16715af7cc85b2060a87ddc7"}} + name: Restore package cache + - run: + command: |2 + + 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 - } - # exit with success either way - exit 0 - name: Check branch name - working_directory: ~/ - - checkout - - add_ssh_keys: - fingerprints: - - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 - - run: - command: | - git config --global url."git@github.com:".insteadOf https://github.com/ - - 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" }} - - restore_cache: - keys: - - v1.3-{{checksum "go.sum"}}-{{checksum "sdk/go.sum"}}-{{checksum "api/go.sum"}} - name: Restore exact go modules cache - - run: - command: | - set -x - - EXTRA_TAGS= - case "" in - *-race*) export VAULT_CI_GO_TEST_RACE=1;; - *) EXTRA_TAGS=deadlock;; - 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" - - USE_DOCKER=0 - - # 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. - if [ $USE_DOCKER == 1 ]; then - 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) - else - 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) - fi - - # After running tests split step, we are now running the following steps - # in multiple different containers, each getting a different subset of - # the test packages in their package_names variable. Each container - # has its own remote docker VM. - - make prep - mkdir -p test-results/go-test - - # We don't want VAULT_LICENSE set when running Go tests, because that's - # not what developers have in their environments and it could break some - # tests; it would be like setting VAULT_TOKEN. However some non-Go - # CI commands, like the UI tests, shouldn't have to worry about licensing. - # So we set VAULT_LICENSE in CI, and here we unset it. Instead of - # VAULT_LICENSE, we populate VAULT_LICENSE_CI, so that tests which want - # an externally supplied license can opt-in to using it. - export VAULT_LICENSE_CI="$VAULT_LICENSE" - VAULT_LICENSE= - - # Create a docker network for our testcontainer - if [ $USE_DOCKER == 1 ]; then - # Despite the fact that we're using a circleci image (thus getting the - # version they chose for the docker cli) and that we're specifying a - # docker version to use for the remote docker instances, we occasionally - # see "client version too new, max supported version 1.39" errors for - # reasons unclear. - export DOCKER_API_VERSION=1.39 - - export TEST_DOCKER_NETWORK_ID=$(docker network list -q -f 'name=vaulttest') - if [ -z $TEST_DOCKER_NETWORK_ID ]; then - TEST_DOCKER_NETWORK_ID=$(docker network create vaulttest) + name: Check cache status + - run: + command: make -C packages*.lock write-builder-cache-keys + name: Write builder layer cache keys + - restore_cache: + key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} + keys: + - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} + - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} + - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} + - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} + - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} + - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} + - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} + - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} + - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} + name: 'Restore Builder Image Cache: copy-source' + - run: + command: make -C packages*.lock load-builder-cache + name: Load whatever builder cache we have (if any) into the Docker daemon + no_output_timeout: 30m + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." fi + make -C packages*.lock package + name: Compile Package + - run: + command: ls -lahR .buildcache/packages + name: List packages + - save_cache: + paths: + - .buildcache/packages/store + key: package-bc0d94feb5922f5c16715af7cc85b2060a87ddc7-{{checksum ".buildcache/cache-keys/package-bc0d94feb5922f5c16715af7cc85b2060a87ddc7"}} + name: Save package cache + environment: + PACKAGE_SPEC_ID: bc0d94feb5922f5c16715af7cc85b2060a87ddc7 + linux_arm64_package: + executor: builder + steps: + - setup_remote_docker: + version: 19.03.12 + docker_layer_caching: false + - add_ssh_keys: + fingerprints: + - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 + - checkout: + path: . + - run: + command: make -C packages*.lock write-package-cache-key + name: Write package cache key + - restore_cache: + key: package-d608f9c10443d43d15a161559d07d812a24dffd4-{{checksum ".buildcache/cache-keys/package-d608f9c10443d43d15a161559d07d812a24dffd4"}} + name: Restore package cache + - run: + command: |2 + + 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 cache status + - run: + command: make -C packages*.lock write-builder-cache-keys + name: Write builder layer cache keys + - restore_cache: + key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} + keys: + - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} + - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} + - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} + - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} + - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} + - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} + - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} + - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} + - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} + name: 'Restore Builder Image Cache: copy-source' + - run: + command: make -C packages*.lock load-builder-cache + name: Load whatever builder cache we have (if any) into the Docker daemon + no_output_timeout: 30m + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." + fi + make -C packages*.lock package + name: Compile Package + - run: + command: ls -lahR .buildcache/packages + name: List packages + - save_cache: + paths: + - .buildcache/packages/store + key: package-d608f9c10443d43d15a161559d07d812a24dffd4-{{checksum ".buildcache/cache-keys/package-d608f9c10443d43d15a161559d07d812a24dffd4"}} + name: Save package cache + environment: + PACKAGE_SPEC_ID: d608f9c10443d43d15a161559d07d812a24dffd4 + netbsd_386_package: + executor: builder + steps: + - setup_remote_docker: + version: 19.03.12 + docker_layer_caching: false + - add_ssh_keys: + fingerprints: + - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 + - checkout: + path: . + - run: + command: make -C packages*.lock write-package-cache-key + name: Write package cache key + - restore_cache: + key: package-113e2a29f4786b4f0b53955ceb8dcf6ba42a38c2-{{checksum ".buildcache/cache-keys/package-113e2a29f4786b4f0b53955ceb8dcf6ba42a38c2"}} + name: Restore package cache + - run: + command: |2 + + 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 cache status + - run: + command: make -C packages*.lock write-builder-cache-keys + name: Write builder layer cache keys + - restore_cache: + key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} + keys: + - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} + - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} + - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} + - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} + - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} + - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} + - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} + - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} + - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} + name: 'Restore Builder Image Cache: copy-source' + - run: + command: make -C packages*.lock load-builder-cache + name: Load whatever builder cache we have (if any) into the Docker daemon + no_output_timeout: 30m + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." + fi - # Start a docker testcontainer to run the tests in - docker run -d \ - -e TEST_DOCKER_NETWORK_ID \ - -e GOPRIVATE \ - -e DOCKER_CERT_PATH \ - -e DOCKER_HOST \ - -e DOCKER_MACHINE_NAME \ - -e DOCKER_TLS_VERIFY \ - -e NO_PROXY \ - -e VAULT_TEST_LOG_DIR=/tmp/testlogs \ - --network vaulttest --name \ - testcontainer docker.mirror.hashicorp.services/circleci/golang:1.16.7-buster \ - tail -f /dev/null - - # Run tests - test -d /tmp/go-cache && docker cp /tmp/go-cache testcontainer:/tmp/gocache - docker exec testcontainer sh -c 'mkdir -p /go/src/github.com/hashicorp/vault' - docker cp . testcontainer:/go/src/github.com/hashicorp/vault/ - docker cp $DOCKER_CERT_PATH/ testcontainer:$DOCKER_CERT_PATH - - # Copy the downloaded modules inside the container. - docker exec testcontainer sh -c 'mkdir -p /go/pkg' - docker cp "$(go env GOPATH)/pkg/mod" testcontainer:/go/pkg/mod - - docker exec -w /go/src/github.com/hashicorp/vault/ \ - -e CIRCLECI -e VAULT_CI_GO_TEST_RACE \ - -e GOCACHE=/tmp/gocache \ - -e GO_TAGS \ - -e GOPROXY="off" \ - -e VAULT_LICENSE_CI \ - -e GOARCH=amd64 \ - testcontainer \ - gotestsum --format=short-verbose \ - --junitfile test-results/go-test/results.xml \ - --jsonfile test-results/go-test/results.json \ - -- \ - -tags "${GO_TAGS} ${EXTRA_TAGS}" \ - -timeout=60m \ - -parallel=20 \ - \ - ${package_names} - else - GOARCH=amd64 \ - GOCACHE=/tmp/go-cache \ - gotestsum --format=short-verbose \ - --junitfile test-results/go-test/results.xml \ - --jsonfile test-results/go-test/results.json \ - -- \ - -tags "${GO_TAGS} ${EXTRA_TAGS}" \ - -timeout=60m \ - -parallel=20 \ - \ - ${package_names} - fi - environment: - GOPRIVATE: github.com/hashicorp/* - name: Run Go tests - no_output_timeout: 60m - - store_artifacts: - path: test-results - - store_test_results: - path: test-results - - store_artifacts: - path: /tmp/testlogs + make -C packages*.lock package + name: Compile Package + - run: + command: ls -lahR .buildcache/packages + name: List packages + - save_cache: + paths: + - .buildcache/packages/store + key: package-113e2a29f4786b4f0b53955ceb8dcf6ba42a38c2-{{checksum ".buildcache/cache-keys/package-113e2a29f4786b4f0b53955ceb8dcf6ba42a38c2"}} + name: Save package cache environment: - - CIRCLECI_CLI_VERSION: 0.1.5546 - - GO_TAGS: '' + PACKAGE_SPEC_ID: 113e2a29f4786b4f0b53955ceb8dcf6ba42a38c2 netbsd_amd64_package: - docker: - - image: docker.mirror.hashicorp.services/circleci/buildpack-deps - shell: /usr/bin/env bash -euo pipefail -c - environment: - - AUTO_INSTALL_TOOLS: 'YES' - - BUILDKIT_PROGRESS: plain - - PRODUCT_REVISION: '' - - PACKAGE_SPEC_ID: c6ab5585544823405f0a5a44616458612459c3b2 + executor: builder steps: - - setup_remote_docker: - docker_layer_caching: false - version: 19.03.12 - - add_ssh_keys: - fingerprints: - - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 - - checkout: - path: . - - run: - command: make -C packages*.lock write-package-cache-key - name: Write package cache key - - restore_cache: - key: package-c6ab5585544823405f0a5a44616458612459c3b2-{{checksum ".buildcache/cache-keys/package-c6ab5585544823405f0a5a44616458612459c3b2"}} - name: Restore package cache - - run: - command: |2 - - 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 cache status - - run: - command: make -C packages*.lock write-builder-cache-keys - name: Write builder layer cache keys - - restore_cache: - key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} - keys: - - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} - - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} - - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} - - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} - - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} - - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} - - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} - - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} - - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} - name: 'Restore Builder Image Cache: copy-source' - - run: - command: make -C packages*.lock load-builder-cache - name: Load whatever builder cache we have (if any) into the Docker daemon - no_output_timeout: 30m - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." - fi - - make -C packages*.lock package - name: Compile Package - - run: - command: ls -lahR .buildcache/packages - name: List packages - - save_cache: - key: package-c6ab5585544823405f0a5a44616458612459c3b2-{{checksum ".buildcache/cache-keys/package-c6ab5585544823405f0a5a44616458612459c3b2"}} - name: Save package cache - paths: - - .buildcache/packages/store - openbsd_amd64_package: - docker: - - image: docker.mirror.hashicorp.services/circleci/buildpack-deps - shell: /usr/bin/env bash -euo pipefail -c + - setup_remote_docker: + version: 19.03.12 + docker_layer_caching: false + - add_ssh_keys: + fingerprints: + - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 + - checkout: + path: . + - run: + command: make -C packages*.lock write-package-cache-key + name: Write package cache key + - restore_cache: + key: package-c6ab5585544823405f0a5a44616458612459c3b2-{{checksum ".buildcache/cache-keys/package-c6ab5585544823405f0a5a44616458612459c3b2"}} + name: Restore package cache + - run: + command: |2 + + 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 cache status + - run: + command: make -C packages*.lock write-builder-cache-keys + name: Write builder layer cache keys + - restore_cache: + key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} + keys: + - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} + - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} + - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} + - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} + - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} + - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} + - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} + - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} + - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} + name: 'Restore Builder Image Cache: copy-source' + - run: + command: make -C packages*.lock load-builder-cache + name: Load whatever builder cache we have (if any) into the Docker daemon + no_output_timeout: 30m + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." + fi + + make -C packages*.lock package + name: Compile Package + - run: + command: ls -lahR .buildcache/packages + name: List packages + - save_cache: + paths: + - .buildcache/packages/store + key: package-c6ab5585544823405f0a5a44616458612459c3b2-{{checksum ".buildcache/cache-keys/package-c6ab5585544823405f0a5a44616458612459c3b2"}} + name: Save package cache environment: - - AUTO_INSTALL_TOOLS: 'YES' - - BUILDKIT_PROGRESS: plain - - PRODUCT_REVISION: '' - - PACKAGE_SPEC_ID: 96216af336fd2ce49b883ccd837f4cbae27fd647 + PACKAGE_SPEC_ID: c6ab5585544823405f0a5a44616458612459c3b2 + openbsd_386_package: + executor: builder steps: - - setup_remote_docker: - docker_layer_caching: false - version: 19.03.12 - - add_ssh_keys: - fingerprints: - - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 - - checkout: - path: . - - run: - command: make -C packages*.lock write-package-cache-key - name: Write package cache key - - restore_cache: - key: package-96216af336fd2ce49b883ccd837f4cbae27fd647-{{checksum ".buildcache/cache-keys/package-96216af336fd2ce49b883ccd837f4cbae27fd647"}} - name: Restore package cache - - run: - command: |2 - - 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 cache status - - run: - command: make -C packages*.lock write-builder-cache-keys - name: Write builder layer cache keys - - restore_cache: - key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} - keys: - - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} - - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} - - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} - - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} - - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} - - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} - - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} - - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} - - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} - name: 'Restore Builder Image Cache: copy-source' - - run: - command: make -C packages*.lock load-builder-cache - name: Load whatever builder cache we have (if any) into the Docker daemon - no_output_timeout: 30m - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." - fi - - make -C packages*.lock package - name: Compile Package - - run: - command: ls -lahR .buildcache/packages - name: List packages - - save_cache: - key: package-96216af336fd2ce49b883ccd837f4cbae27fd647-{{checksum ".buildcache/cache-keys/package-96216af336fd2ce49b883ccd837f4cbae27fd647"}} - name: Save package cache - paths: - - .buildcache/packages/store - netbsd_386_package: - docker: - - image: docker.mirror.hashicorp.services/circleci/buildpack-deps - shell: /usr/bin/env bash -euo pipefail -c + - setup_remote_docker: + version: 19.03.12 + docker_layer_caching: false + - add_ssh_keys: + fingerprints: + - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 + - checkout: + path: . + - run: + command: make -C packages*.lock write-package-cache-key + name: Write package cache key + - restore_cache: + key: package-15e0bf30e04ca7f3808ca5a0d872d99ec30fb2e7-{{checksum ".buildcache/cache-keys/package-15e0bf30e04ca7f3808ca5a0d872d99ec30fb2e7"}} + name: Restore package cache + - run: + command: |2 + + 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 cache status + - run: + command: make -C packages*.lock write-builder-cache-keys + name: Write builder layer cache keys + - restore_cache: + key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} + keys: + - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} + - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} + - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} + - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} + - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} + - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} + - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} + - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} + - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} + name: 'Restore Builder Image Cache: copy-source' + - run: + command: make -C packages*.lock load-builder-cache + name: Load whatever builder cache we have (if any) into the Docker daemon + no_output_timeout: 30m + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." + fi + + make -C packages*.lock package + name: Compile Package + - run: + command: ls -lahR .buildcache/packages + name: List packages + - save_cache: + paths: + - .buildcache/packages/store + key: package-15e0bf30e04ca7f3808ca5a0d872d99ec30fb2e7-{{checksum ".buildcache/cache-keys/package-15e0bf30e04ca7f3808ca5a0d872d99ec30fb2e7"}} + name: Save package cache environment: - - AUTO_INSTALL_TOOLS: 'YES' - - BUILDKIT_PROGRESS: plain - - PRODUCT_REVISION: '' - - PACKAGE_SPEC_ID: 113e2a29f4786b4f0b53955ceb8dcf6ba42a38c2 + PACKAGE_SPEC_ID: 15e0bf30e04ca7f3808ca5a0d872d99ec30fb2e7 + openbsd_amd64_package: + executor: builder steps: - - setup_remote_docker: - docker_layer_caching: false - version: 19.03.12 - - add_ssh_keys: - fingerprints: - - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 - - checkout: - path: . - - run: - command: make -C packages*.lock write-package-cache-key - name: Write package cache key - - restore_cache: - key: package-113e2a29f4786b4f0b53955ceb8dcf6ba42a38c2-{{checksum ".buildcache/cache-keys/package-113e2a29f4786b4f0b53955ceb8dcf6ba42a38c2"}} - name: Restore package cache - - run: - command: |2 - - 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 cache status - - run: - command: make -C packages*.lock write-builder-cache-keys - name: Write builder layer cache keys - - restore_cache: - key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} - keys: - - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} - - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} - - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} - - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} - - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} - - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} - - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} - - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} - - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} - name: 'Restore Builder Image Cache: copy-source' - - run: - command: make -C packages*.lock load-builder-cache - name: Load whatever builder cache we have (if any) into the Docker daemon - no_output_timeout: 30m - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." - fi - - make -C packages*.lock package - name: Compile Package - - run: - command: ls -lahR .buildcache/packages - name: List packages - - save_cache: - key: package-113e2a29f4786b4f0b53955ceb8dcf6ba42a38c2-{{checksum ".buildcache/cache-keys/package-113e2a29f4786b4f0b53955ceb8dcf6ba42a38c2"}} - name: Save package cache - paths: - - .buildcache/packages/store - freebsd_arm_package: - docker: - - image: docker.mirror.hashicorp.services/circleci/buildpack-deps - shell: /usr/bin/env bash -euo pipefail -c + - setup_remote_docker: + version: 19.03.12 + docker_layer_caching: false + - add_ssh_keys: + fingerprints: + - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 + - checkout: + path: . + - run: + command: make -C packages*.lock write-package-cache-key + name: Write package cache key + - restore_cache: + key: package-96216af336fd2ce49b883ccd837f4cbae27fd647-{{checksum ".buildcache/cache-keys/package-96216af336fd2ce49b883ccd837f4cbae27fd647"}} + name: Restore package cache + - run: + command: |2 + + 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 cache status + - run: + command: make -C packages*.lock write-builder-cache-keys + name: Write builder layer cache keys + - restore_cache: + key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} + keys: + - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} + - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} + - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} + - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} + - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} + - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} + - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} + - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} + - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} + name: 'Restore Builder Image Cache: copy-source' + - run: + command: make -C packages*.lock load-builder-cache + name: Load whatever builder cache we have (if any) into the Docker daemon + no_output_timeout: 30m + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." + fi + + make -C packages*.lock package + name: Compile Package + - run: + command: ls -lahR .buildcache/packages + name: List packages + - save_cache: + paths: + - .buildcache/packages/store + key: package-96216af336fd2ce49b883ccd837f4cbae27fd647-{{checksum ".buildcache/cache-keys/package-96216af336fd2ce49b883ccd837f4cbae27fd647"}} + name: Save package cache environment: - - AUTO_INSTALL_TOOLS: 'YES' - - BUILDKIT_PROGRESS: plain - - PRODUCT_REVISION: '' - - PACKAGE_SPEC_ID: 552364a81ae60ec9e925bf03436153925235fa28 + PACKAGE_SPEC_ID: 96216af336fd2ce49b883ccd837f4cbae27fd647 + solaris_amd64_package: + executor: builder steps: - - setup_remote_docker: - docker_layer_caching: false - version: 19.03.12 - - add_ssh_keys: - fingerprints: - - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 - - checkout: - path: . - - run: - command: make -C packages*.lock write-package-cache-key - name: Write package cache key - - restore_cache: - key: package-552364a81ae60ec9e925bf03436153925235fa28-{{checksum ".buildcache/cache-keys/package-552364a81ae60ec9e925bf03436153925235fa28"}} - name: Restore package cache - - run: - command: |2 - - 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 cache status - - run: - command: make -C packages*.lock write-builder-cache-keys - name: Write builder layer cache keys - - restore_cache: - key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} - keys: - - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} - - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} - - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} - - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} - - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} - - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} - - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} - - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} - - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} - name: 'Restore Builder Image Cache: copy-source' - - run: - command: make -C packages*.lock load-builder-cache - name: Load whatever builder cache we have (if any) into the Docker daemon - no_output_timeout: 30m - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." - fi - - make -C packages*.lock package - name: Compile Package - - run: - command: ls -lahR .buildcache/packages - name: List packages - - save_cache: - key: package-552364a81ae60ec9e925bf03436153925235fa28-{{checksum ".buildcache/cache-keys/package-552364a81ae60ec9e925bf03436153925235fa28"}} - name: Save package cache - paths: - - .buildcache/packages/store - windows_amd64_package: - docker: - - image: docker.mirror.hashicorp.services/circleci/buildpack-deps - shell: /usr/bin/env bash -euo pipefail -c + - setup_remote_docker: + version: 19.03.12 + docker_layer_caching: false + - add_ssh_keys: + fingerprints: + - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 + - checkout: + path: . + - run: + command: make -C packages*.lock write-package-cache-key + name: Write package cache key + - restore_cache: + key: package-359562b465a81cb702a7b863940395b5261ed70f-{{checksum ".buildcache/cache-keys/package-359562b465a81cb702a7b863940395b5261ed70f"}} + name: Restore package cache + - run: + command: |2 + + 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 cache status + - run: + command: make -C packages*.lock write-builder-cache-keys + name: Write builder layer cache keys + - restore_cache: + key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} + keys: + - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} + - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} + - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} + - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} + - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} + - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} + - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} + - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} + - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} + name: 'Restore Builder Image Cache: copy-source' + - run: + command: make -C packages*.lock load-builder-cache + name: Load whatever builder cache we have (if any) into the Docker daemon + no_output_timeout: 30m + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." + fi + + make -C packages*.lock package + name: Compile Package + - run: + command: ls -lahR .buildcache/packages + name: List packages + - save_cache: + paths: + - .buildcache/packages/store + key: package-359562b465a81cb702a7b863940395b5261ed70f-{{checksum ".buildcache/cache-keys/package-359562b465a81cb702a7b863940395b5261ed70f"}} + name: Save package cache environment: - - AUTO_INSTALL_TOOLS: 'YES' - - BUILDKIT_PROGRESS: plain - - PRODUCT_REVISION: '' - - PACKAGE_SPEC_ID: 38343475d76c802dd78fa4bee1dfb98cf2935923 - steps: - - setup_remote_docker: - docker_layer_caching: false - version: 19.03.12 - - add_ssh_keys: - fingerprints: - - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 - - checkout: - path: . - - run: - command: make -C packages*.lock write-package-cache-key - name: Write package cache key - - restore_cache: - key: package-38343475d76c802dd78fa4bee1dfb98cf2935923-{{checksum ".buildcache/cache-keys/package-38343475d76c802dd78fa4bee1dfb98cf2935923"}} - name: Restore package cache - - run: - command: |2 - - 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 cache status - - run: - command: make -C packages*.lock write-builder-cache-keys - name: Write builder layer cache keys - - restore_cache: - key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} - keys: - - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} - - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} - - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} - - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} - - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} - - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} - - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} - - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} - - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} - name: 'Restore Builder Image Cache: copy-source' - - run: - command: make -C packages*.lock load-builder-cache - name: Load whatever builder cache we have (if any) into the Docker daemon - no_output_timeout: 30m - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." - fi - - make -C packages*.lock package - name: Compile Package - - run: - command: ls -lahR .buildcache/packages - name: List packages - - save_cache: - key: package-38343475d76c802dd78fa4bee1dfb98cf2935923-{{checksum ".buildcache/cache-keys/package-38343475d76c802dd78fa4bee1dfb98cf2935923"}} - name: Save package cache - paths: - - .buildcache/packages/store - pre-flight-checks: - machine: true - shell: /usr/bin/env bash -euo pipefail -c - working_directory: /go/src/github.com/hashicorp/vault + PACKAGE_SPEC_ID: 359562b465a81cb702a7b863940395b5261ed70f + windows_386_package: + executor: builder 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 "export GOPROXY=https://proxy.golang.org,direct" >> "$BASH_ENV" - echo "export GOPRIVATE=github.com/hashicorp/*" >> "$BASH_ENV" - - echo "$ go version" - go version - name: Setup Go - working_directory: ~/ - - checkout - - run: - command: | - export CCI_PATH=/tmp/circleci-cli/$CIRCLECI_CLI_VERSION - mkdir -p $CCI_PATH - NAME=circleci-cli_${CIRCLECI_CLI_VERSION}_${ARCH} - URL=$BASE/v${CIRCLECI_CLI_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 - - add_ssh_keys: - fingerprints: - - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 - - run: - command: | - git config --global url."git@github.com:".insteadOf https://github.com/ - - restore_cache: - keys: - - v1.3-{{checksum "go.sum"}}-{{checksum "sdk/go.sum"}}-{{checksum "api/go.sum"}} - - v1.3-{{checksum "go.sum"}}-{{checksum "sdk/go.sum"}} - - v1.3-{{checksum "go.sum"}} - name: Restore closest matching go modules cache - - run: - command: | - # go list ./... forces downloading some additional versions of modules that 'go mod - # download' misses. We need this because we make use of go list itself during - # code generation in later builds that rely on this module cache. - go list ./... - go mod download -json - ( cd sdk && go mod download -json; ) - ( cd api && go mod download -json; ) - name: go mod download - - run: - command: | - git --no-pager diff --exit-code || { - echo "ERROR: Files modified by go mod download, see above." - exit 1 - } - name: Verify downloading modules did not modify any files - - save_cache: - key: v1.3-{{checksum "go.sum"}}-{{checksum "sdk/go.sum"}}-{{checksum "api/go.sum"}} - name: Save go modules cache - paths: - - /go/pkg/mod + - setup_remote_docker: + version: 19.03.12 + docker_layer_caching: false + - add_ssh_keys: + fingerprints: + - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 + - checkout: + path: . + - run: + command: make -C packages*.lock write-package-cache-key + name: Write package cache key + - restore_cache: + key: package-5300f05b8cb6c55f464cf5e973f5b22625c3ce02-{{checksum ".buildcache/cache-keys/package-5300f05b8cb6c55f464cf5e973f5b22625c3ce02"}} + name: Restore package cache + - run: + command: |2 + + 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 cache status + - run: + command: make -C packages*.lock write-builder-cache-keys + name: Write builder layer cache keys + - restore_cache: + key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} + keys: + - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} + - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} + - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} + - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} + - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} + - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} + - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} + - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} + - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} + name: 'Restore Builder Image Cache: copy-source' + - run: + command: make -C packages*.lock load-builder-cache + name: Load whatever builder cache we have (if any) into the Docker daemon + no_output_timeout: 30m + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." + fi + + make -C packages*.lock package + name: Compile Package + - run: + command: ls -lahR .buildcache/packages + name: List packages + - save_cache: + paths: + - .buildcache/packages/store + key: package-5300f05b8cb6c55f464cf5e973f5b22625c3ce02-{{checksum ".buildcache/cache-keys/package-5300f05b8cb6c55f464cf5e973f5b22625c3ce02"}} + name: Save package cache environment: - - CIRCLECI_CLI_VERSION: 0.1.5546 - - GO_TAGS: '' - - GO_VERSION: 1.16.7 - - GOTESTSUM_VERSION: 0.5.2 - test-go-race-remote-docker: - docker: - - image: docker.mirror.hashicorp.services/circleci/golang:1.16.7-buster - resource_class: medium - working_directory: /go/src/github.com/hashicorp/vault - parallelism: 8 + PACKAGE_SPEC_ID: 5300f05b8cb6c55f464cf5e973f5b22625c3ce02 + windows_amd64_package: + executor: builder 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 + - setup_remote_docker: + version: 19.03.12 + docker_layer_caching: false + - add_ssh_keys: + fingerprints: + - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 + - checkout: + path: . + - run: + command: make -C packages*.lock write-package-cache-key + name: Write package cache key + - restore_cache: + key: package-38343475d76c802dd78fa4bee1dfb98cf2935923-{{checksum ".buildcache/cache-keys/package-38343475d76c802dd78fa4bee1dfb98cf2935923"}} + name: Restore package cache + - run: + command: |2 + + 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 - } - # exit with success either way - exit 0 - name: Check branch name - working_directory: ~/ - - checkout - - setup_remote_docker: - docker_layer_caching: true - version: 18.09.3 - - add_ssh_keys: - fingerprints: - - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 - - run: - command: | - git config --global url."git@github.com:".insteadOf https://github.com/ - - 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" }} - - restore_cache: - keys: - - v1.3-{{checksum "go.sum"}}-{{checksum "sdk/go.sum"}}-{{checksum "api/go.sum"}} - name: Restore exact go modules cache - - run: - command: | - set -x - - EXTRA_TAGS= - case "-race" in - *-race*) export VAULT_CI_GO_TEST_RACE=1;; - *) EXTRA_TAGS=deadlock;; - 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" - - USE_DOCKER=0 - USE_DOCKER=1 - - # 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. - if [ $USE_DOCKER == 1 ]; then - 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) - else - 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) - fi - - # After running tests split step, we are now running the following steps - # in multiple different containers, each getting a different subset of - # the test packages in their package_names variable. Each container - # has its own remote docker VM. - - make prep - mkdir -p test-results/go-test - - # We don't want VAULT_LICENSE set when running Go tests, because that's - # not what developers have in their environments and it could break some - # tests; it would be like setting VAULT_TOKEN. However some non-Go - # CI commands, like the UI tests, shouldn't have to worry about licensing. - # So we set VAULT_LICENSE in CI, and here we unset it. Instead of - # VAULT_LICENSE, we populate VAULT_LICENSE_CI, so that tests which want - # an externally supplied license can opt-in to using it. - export VAULT_LICENSE_CI="$VAULT_LICENSE" - VAULT_LICENSE= - - # Create a docker network for our testcontainer - if [ $USE_DOCKER == 1 ]; then - # Despite the fact that we're using a circleci image (thus getting the - # version they chose for the docker cli) and that we're specifying a - # docker version to use for the remote docker instances, we occasionally - # see "client version too new, max supported version 1.39" errors for - # reasons unclear. - export DOCKER_API_VERSION=1.39 - - export TEST_DOCKER_NETWORK_ID=$(docker network list -q -f 'name=vaulttest') - if [ -z $TEST_DOCKER_NETWORK_ID ]; then - TEST_DOCKER_NETWORK_ID=$(docker network create vaulttest) + name: Check cache status + - run: + command: make -C packages*.lock write-builder-cache-keys + name: Write builder layer cache keys + - restore_cache: + key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} + keys: + - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} + - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} + - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} + - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} + - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} + - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} + - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} + - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} + - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} + name: 'Restore Builder Image Cache: copy-source' + - run: + command: make -C packages*.lock load-builder-cache + name: Load whatever builder cache we have (if any) into the Docker daemon + no_output_timeout: 30m + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." fi - - - # Start a docker testcontainer to run the tests in - docker run -d \ - -e TEST_DOCKER_NETWORK_ID \ - -e GOPRIVATE \ - -e DOCKER_CERT_PATH \ - -e DOCKER_HOST \ - -e DOCKER_MACHINE_NAME \ - -e DOCKER_TLS_VERIFY \ - -e NO_PROXY \ - -e VAULT_TEST_LOG_DIR=/tmp/testlogs \ - --network vaulttest --name \ - testcontainer docker.mirror.hashicorp.services/circleci/golang:1.16.7-buster \ - tail -f /dev/null - - # Run tests - test -d /tmp/go-cache && docker cp /tmp/go-cache testcontainer:/tmp/gocache - docker exec testcontainer sh -c 'mkdir -p /go/src/github.com/hashicorp/vault' - docker cp . testcontainer:/go/src/github.com/hashicorp/vault/ - docker cp $DOCKER_CERT_PATH/ testcontainer:$DOCKER_CERT_PATH - - # Copy the downloaded modules inside the container. - docker exec testcontainer sh -c 'mkdir -p /go/pkg' - docker cp "$(go env GOPATH)/pkg/mod" testcontainer:/go/pkg/mod - - docker exec -w /go/src/github.com/hashicorp/vault/ \ - -e CIRCLECI -e VAULT_CI_GO_TEST_RACE \ - -e GOCACHE=/tmp/gocache \ - -e GO_TAGS \ - -e GOPROXY="off" \ - -e VAULT_LICENSE_CI \ - -e GOARCH=amd64 \ - testcontainer \ - gotestsum --format=short-verbose \ - --junitfile test-results/go-test/results.xml \ - --jsonfile test-results/go-test/results.json \ - -- \ - -tags "${GO_TAGS} ${EXTRA_TAGS}" \ - -timeout=60m \ - -parallel=20 \ - -race \ - ${package_names} - else - GOARCH=amd64 \ - GOCACHE=/tmp/go-cache \ - gotestsum --format=short-verbose \ - --junitfile test-results/go-test/results.xml \ - --jsonfile test-results/go-test/results.json \ - -- \ - -tags "${GO_TAGS} ${EXTRA_TAGS}" \ - -timeout=60m \ - -parallel=20 \ - -race \ - ${package_names} - fi - environment: - GOPRIVATE: github.com/hashicorp/* - name: Run Go tests - no_output_timeout: 60m - - run: - command: | - docker cp testcontainer:/go/src/github.com/hashicorp/vault/test-results . - docker cp testcontainer:/tmp/gocache /tmp/go-cache - name: Copy test results - when: always - - store_artifacts: - path: test-results - - store_test_results: - path: test-results - - store_artifacts: - path: /tmp/testlogs + make -C packages*.lock package + name: Compile Package + - run: + command: ls -lahR .buildcache/packages + name: List packages + - save_cache: + paths: + - .buildcache/packages/store + key: package-38343475d76c802dd78fa4bee1dfb98cf2935923-{{checksum ".buildcache/cache-keys/package-38343475d76c802dd78fa4bee1dfb98cf2935923"}} + name: Save package cache environment: - - CIRCLECI_CLI_VERSION: 0.1.5546 - - GO_TAGS: '' + PACKAGE_SPEC_ID: 38343475d76c802dd78fa4bee1dfb98cf2935923 workflows: - build-34b4dd57b4a937e7: - jobs: - - build-common-layers - - darwin_amd64_package: - requires: - - build-common-layers - - bundle-releases: - requires: - - darwin_amd64_package - - darwin_arm64_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 - - darwin_arm64_package: - requires: - - build-common-layers - - freebsd_386_package: - requires: - - build-common-layers - - freebsd_amd64_package: - requires: - - build-common-layers - - freebsd_arm_package: - requires: - - build-common-layers - - linux_386_package: - requires: - - build-common-layers - - linux_amd64_package: - requires: - - build-common-layers - - linux_arm_package: - requires: - - build-common-layers - - linux_arm64_package: - requires: - - build-common-layers - - netbsd_386_package: - requires: - - build-common-layers - - netbsd_amd64_package: - requires: - - build-common-layers - - openbsd_386_package: - requires: - - build-common-layers - - openbsd_amd64_package: - requires: - - build-common-layers - - solaris_amd64_package: - requires: - - build-common-layers - - windows_386_package: - requires: - - build-common-layers - - windows_amd64_package: - requires: - - build-common-layers - ci: + build-4cdca257789ddb0a: 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: - - pre-flight-checks - - test-go-remote-docker: - requires: - - pre-flight-checks - - test-go-race: - filters: - branches: - ignore: - - /^docs\/.*/ - - /^ui\/.*/ - requires: - - pre-flight-checks - - test-go-race-remote-docker: - filters: - branches: - ignore: - - /^docs\/.*/ - - /^ui\/.*/ - requires: - - pre-flight-checks - - website-docker-image: - filters: - branches: - only: - - main - context: vault-docs - - algolia-index: - filters: - branches: - only: - - stable-website - context: vault-docs - version: 2 + - build-common-layers: {} + - darwin_amd64_package: + requires: + - build-common-layers + - bundle-releases: + requires: + - darwin_amd64_package + - darwin_arm64_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 + - darwin_arm64_package: + requires: + - build-common-layers + - freebsd_386_package: + requires: + - build-common-layers + - freebsd_amd64_package: + requires: + - build-common-layers + - freebsd_arm_package: + requires: + - build-common-layers + - linux_386_package: + requires: + - build-common-layers + - linux_amd64_package: + requires: + - build-common-layers + - linux_arm_package: + requires: + - build-common-layers + - linux_arm64_package: + requires: + - build-common-layers + - netbsd_386_package: + requires: + - build-common-layers + - netbsd_amd64_package: + requires: + - build-common-layers + - openbsd_386_package: + requires: + - build-common-layers + - openbsd_amd64_package: + requires: + - build-common-layers + - solaris_amd64_package: + requires: + - build-common-layers + - windows_386_package: + requires: + - build-common-layers + - windows_amd64_package: + requires: + - build-common-layers diff --git a/packages-oss.lock/pkgs.yml b/packages-oss.lock/pkgs.yml index b72a250d71308..9c99e852359ed 100644 --- a/packages-oss.lock/pkgs.yml +++ b/packages-oss.lock/pkgs.yml @@ -2,7 +2,7 @@ # WARNING: Do not EDIT or MERGE this file, it is generated by packagespec. # *** lockid: 34b4dd57b4a937e7 -packagespec-version: 0.2.7 +packagespec-version: 0.2.8 cache-version: 10 packages: - packagespecid: 3ebae663db95ad337451948afba2dd8e9644c1de From 221554efd01339848f1e272f10eca7c24b7b33b5 Mon Sep 17 00:00:00 2001 From: Sam Salisbury Date: Wed, 25 Aug 2021 13:14:26 +0100 Subject: [PATCH 2/2] make packages --- .circleci/config.yml | 4100 +++++++++++++++++++++++++++--------------- 1 file changed, 2604 insertions(+), 1496 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c30d37081db6f..48fb25dd14cee 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,1551 +1,2659 @@ -version: "2.1" -executors: - builder: +### *** +### 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: docker.mirror.hashicorp.services/circleci/buildpack-deps + - image: docker.mirror.hashicorp.services/circleci/buildpack-deps shell: /usr/bin/env bash -euo pipefail -c + steps: + - checkout: + path: . + - run: + command: make -C packages*.lock write-all-package-cache-keys + name: Write all package cache keys + - run: + command: mkdir -p .buildcache && echo "*" > .buildcache/.gitignore + name: Ignore .buildcache + - restore_cache: + key: package-3ebae663db95ad337451948afba2dd8e9644c1de-{{checksum ".buildcache/cache-keys/package-3ebae663db95ad337451948afba2dd8e9644c1de"}} + name: Restore package cache + - restore_cache: + key: package-70290ee80c00ff40a9baf8e2800a2778dd11bc34-{{checksum ".buildcache/cache-keys/package-70290ee80c00ff40a9baf8e2800a2778dd11bc34"}} + name: Restore package cache + - restore_cache: + key: package-73e5929eed187b34bc51c84dc9e68cfe4e6452e0-{{checksum ".buildcache/cache-keys/package-73e5929eed187b34bc51c84dc9e68cfe4e6452e0"}} + name: Restore package cache + - restore_cache: + key: package-2d48df616168bf8ae1cdbfce10f31b3c73759ef9-{{checksum ".buildcache/cache-keys/package-2d48df616168bf8ae1cdbfce10f31b3c73759ef9"}} + name: Restore package cache + - restore_cache: + key: package-552364a81ae60ec9e925bf03436153925235fa28-{{checksum ".buildcache/cache-keys/package-552364a81ae60ec9e925bf03436153925235fa28"}} + name: Restore package cache + - restore_cache: + key: package-0cfa14d59a028968575a92d27d1d41352eb6ce63-{{checksum ".buildcache/cache-keys/package-0cfa14d59a028968575a92d27d1d41352eb6ce63"}} + name: Restore package cache + - restore_cache: + key: package-86eb712fba163c80690185fe24c22b178dbd17f8-{{checksum ".buildcache/cache-keys/package-86eb712fba163c80690185fe24c22b178dbd17f8"}} + name: Restore package cache + - restore_cache: + key: package-bc0d94feb5922f5c16715af7cc85b2060a87ddc7-{{checksum ".buildcache/cache-keys/package-bc0d94feb5922f5c16715af7cc85b2060a87ddc7"}} + name: Restore package cache + - restore_cache: + key: package-d608f9c10443d43d15a161559d07d812a24dffd4-{{checksum ".buildcache/cache-keys/package-d608f9c10443d43d15a161559d07d812a24dffd4"}} + name: Restore package cache + - restore_cache: + key: package-113e2a29f4786b4f0b53955ceb8dcf6ba42a38c2-{{checksum ".buildcache/cache-keys/package-113e2a29f4786b4f0b53955ceb8dcf6ba42a38c2"}} + name: Restore package cache + - restore_cache: + key: package-c6ab5585544823405f0a5a44616458612459c3b2-{{checksum ".buildcache/cache-keys/package-c6ab5585544823405f0a5a44616458612459c3b2"}} + name: Restore package cache + - restore_cache: + key: package-15e0bf30e04ca7f3808ca5a0d872d99ec30fb2e7-{{checksum ".buildcache/cache-keys/package-15e0bf30e04ca7f3808ca5a0d872d99ec30fb2e7"}} + name: Restore package cache + - restore_cache: + key: package-96216af336fd2ce49b883ccd837f4cbae27fd647-{{checksum ".buildcache/cache-keys/package-96216af336fd2ce49b883ccd837f4cbae27fd647"}} + name: Restore package cache + - restore_cache: + key: package-359562b465a81cb702a7b863940395b5261ed70f-{{checksum ".buildcache/cache-keys/package-359562b465a81cb702a7b863940395b5261ed70f"}} + name: Restore package cache + - restore_cache: + key: package-5300f05b8cb6c55f464cf5e973f5b22625c3ce02-{{checksum ".buildcache/cache-keys/package-5300f05b8cb6c55f464cf5e973f5b22625c3ce02"}} + name: Restore package cache + - restore_cache: + key: package-38343475d76c802dd78fa4bee1dfb98cf2935923-{{checksum ".buildcache/cache-keys/package-38343475d76c802dd78fa4bee1dfb98cf2935923"}} + name: Restore package cache + - run: + command: make package-meta-all + name: Write Package Metadata + - run: + command: make aliases + name: Write package aliases + - run: + command: ls -lahR .buildcache + name: List Build Cache + - run: + command: cp packages*.lock/pkgs.yml lockfile-34b4dd57b4a937e7.yml + name: Update Lockfile Name + - run: + command: tar -czf packages-34b4dd57b4a937e7.tar.gz .buildcache/packages lockfile-34b4dd57b4a937e7.yml + name: Create Raw Package Tarball + - run: + command: tar -czf meta-34b4dd57b4a937e7.tar.gz .buildcache/packages/store/*.json lockfile-34b4dd57b4a937e7.yml + name: Create Metadata Tarball + - store_artifacts: + path: lockfile-34b4dd57b4a937e7.yml + - store_artifacts: + path: packages-34b4dd57b4a937e7.tar.gz + - store_artifacts: + path: meta-34b4dd57b4a937e7.tar.gz + - store_artifacts: + path: .buildcache/packages environment: - AUTO_INSTALL_TOOLS: "YES" - BUILDKIT_PROGRESS: plain - PRODUCT_REVISION: "" - builder-machine: - resource_class: xlarge + - AUTO_INSTALL_TOOLS: 'YES' + - BUILDKIT_PROGRESS: plain + - PRODUCT_REVISION: '' + darwin_amd64_package: + docker: + - image: docker.mirror.hashicorp.services/circleci/buildpack-deps + shell: /usr/bin/env bash -euo pipefail -c + environment: + - AUTO_INSTALL_TOOLS: 'YES' + - BUILDKIT_PROGRESS: plain + - PRODUCT_REVISION: '' + - PACKAGE_SPEC_ID: 3ebae663db95ad337451948afba2dd8e9644c1de + steps: + - setup_remote_docker: + docker_layer_caching: false + version: 19.03.12 + - add_ssh_keys: + fingerprints: + - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 + - checkout: + path: . + - run: + command: make -C packages*.lock write-package-cache-key + name: Write package cache key + - restore_cache: + key: package-3ebae663db95ad337451948afba2dd8e9644c1de-{{checksum ".buildcache/cache-keys/package-3ebae663db95ad337451948afba2dd8e9644c1de"}} + name: Restore package cache + - run: + command: |2 + + 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 cache status + - run: + command: make -C packages*.lock write-builder-cache-keys + name: Write builder layer cache keys + - restore_cache: + key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} + keys: + - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} + - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} + - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} + - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} + - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} + - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} + - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} + - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} + - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} + name: 'Restore Builder Image Cache: copy-source' + - run: + command: make -C packages*.lock load-builder-cache + name: Load whatever builder cache we have (if any) into the Docker daemon + no_output_timeout: 30m + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." + fi + + make -C packages*.lock package + name: Compile Package + - run: + command: ls -lahR .buildcache/packages + name: List packages + - save_cache: + key: package-3ebae663db95ad337451948afba2dd8e9644c1de-{{checksum ".buildcache/cache-keys/package-3ebae663db95ad337451948afba2dd8e9644c1de"}} + name: Save package cache + paths: + - .buildcache/packages/store + darwin_arm64_package: + docker: + - image: docker.mirror.hashicorp.services/circleci/buildpack-deps + shell: /usr/bin/env bash -euo pipefail -c + environment: + - AUTO_INSTALL_TOOLS: 'YES' + - BUILDKIT_PROGRESS: plain + - PRODUCT_REVISION: '' + - PACKAGE_SPEC_ID: 70290ee80c00ff40a9baf8e2800a2778dd11bc34 + steps: + - setup_remote_docker: + docker_layer_caching: false + version: 19.03.12 + - add_ssh_keys: + fingerprints: + - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 + - checkout: + path: . + - run: + command: make -C packages*.lock write-package-cache-key + name: Write package cache key + - restore_cache: + key: package-70290ee80c00ff40a9baf8e2800a2778dd11bc34-{{checksum ".buildcache/cache-keys/package-70290ee80c00ff40a9baf8e2800a2778dd11bc34"}} + name: Restore package cache + - run: + command: |2 + + 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 cache status + - run: + command: make -C packages*.lock write-builder-cache-keys + name: Write builder layer cache keys + - restore_cache: + key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} + keys: + - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} + - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} + - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} + - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} + - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} + - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} + - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} + - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} + - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} + name: 'Restore Builder Image Cache: copy-source' + - run: + command: make -C packages*.lock load-builder-cache + name: Load whatever builder cache we have (if any) into the Docker daemon + no_output_timeout: 30m + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." + fi + + make -C packages*.lock package + name: Compile Package + - run: + command: ls -lahR .buildcache/packages + name: List packages + - save_cache: + key: package-70290ee80c00ff40a9baf8e2800a2778dd11bc34-{{checksum ".buildcache/cache-keys/package-70290ee80c00ff40a9baf8e2800a2778dd11bc34"}} + name: Save package cache + paths: + - .buildcache/packages/store + windows_386_package: + docker: + - image: docker.mirror.hashicorp.services/circleci/buildpack-deps + shell: /usr/bin/env bash -euo pipefail -c + environment: + - AUTO_INSTALL_TOOLS: 'YES' + - BUILDKIT_PROGRESS: plain + - PRODUCT_REVISION: '' + - PACKAGE_SPEC_ID: 5300f05b8cb6c55f464cf5e973f5b22625c3ce02 + steps: + - setup_remote_docker: + docker_layer_caching: false + version: 19.03.12 + - add_ssh_keys: + fingerprints: + - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 + - checkout: + path: . + - run: + command: make -C packages*.lock write-package-cache-key + name: Write package cache key + - restore_cache: + key: package-5300f05b8cb6c55f464cf5e973f5b22625c3ce02-{{checksum ".buildcache/cache-keys/package-5300f05b8cb6c55f464cf5e973f5b22625c3ce02"}} + name: Restore package cache + - run: + command: |2 + + 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 cache status + - run: + command: make -C packages*.lock write-builder-cache-keys + name: Write builder layer cache keys + - restore_cache: + key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} + keys: + - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} + - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} + - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} + - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} + - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} + - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} + - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} + - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} + - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} + name: 'Restore Builder Image Cache: copy-source' + - run: + command: make -C packages*.lock load-builder-cache + name: Load whatever builder cache we have (if any) into the Docker daemon + no_output_timeout: 30m + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." + fi + + make -C packages*.lock package + name: Compile Package + - run: + command: ls -lahR .buildcache/packages + name: List packages + - save_cache: + key: package-5300f05b8cb6c55f464cf5e973f5b22625c3ce02-{{checksum ".buildcache/cache-keys/package-5300f05b8cb6c55f464cf5e973f5b22625c3ce02"}} + name: Save package cache + paths: + - .buildcache/packages/store + install-ui-dependencies: + docker: + - image: docker.mirror.hashicorp.services/node:14-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" }} + name: Restore yarn cache + - run: + command: | + cd ui + yarn install + npm rebuild node-sass + name: Install UI dependencies + - save_cache: + key: yarn-lock-v6-{{ checksum "ui/yarn.lock" }} + name: Save yarn cache + paths: + - ui/node_modules + build-common-layers: machine: image: ubuntu-1604:202007-01 + resource_class: xlarge shell: /usr/bin/env bash -euo pipefail -c + steps: + - add_ssh_keys: + fingerprints: + - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 + - checkout: + path: . + - run: + command: make -C packages*.lock write-builder-cache-keys + name: Write builder layer cache keys + - restore_cache: + key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} + keys: + - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} + - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} + - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} + - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} + - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} + - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} + - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} + - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} + - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} + name: 'Restore Layer Cache: copy-source' + - run: + command: LAYER_SPEC_ID=09-copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77 make -C packages*.lock load-builder-cache + name: Load whatever builder cache we have (if any) into the Docker daemon + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." + fi + + make -f packages*.lock/layer.mk 00-base-c6cdf1b224722d2520e082320f2a71875913247c-image + name: Build base layer + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." + fi + + make -f packages*.lock/layer.mk 01-install-go-8856aed7b0bd773b4539b957c157d21ff7b05758-image + name: Build install-go layer + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." + fi + + make -f packages*.lock/layer.mk 02-install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485-image + name: Build install-go-tools layer + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." + fi + + make -f packages*.lock/layer.mk 03-set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173-image + name: Build set-workdir layer + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." + fi + + make -f packages*.lock/layer.mk 04-install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564-image + name: Build install-yarn layer + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." + fi + + make -f packages*.lock/layer.mk 05-ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf-image + name: Build ui-dependencies layer + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." + fi + + make -f packages*.lock/layer.mk 06-build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0-image + name: Build build-ui layer + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." + fi + + make -f packages*.lock/layer.mk 07-build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8-image + name: Build build-static-assets layer + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." + fi + + make -f packages*.lock/layer.mk 08-go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084-image + name: Build go-modules layer + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." + fi + + make -f packages*.lock/layer.mk 09-copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77-image + name: Build copy-source layer + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." + fi + + make -f packages*.lock/layer.mk 09-copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77-save + name: Build copy-source layer + - save_cache: + key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} + name: 'Save Layer Cache: copy-source' + paths: + - .buildcache/archives/09-copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77.tar.gz environment: - AUTO_INSTALL_TOOLS: "YES" - BUILDKIT_PROGRESS: plain - PRODUCT_REVISION: "" -jobs: - build-common-layers: - executor: builder-machine + - AUTO_INSTALL_TOOLS: 'YES' + - BUILDKIT_PROGRESS: plain + - PRODUCT_REVISION: '' + linux_arm64_package: + docker: + - image: docker.mirror.hashicorp.services/circleci/buildpack-deps + shell: /usr/bin/env bash -euo pipefail -c + environment: + - AUTO_INSTALL_TOOLS: 'YES' + - BUILDKIT_PROGRESS: plain + - PRODUCT_REVISION: '' + - PACKAGE_SPEC_ID: d608f9c10443d43d15a161559d07d812a24dffd4 steps: - - add_ssh_keys: - fingerprints: - - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 - - checkout: - path: . - - run: - command: make -C packages*.lock write-builder-cache-keys - name: Write builder layer cache keys - - restore_cache: - key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} - keys: - - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} - - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} - - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} - - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} - - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} - - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} - - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} - - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} - - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} - name: 'Restore Layer Cache: copy-source' - - run: - command: LAYER_SPEC_ID=09-copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77 make -C packages*.lock load-builder-cache - name: Load whatever builder cache we have (if any) into the Docker daemon - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." - fi - - make -f packages*.lock/layer.mk 00-base-c6cdf1b224722d2520e082320f2a71875913247c-image - name: Build base layer - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." - fi - - make -f packages*.lock/layer.mk 01-install-go-8856aed7b0bd773b4539b957c157d21ff7b05758-image - name: Build install-go layer - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." - fi - - make -f packages*.lock/layer.mk 02-install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485-image - name: Build install-go-tools layer - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." - fi - - make -f packages*.lock/layer.mk 03-set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173-image - name: Build set-workdir layer - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." - fi - - make -f packages*.lock/layer.mk 04-install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564-image - name: Build install-yarn layer - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." - fi - - make -f packages*.lock/layer.mk 05-ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf-image - name: Build ui-dependencies layer - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." - fi - - make -f packages*.lock/layer.mk 06-build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0-image - name: Build build-ui layer - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." - fi - - make -f packages*.lock/layer.mk 07-build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8-image - name: Build build-static-assets layer - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." - fi - - make -f packages*.lock/layer.mk 08-go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084-image - name: Build go-modules layer - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." - fi - - make -f packages*.lock/layer.mk 09-copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77-image - name: Build copy-source layer - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." - fi - - make -f packages*.lock/layer.mk 09-copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77-save - name: Build copy-source layer - - save_cache: - paths: - - .buildcache/archives/09-copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77.tar.gz - key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} - name: 'Save Layer Cache: copy-source' - bundle-releases: - executor: builder + - setup_remote_docker: + docker_layer_caching: false + version: 19.03.12 + - add_ssh_keys: + fingerprints: + - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 + - checkout: + path: . + - run: + command: make -C packages*.lock write-package-cache-key + name: Write package cache key + - restore_cache: + key: package-d608f9c10443d43d15a161559d07d812a24dffd4-{{checksum ".buildcache/cache-keys/package-d608f9c10443d43d15a161559d07d812a24dffd4"}} + name: Restore package cache + - run: + command: |2 + + 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 cache status + - run: + command: make -C packages*.lock write-builder-cache-keys + name: Write builder layer cache keys + - restore_cache: + key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} + keys: + - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} + - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} + - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} + - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} + - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} + - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} + - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} + - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} + - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} + name: 'Restore Builder Image Cache: copy-source' + - run: + command: make -C packages*.lock load-builder-cache + name: Load whatever builder cache we have (if any) into the Docker daemon + no_output_timeout: 30m + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." + fi + + make -C packages*.lock package + name: Compile Package + - run: + command: ls -lahR .buildcache/packages + name: List packages + - save_cache: + key: package-d608f9c10443d43d15a161559d07d812a24dffd4-{{checksum ".buildcache/cache-keys/package-d608f9c10443d43d15a161559d07d812a24dffd4"}} + name: Save package cache + paths: + - .buildcache/packages/store + test-ui: + docker: + - image: docker.mirror.hashicorp.services/node:14-buster + shell: /usr/bin/env bash -euo pipefail -c + working_directory: /go/src/github.com/hashicorp/vault + resource_class: xlarge steps: - - checkout: - path: . - - run: - command: make -C packages*.lock write-all-package-cache-keys - name: Write all package cache keys - - run: - command: mkdir -p .buildcache && echo "*" > .buildcache/.gitignore - name: Ignore .buildcache - - restore_cache: - key: package-3ebae663db95ad337451948afba2dd8e9644c1de-{{checksum ".buildcache/cache-keys/package-3ebae663db95ad337451948afba2dd8e9644c1de"}} - name: Restore package cache - - restore_cache: - key: package-70290ee80c00ff40a9baf8e2800a2778dd11bc34-{{checksum ".buildcache/cache-keys/package-70290ee80c00ff40a9baf8e2800a2778dd11bc34"}} - name: Restore package cache - - restore_cache: - key: package-73e5929eed187b34bc51c84dc9e68cfe4e6452e0-{{checksum ".buildcache/cache-keys/package-73e5929eed187b34bc51c84dc9e68cfe4e6452e0"}} - name: Restore package cache - - restore_cache: - key: package-2d48df616168bf8ae1cdbfce10f31b3c73759ef9-{{checksum ".buildcache/cache-keys/package-2d48df616168bf8ae1cdbfce10f31b3c73759ef9"}} - name: Restore package cache - - restore_cache: - key: package-552364a81ae60ec9e925bf03436153925235fa28-{{checksum ".buildcache/cache-keys/package-552364a81ae60ec9e925bf03436153925235fa28"}} - name: Restore package cache - - restore_cache: - key: package-0cfa14d59a028968575a92d27d1d41352eb6ce63-{{checksum ".buildcache/cache-keys/package-0cfa14d59a028968575a92d27d1d41352eb6ce63"}} - name: Restore package cache - - restore_cache: - key: package-86eb712fba163c80690185fe24c22b178dbd17f8-{{checksum ".buildcache/cache-keys/package-86eb712fba163c80690185fe24c22b178dbd17f8"}} - name: Restore package cache - - restore_cache: - key: package-bc0d94feb5922f5c16715af7cc85b2060a87ddc7-{{checksum ".buildcache/cache-keys/package-bc0d94feb5922f5c16715af7cc85b2060a87ddc7"}} - name: Restore package cache - - restore_cache: - key: package-d608f9c10443d43d15a161559d07d812a24dffd4-{{checksum ".buildcache/cache-keys/package-d608f9c10443d43d15a161559d07d812a24dffd4"}} - name: Restore package cache - - restore_cache: - key: package-113e2a29f4786b4f0b53955ceb8dcf6ba42a38c2-{{checksum ".buildcache/cache-keys/package-113e2a29f4786b4f0b53955ceb8dcf6ba42a38c2"}} - name: Restore package cache - - restore_cache: - key: package-c6ab5585544823405f0a5a44616458612459c3b2-{{checksum ".buildcache/cache-keys/package-c6ab5585544823405f0a5a44616458612459c3b2"}} - name: Restore package cache - - restore_cache: - key: package-15e0bf30e04ca7f3808ca5a0d872d99ec30fb2e7-{{checksum ".buildcache/cache-keys/package-15e0bf30e04ca7f3808ca5a0d872d99ec30fb2e7"}} - name: Restore package cache - - restore_cache: - key: package-96216af336fd2ce49b883ccd837f4cbae27fd647-{{checksum ".buildcache/cache-keys/package-96216af336fd2ce49b883ccd837f4cbae27fd647"}} - name: Restore package cache - - restore_cache: - key: package-359562b465a81cb702a7b863940395b5261ed70f-{{checksum ".buildcache/cache-keys/package-359562b465a81cb702a7b863940395b5261ed70f"}} - name: Restore package cache - - restore_cache: - key: package-5300f05b8cb6c55f464cf5e973f5b22625c3ce02-{{checksum ".buildcache/cache-keys/package-5300f05b8cb6c55f464cf5e973f5b22625c3ce02"}} - name: Restore package cache - - restore_cache: - key: package-38343475d76c802dd78fa4bee1dfb98cf2935923-{{checksum ".buildcache/cache-keys/package-38343475d76c802dd78fa4bee1dfb98cf2935923"}} - name: Restore package cache - - run: - command: make package-meta-all - name: Write Package Metadata - - run: - command: make aliases - name: Write package aliases - - run: - command: ls -lahR .buildcache - name: List Build Cache - - run: - command: cp packages*.lock/pkgs.yml lockfile-4cdca257789ddb0a.yml - name: Update Lockfile Name - - run: - command: tar -czf packages-4cdca257789ddb0a.tar.gz .buildcache/packages lockfile-4cdca257789ddb0a.yml - name: Create Raw Package Tarball - - run: - command: tar -czf meta-4cdca257789ddb0a.tar.gz .buildcache/packages/store/*.json lockfile-4cdca257789ddb0a.yml - name: Create Metadata Tarball - - store_artifacts: - path: lockfile-4cdca257789ddb0a.yml - - store_artifacts: - path: packages-4cdca257789ddb0a.tar.gz - - store_artifacts: - path: meta-4cdca257789ddb0a.tar.gz - - store_artifacts: - path: .buildcache/packages - darwin_amd64_package: - executor: builder + - run: + command: | + case "$CIRCLE_BRANCH" in + main|ui/*|release/*|merge*) ;; + *) # If the branch being tested doesn't match one of the above patterns, + # we don't need to run test-ui and can abort the job. + circleci-agent step halt + ;; + esac + + # exit with success either way + exit 0 + name: Check branch name + working_directory: ~/ + - checkout + - restore_cache: + key: yarn-lock-v6-{{ checksum "ui/yarn.lock" }} + name: Restore yarn cache + - 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: docker.mirror.hashicorp.services/circleci/buildpack-deps + shell: /usr/bin/env bash -euo pipefail -c + environment: + - AUTO_INSTALL_TOOLS: 'YES' + - BUILDKIT_PROGRESS: plain + - PRODUCT_REVISION: '' + - PACKAGE_SPEC_ID: bc0d94feb5922f5c16715af7cc85b2060a87ddc7 steps: - - setup_remote_docker: - version: 19.03.12 - docker_layer_caching: false - - add_ssh_keys: - fingerprints: - - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 - - checkout: - path: . - - run: - command: make -C packages*.lock write-package-cache-key - name: Write package cache key - - restore_cache: - key: package-3ebae663db95ad337451948afba2dd8e9644c1de-{{checksum ".buildcache/cache-keys/package-3ebae663db95ad337451948afba2dd8e9644c1de"}} - name: Restore package cache - - run: - command: |2 - - 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 cache status - - run: - command: make -C packages*.lock write-builder-cache-keys - name: Write builder layer cache keys - - restore_cache: - key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} - keys: - - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} - - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} - - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} - - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} - - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} - - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} - - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} - - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} - - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} - name: 'Restore Builder Image Cache: copy-source' - - run: - command: make -C packages*.lock load-builder-cache - name: Load whatever builder cache we have (if any) into the Docker daemon - no_output_timeout: 30m - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." - fi - - make -C packages*.lock package - name: Compile Package - - run: - command: ls -lahR .buildcache/packages - name: List packages - - save_cache: - paths: - - .buildcache/packages/store - key: package-3ebae663db95ad337451948afba2dd8e9644c1de-{{checksum ".buildcache/cache-keys/package-3ebae663db95ad337451948afba2dd8e9644c1de"}} - name: Save package cache + - setup_remote_docker: + docker_layer_caching: false + version: 19.03.12 + - add_ssh_keys: + fingerprints: + - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 + - checkout: + path: . + - run: + command: make -C packages*.lock write-package-cache-key + name: Write package cache key + - restore_cache: + key: package-bc0d94feb5922f5c16715af7cc85b2060a87ddc7-{{checksum ".buildcache/cache-keys/package-bc0d94feb5922f5c16715af7cc85b2060a87ddc7"}} + name: Restore package cache + - run: + command: |2 + + 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 cache status + - run: + command: make -C packages*.lock write-builder-cache-keys + name: Write builder layer cache keys + - restore_cache: + key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} + keys: + - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} + - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} + - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} + - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} + - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} + - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} + - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} + - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} + - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} + name: 'Restore Builder Image Cache: copy-source' + - run: + command: make -C packages*.lock load-builder-cache + name: Load whatever builder cache we have (if any) into the Docker daemon + no_output_timeout: 30m + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." + fi + + make -C packages*.lock package + name: Compile Package + - run: + command: ls -lahR .buildcache/packages + name: List packages + - save_cache: + key: package-bc0d94feb5922f5c16715af7cc85b2060a87ddc7-{{checksum ".buildcache/cache-keys/package-bc0d94feb5922f5c16715af7cc85b2060a87ddc7"}} + name: Save package cache + paths: + - .buildcache/packages/store + test-ui-browserstack: + docker: + - image: docker.mirror.hashicorp.services/node:14-buster + shell: /usr/bin/env bash -euo pipefail -c + working_directory: /go/src/github.com/hashicorp/vault + resource_class: xlarge + steps: + - checkout + - restore_cache: + key: yarn-lock-v6-{{ checksum "ui/yarn.lock" }} + name: Restore yarn cache + - 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 + 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 "export GOPROXY=off" >> "$BASH_ENV" + echo "export GOPRIVATE=github.com/hashicorp/*" >> "$BASH_ENV" + + echo "$ go version" + go version + name: Setup Go + working_directory: ~/ + - checkout + - restore_cache: + keys: + - v1.3-{{checksum "go.sum"}}-{{checksum "sdk/go.sum"}}-{{checksum "api/go.sum"}} + name: Restore exact go modules cache + - 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: - PACKAGE_SPEC_ID: 3ebae663db95ad337451948afba2dd8e9644c1de - darwin_arm64_package: - executor: builder + - CIRCLECI_CLI_VERSION: 0.1.5546 + - GO_TAGS: '' + - GO_VERSION: 1.16.7 + - GOTESTSUM_VERSION: 0.5.2 + algolia-index: + docker: + - image: node:12 steps: - - setup_remote_docker: - version: 19.03.12 - docker_layer_caching: false - - add_ssh_keys: - fingerprints: - - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 - - checkout: - path: . - - run: - command: make -C packages*.lock write-package-cache-key - name: Write package cache key - - restore_cache: - key: package-70290ee80c00ff40a9baf8e2800a2778dd11bc34-{{checksum ".buildcache/cache-keys/package-70290ee80c00ff40a9baf8e2800a2778dd11bc34"}} - name: Restore package cache - - run: - command: |2 - - 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." + - 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: docker.mirror.hashicorp.services/circleci/buildpack-deps + shell: /usr/bin/env bash -euo pipefail -c + environment: + - AUTO_INSTALL_TOOLS: 'YES' + - BUILDKIT_PROGRESS: plain + - PRODUCT_REVISION: '' + - PACKAGE_SPEC_ID: 0cfa14d59a028968575a92d27d1d41352eb6ce63 + steps: + - setup_remote_docker: + docker_layer_caching: false + version: 19.03.12 + - add_ssh_keys: + fingerprints: + - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 + - checkout: + path: . + - run: + command: make -C packages*.lock write-package-cache-key + name: Write package cache key + - restore_cache: + key: package-0cfa14d59a028968575a92d27d1d41352eb6ce63-{{checksum ".buildcache/cache-keys/package-0cfa14d59a028968575a92d27d1d41352eb6ce63"}} + name: Restore package cache + - run: + command: |2 + + 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 cache status + - run: + command: make -C packages*.lock write-builder-cache-keys + name: Write builder layer cache keys + - restore_cache: + key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} + keys: + - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} + - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} + - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} + - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} + - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} + - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} + - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} + - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} + - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} + name: 'Restore Builder Image Cache: copy-source' + - run: + command: make -C packages*.lock load-builder-cache + name: Load whatever builder cache we have (if any) into the Docker daemon + no_output_timeout: 30m + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." + fi + + make -C packages*.lock package + name: Compile Package + - run: + command: ls -lahR .buildcache/packages + name: List packages + - save_cache: + key: package-0cfa14d59a028968575a92d27d1d41352eb6ce63-{{checksum ".buildcache/cache-keys/package-0cfa14d59a028968575a92d27d1d41352eb6ce63"}} + name: Save package cache + paths: + - .buildcache/packages/store + test-go-remote-docker: + docker: + - image: docker.mirror.hashicorp.services/circleci/golang:1.16.7-buster + resource_class: medium + working_directory: /go/src/github.com/hashicorp/vault + parallelism: 8 + 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 - name: Check cache status - - run: - command: make -C packages*.lock write-builder-cache-keys - name: Write builder layer cache keys - - restore_cache: - key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} - keys: - - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} - - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} - - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} - - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} - - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} - - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} - - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} - - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} - - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} - name: 'Restore Builder Image Cache: copy-source' - - run: - command: make -C packages*.lock load-builder-cache - name: Load whatever builder cache we have (if any) into the Docker daemon - no_output_timeout: 30m - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." + } + # exit with success either way + exit 0 + name: Check branch name + working_directory: ~/ + - checkout + - setup_remote_docker: + docker_layer_caching: true + version: 18.09.3 + - add_ssh_keys: + fingerprints: + - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 + - run: + command: | + git config --global url."git@github.com:".insteadOf https://github.com/ + - 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" }} + - restore_cache: + keys: + - v1.3-{{checksum "go.sum"}}-{{checksum "sdk/go.sum"}}-{{checksum "api/go.sum"}} + name: Restore exact go modules cache + - run: + command: | + set -x + + EXTRA_TAGS= + case "" in + *-race*) export VAULT_CI_GO_TEST_RACE=1;; + *) EXTRA_TAGS=deadlock;; + 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" + + USE_DOCKER=0 + USE_DOCKER=1 + + # 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. + if [ $USE_DOCKER == 1 ]; then + 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) + else + 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) + fi + + # After running tests split step, we are now running the following steps + # in multiple different containers, each getting a different subset of + # the test packages in their package_names variable. Each container + # has its own remote docker VM. + + make prep + mkdir -p test-results/go-test + + # We don't want VAULT_LICENSE set when running Go tests, because that's + # not what developers have in their environments and it could break some + # tests; it would be like setting VAULT_TOKEN. However some non-Go + # CI commands, like the UI tests, shouldn't have to worry about licensing. + # So we set VAULT_LICENSE in CI, and here we unset it. Instead of + # VAULT_LICENSE, we populate VAULT_LICENSE_CI, so that tests which want + # an externally supplied license can opt-in to using it. + export VAULT_LICENSE_CI="$VAULT_LICENSE" + VAULT_LICENSE= + + # Create a docker network for our testcontainer + if [ $USE_DOCKER == 1 ]; then + # Despite the fact that we're using a circleci image (thus getting the + # version they chose for the docker cli) and that we're specifying a + # docker version to use for the remote docker instances, we occasionally + # see "client version too new, max supported version 1.39" errors for + # reasons unclear. + export DOCKER_API_VERSION=1.39 + + export TEST_DOCKER_NETWORK_ID=$(docker network list -q -f 'name=vaulttest') + if [ -z $TEST_DOCKER_NETWORK_ID ]; then + TEST_DOCKER_NETWORK_ID=$(docker network create vaulttest) fi - make -C packages*.lock package - name: Compile Package - - run: - command: ls -lahR .buildcache/packages - name: List packages - - save_cache: - paths: - - .buildcache/packages/store - key: package-70290ee80c00ff40a9baf8e2800a2778dd11bc34-{{checksum ".buildcache/cache-keys/package-70290ee80c00ff40a9baf8e2800a2778dd11bc34"}} - name: Save package cache + + + # Start a docker testcontainer to run the tests in + docker run -d \ + -e TEST_DOCKER_NETWORK_ID \ + -e GOPRIVATE \ + -e DOCKER_CERT_PATH \ + -e DOCKER_HOST \ + -e DOCKER_MACHINE_NAME \ + -e DOCKER_TLS_VERIFY \ + -e NO_PROXY \ + -e VAULT_TEST_LOG_DIR=/tmp/testlogs \ + --network vaulttest --name \ + testcontainer docker.mirror.hashicorp.services/circleci/golang:1.16.7-buster \ + tail -f /dev/null + + # Run tests + test -d /tmp/go-cache && docker cp /tmp/go-cache testcontainer:/tmp/gocache + docker exec testcontainer sh -c 'mkdir -p /go/src/github.com/hashicorp/vault' + docker cp . testcontainer:/go/src/github.com/hashicorp/vault/ + docker cp $DOCKER_CERT_PATH/ testcontainer:$DOCKER_CERT_PATH + + # Copy the downloaded modules inside the container. + docker exec testcontainer sh -c 'mkdir -p /go/pkg' + docker cp "$(go env GOPATH)/pkg/mod" testcontainer:/go/pkg/mod + + docker exec -w /go/src/github.com/hashicorp/vault/ \ + -e CIRCLECI -e VAULT_CI_GO_TEST_RACE \ + -e GOCACHE=/tmp/gocache \ + -e GO_TAGS \ + -e GOPROXY="off" \ + -e VAULT_LICENSE_CI \ + -e GOARCH=amd64 \ + testcontainer \ + gotestsum --format=short-verbose \ + --junitfile test-results/go-test/results.xml \ + --jsonfile test-results/go-test/results.json \ + -- \ + -tags "${GO_TAGS} ${EXTRA_TAGS}" \ + -timeout=60m \ + -parallel=20 \ + \ + ${package_names} + else + GOARCH=amd64 \ + GOCACHE=/tmp/go-cache \ + gotestsum --format=short-verbose \ + --junitfile test-results/go-test/results.xml \ + --jsonfile test-results/go-test/results.json \ + -- \ + -tags "${GO_TAGS} ${EXTRA_TAGS}" \ + -timeout=60m \ + -parallel=20 \ + \ + ${package_names} + fi + environment: + GOPRIVATE: github.com/hashicorp/* + name: Run Go tests + no_output_timeout: 60m + - run: + command: | + docker cp testcontainer:/go/src/github.com/hashicorp/vault/test-results . + docker cp testcontainer:/tmp/gocache /tmp/go-cache + name: Copy test results + when: always + - store_artifacts: + path: test-results + - store_test_results: + path: test-results + - store_artifacts: + path: /tmp/testlogs environment: - PACKAGE_SPEC_ID: 70290ee80c00ff40a9baf8e2800a2778dd11bc34 + - CIRCLECI_CLI_VERSION: 0.1.5546 + - GO_TAGS: '' freebsd_386_package: - executor: builder + docker: + - image: docker.mirror.hashicorp.services/circleci/buildpack-deps + shell: /usr/bin/env bash -euo pipefail -c + environment: + - AUTO_INSTALL_TOOLS: 'YES' + - BUILDKIT_PROGRESS: plain + - PRODUCT_REVISION: '' + - PACKAGE_SPEC_ID: 73e5929eed187b34bc51c84dc9e68cfe4e6452e0 steps: - - setup_remote_docker: - version: 19.03.12 - docker_layer_caching: false - - add_ssh_keys: - fingerprints: - - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 - - checkout: - path: . - - run: - command: make -C packages*.lock write-package-cache-key - name: Write package cache key - - restore_cache: - key: package-73e5929eed187b34bc51c84dc9e68cfe4e6452e0-{{checksum ".buildcache/cache-keys/package-73e5929eed187b34bc51c84dc9e68cfe4e6452e0"}} - name: Restore package cache - - run: - command: |2 - - 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." + - setup_remote_docker: + docker_layer_caching: false + version: 19.03.12 + - add_ssh_keys: + fingerprints: + - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 + - checkout: + path: . + - run: + command: make -C packages*.lock write-package-cache-key + name: Write package cache key + - restore_cache: + key: package-73e5929eed187b34bc51c84dc9e68cfe4e6452e0-{{checksum ".buildcache/cache-keys/package-73e5929eed187b34bc51c84dc9e68cfe4e6452e0"}} + name: Restore package cache + - run: + command: |2 + + 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 cache status + - run: + command: make -C packages*.lock write-builder-cache-keys + name: Write builder layer cache keys + - restore_cache: + key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} + keys: + - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} + - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} + - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} + - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} + - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} + - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} + - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} + - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} + - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} + name: 'Restore Builder Image Cache: copy-source' + - run: + command: make -C packages*.lock load-builder-cache + name: Load whatever builder cache we have (if any) into the Docker daemon + no_output_timeout: 30m + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." + fi + + make -C packages*.lock package + name: Compile Package + - run: + command: ls -lahR .buildcache/packages + name: List packages + - save_cache: + key: package-73e5929eed187b34bc51c84dc9e68cfe4e6452e0-{{checksum ".buildcache/cache-keys/package-73e5929eed187b34bc51c84dc9e68cfe4e6452e0"}} + name: Save package cache + paths: + - .buildcache/packages/store + test-go-race: + docker: + - image: docker.mirror.hashicorp.services/circleci/golang:1.16.7-buster + resource_class: xlarge + working_directory: /go/src/github.com/hashicorp/vault + parallelism: 8 + 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 - name: Check cache status - - run: - command: make -C packages*.lock write-builder-cache-keys - name: Write builder layer cache keys - - restore_cache: - key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} - keys: - - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} - - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} - - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} - - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} - - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} - - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} - - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} - - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} - - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} - name: 'Restore Builder Image Cache: copy-source' - - run: - command: make -C packages*.lock load-builder-cache - name: Load whatever builder cache we have (if any) into the Docker daemon - no_output_timeout: 30m - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." + } + # exit with success either way + exit 0 + name: Check branch name + working_directory: ~/ + - checkout + - add_ssh_keys: + fingerprints: + - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 + - run: + command: | + git config --global url."git@github.com:".insteadOf https://github.com/ + - 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" }} + - restore_cache: + keys: + - v1.3-{{checksum "go.sum"}}-{{checksum "sdk/go.sum"}}-{{checksum "api/go.sum"}} + name: Restore exact go modules cache + - run: + command: | + set -x + + EXTRA_TAGS= + case "-race" in + *-race*) export VAULT_CI_GO_TEST_RACE=1;; + *) EXTRA_TAGS=deadlock;; + 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" + + USE_DOCKER=0 + + # 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. + if [ $USE_DOCKER == 1 ]; then + 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) + else + 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) + fi + + # After running tests split step, we are now running the following steps + # in multiple different containers, each getting a different subset of + # the test packages in their package_names variable. Each container + # has its own remote docker VM. + + make prep + mkdir -p test-results/go-test + + # We don't want VAULT_LICENSE set when running Go tests, because that's + # not what developers have in their environments and it could break some + # tests; it would be like setting VAULT_TOKEN. However some non-Go + # CI commands, like the UI tests, shouldn't have to worry about licensing. + # So we set VAULT_LICENSE in CI, and here we unset it. Instead of + # VAULT_LICENSE, we populate VAULT_LICENSE_CI, so that tests which want + # an externally supplied license can opt-in to using it. + export VAULT_LICENSE_CI="$VAULT_LICENSE" + VAULT_LICENSE= + + # Create a docker network for our testcontainer + if [ $USE_DOCKER == 1 ]; then + # Despite the fact that we're using a circleci image (thus getting the + # version they chose for the docker cli) and that we're specifying a + # docker version to use for the remote docker instances, we occasionally + # see "client version too new, max supported version 1.39" errors for + # reasons unclear. + export DOCKER_API_VERSION=1.39 + + export TEST_DOCKER_NETWORK_ID=$(docker network list -q -f 'name=vaulttest') + if [ -z $TEST_DOCKER_NETWORK_ID ]; then + TEST_DOCKER_NETWORK_ID=$(docker network create vaulttest) fi - make -C packages*.lock package - name: Compile Package - - run: - command: ls -lahR .buildcache/packages - name: List packages - - save_cache: - paths: - - .buildcache/packages/store - key: package-73e5929eed187b34bc51c84dc9e68cfe4e6452e0-{{checksum ".buildcache/cache-keys/package-73e5929eed187b34bc51c84dc9e68cfe4e6452e0"}} - name: Save package cache + + + # Start a docker testcontainer to run the tests in + docker run -d \ + -e TEST_DOCKER_NETWORK_ID \ + -e GOPRIVATE \ + -e DOCKER_CERT_PATH \ + -e DOCKER_HOST \ + -e DOCKER_MACHINE_NAME \ + -e DOCKER_TLS_VERIFY \ + -e NO_PROXY \ + -e VAULT_TEST_LOG_DIR=/tmp/testlogs \ + --network vaulttest --name \ + testcontainer docker.mirror.hashicorp.services/circleci/golang:1.16.7-buster \ + tail -f /dev/null + + # Run tests + test -d /tmp/go-cache && docker cp /tmp/go-cache testcontainer:/tmp/gocache + docker exec testcontainer sh -c 'mkdir -p /go/src/github.com/hashicorp/vault' + docker cp . testcontainer:/go/src/github.com/hashicorp/vault/ + docker cp $DOCKER_CERT_PATH/ testcontainer:$DOCKER_CERT_PATH + + # Copy the downloaded modules inside the container. + docker exec testcontainer sh -c 'mkdir -p /go/pkg' + docker cp "$(go env GOPATH)/pkg/mod" testcontainer:/go/pkg/mod + + docker exec -w /go/src/github.com/hashicorp/vault/ \ + -e CIRCLECI -e VAULT_CI_GO_TEST_RACE \ + -e GOCACHE=/tmp/gocache \ + -e GO_TAGS \ + -e GOPROXY="off" \ + -e VAULT_LICENSE_CI \ + -e GOARCH=amd64 \ + testcontainer \ + gotestsum --format=short-verbose \ + --junitfile test-results/go-test/results.xml \ + --jsonfile test-results/go-test/results.json \ + -- \ + -tags "${GO_TAGS} ${EXTRA_TAGS}" \ + -timeout=60m \ + -parallel=20 \ + -race \ + ${package_names} + else + GOARCH=amd64 \ + GOCACHE=/tmp/go-cache \ + gotestsum --format=short-verbose \ + --junitfile test-results/go-test/results.xml \ + --jsonfile test-results/go-test/results.json \ + -- \ + -tags "${GO_TAGS} ${EXTRA_TAGS}" \ + -timeout=60m \ + -parallel=20 \ + -race \ + ${package_names} + fi + environment: + GOPRIVATE: github.com/hashicorp/* + 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: - PACKAGE_SPEC_ID: 73e5929eed187b34bc51c84dc9e68cfe4e6452e0 + - CIRCLECI_CLI_VERSION: 0.1.5546 + - GO_TAGS: '' freebsd_amd64_package: - executor: builder - steps: - - setup_remote_docker: - version: 19.03.12 - docker_layer_caching: false - - add_ssh_keys: - fingerprints: - - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 - - checkout: - path: . - - run: - command: make -C packages*.lock write-package-cache-key - name: Write package cache key - - restore_cache: - key: package-2d48df616168bf8ae1cdbfce10f31b3c73759ef9-{{checksum ".buildcache/cache-keys/package-2d48df616168bf8ae1cdbfce10f31b3c73759ef9"}} - name: Restore package cache - - run: - command: |2 - - 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 cache status - - run: - command: make -C packages*.lock write-builder-cache-keys - name: Write builder layer cache keys - - restore_cache: - key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} - keys: - - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} - - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} - - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} - - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} - - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} - - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} - - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} - - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} - - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} - name: 'Restore Builder Image Cache: copy-source' - - run: - command: make -C packages*.lock load-builder-cache - name: Load whatever builder cache we have (if any) into the Docker daemon - no_output_timeout: 30m - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." - fi - - make -C packages*.lock package - name: Compile Package - - run: - command: ls -lahR .buildcache/packages - name: List packages - - save_cache: - paths: - - .buildcache/packages/store - key: package-2d48df616168bf8ae1cdbfce10f31b3c73759ef9-{{checksum ".buildcache/cache-keys/package-2d48df616168bf8ae1cdbfce10f31b3c73759ef9"}} - name: Save package cache + docker: + - image: docker.mirror.hashicorp.services/circleci/buildpack-deps + shell: /usr/bin/env bash -euo pipefail -c environment: - PACKAGE_SPEC_ID: 2d48df616168bf8ae1cdbfce10f31b3c73759ef9 - freebsd_arm_package: - executor: builder + - AUTO_INSTALL_TOOLS: 'YES' + - BUILDKIT_PROGRESS: plain + - PRODUCT_REVISION: '' + - PACKAGE_SPEC_ID: 2d48df616168bf8ae1cdbfce10f31b3c73759ef9 steps: - - setup_remote_docker: - version: 19.03.12 - docker_layer_caching: false - - add_ssh_keys: - fingerprints: - - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 - - checkout: - path: . - - run: - command: make -C packages*.lock write-package-cache-key - name: Write package cache key - - restore_cache: - key: package-552364a81ae60ec9e925bf03436153925235fa28-{{checksum ".buildcache/cache-keys/package-552364a81ae60ec9e925bf03436153925235fa28"}} - name: Restore package cache - - run: - command: |2 - - 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 cache status - - run: - command: make -C packages*.lock write-builder-cache-keys - name: Write builder layer cache keys - - restore_cache: - key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} - keys: - - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} - - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} - - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} - - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} - - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} - - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} - - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} - - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} - - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} - name: 'Restore Builder Image Cache: copy-source' - - run: - command: make -C packages*.lock load-builder-cache - name: Load whatever builder cache we have (if any) into the Docker daemon - no_output_timeout: 30m - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." - fi - - make -C packages*.lock package - name: Compile Package - - run: - command: ls -lahR .buildcache/packages - name: List packages - - save_cache: - paths: - - .buildcache/packages/store - key: package-552364a81ae60ec9e925bf03436153925235fa28-{{checksum ".buildcache/cache-keys/package-552364a81ae60ec9e925bf03436153925235fa28"}} - name: Save package cache + - setup_remote_docker: + docker_layer_caching: false + version: 19.03.12 + - add_ssh_keys: + fingerprints: + - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 + - checkout: + path: . + - run: + command: make -C packages*.lock write-package-cache-key + name: Write package cache key + - restore_cache: + key: package-2d48df616168bf8ae1cdbfce10f31b3c73759ef9-{{checksum ".buildcache/cache-keys/package-2d48df616168bf8ae1cdbfce10f31b3c73759ef9"}} + name: Restore package cache + - run: + command: |2 + + 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 cache status + - run: + command: make -C packages*.lock write-builder-cache-keys + name: Write builder layer cache keys + - restore_cache: + key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} + keys: + - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} + - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} + - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} + - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} + - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} + - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} + - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} + - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} + - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} + name: 'Restore Builder Image Cache: copy-source' + - run: + command: make -C packages*.lock load-builder-cache + name: Load whatever builder cache we have (if any) into the Docker daemon + no_output_timeout: 30m + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." + fi + + make -C packages*.lock package + name: Compile Package + - run: + command: ls -lahR .buildcache/packages + name: List packages + - save_cache: + key: package-2d48df616168bf8ae1cdbfce10f31b3c73759ef9-{{checksum ".buildcache/cache-keys/package-2d48df616168bf8ae1cdbfce10f31b3c73759ef9"}} + name: Save package cache + paths: + - .buildcache/packages/store + openbsd_386_package: + docker: + - image: docker.mirror.hashicorp.services/circleci/buildpack-deps + shell: /usr/bin/env bash -euo pipefail -c environment: - PACKAGE_SPEC_ID: 552364a81ae60ec9e925bf03436153925235fa28 - linux_386_package: - executor: builder + - AUTO_INSTALL_TOOLS: 'YES' + - BUILDKIT_PROGRESS: plain + - PRODUCT_REVISION: '' + - PACKAGE_SPEC_ID: 15e0bf30e04ca7f3808ca5a0d872d99ec30fb2e7 steps: - - setup_remote_docker: - version: 19.03.12 - docker_layer_caching: false - - add_ssh_keys: - fingerprints: - - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 - - checkout: - path: . - - run: - command: make -C packages*.lock write-package-cache-key - name: Write package cache key - - restore_cache: - key: package-0cfa14d59a028968575a92d27d1d41352eb6ce63-{{checksum ".buildcache/cache-keys/package-0cfa14d59a028968575a92d27d1d41352eb6ce63"}} - name: Restore package cache - - run: - command: |2 - - 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 cache status - - run: - command: make -C packages*.lock write-builder-cache-keys - name: Write builder layer cache keys - - restore_cache: - key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} - keys: - - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} - - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} - - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} - - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} - - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} - - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} - - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} - - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} - - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} - name: 'Restore Builder Image Cache: copy-source' - - run: - command: make -C packages*.lock load-builder-cache - name: Load whatever builder cache we have (if any) into the Docker daemon - no_output_timeout: 30m - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." - fi - - make -C packages*.lock package - name: Compile Package - - run: - command: ls -lahR .buildcache/packages - name: List packages - - save_cache: - paths: - - .buildcache/packages/store - key: package-0cfa14d59a028968575a92d27d1d41352eb6ce63-{{checksum ".buildcache/cache-keys/package-0cfa14d59a028968575a92d27d1d41352eb6ce63"}} - name: Save package cache - environment: - PACKAGE_SPEC_ID: 0cfa14d59a028968575a92d27d1d41352eb6ce63 + - setup_remote_docker: + docker_layer_caching: false + version: 19.03.12 + - add_ssh_keys: + fingerprints: + - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 + - checkout: + path: . + - run: + command: make -C packages*.lock write-package-cache-key + name: Write package cache key + - restore_cache: + key: package-15e0bf30e04ca7f3808ca5a0d872d99ec30fb2e7-{{checksum ".buildcache/cache-keys/package-15e0bf30e04ca7f3808ca5a0d872d99ec30fb2e7"}} + name: Restore package cache + - run: + command: |2 + + 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 cache status + - run: + command: make -C packages*.lock write-builder-cache-keys + name: Write builder layer cache keys + - restore_cache: + key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} + keys: + - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} + - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} + - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} + - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} + - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} + - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} + - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} + - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} + - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} + name: 'Restore Builder Image Cache: copy-source' + - run: + command: make -C packages*.lock load-builder-cache + name: Load whatever builder cache we have (if any) into the Docker daemon + no_output_timeout: 30m + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." + fi + + make -C packages*.lock package + name: Compile Package + - run: + command: ls -lahR .buildcache/packages + name: List packages + - save_cache: + key: package-15e0bf30e04ca7f3808ca5a0d872d99ec30fb2e7-{{checksum ".buildcache/cache-keys/package-15e0bf30e04ca7f3808ca5a0d872d99ec30fb2e7"}} + name: Save package cache + paths: + - .buildcache/packages/store linux_amd64_package: - executor: builder - steps: - - setup_remote_docker: - version: 19.03.12 - docker_layer_caching: false - - add_ssh_keys: - fingerprints: - - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 - - checkout: - path: . - - run: - command: make -C packages*.lock write-package-cache-key - name: Write package cache key - - restore_cache: - key: package-86eb712fba163c80690185fe24c22b178dbd17f8-{{checksum ".buildcache/cache-keys/package-86eb712fba163c80690185fe24c22b178dbd17f8"}} - name: Restore package cache - - run: - command: |2 - - 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 cache status - - run: - command: make -C packages*.lock write-builder-cache-keys - name: Write builder layer cache keys - - restore_cache: - key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} - keys: - - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} - - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} - - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} - - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} - - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} - - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} - - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} - - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} - - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} - name: 'Restore Builder Image Cache: copy-source' - - run: - command: make -C packages*.lock load-builder-cache - name: Load whatever builder cache we have (if any) into the Docker daemon - no_output_timeout: 30m - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." - fi - - make -C packages*.lock package - name: Compile Package - - run: - command: ls -lahR .buildcache/packages - name: List packages - - save_cache: - paths: - - .buildcache/packages/store - key: package-86eb712fba163c80690185fe24c22b178dbd17f8-{{checksum ".buildcache/cache-keys/package-86eb712fba163c80690185fe24c22b178dbd17f8"}} - name: Save package cache + docker: + - image: docker.mirror.hashicorp.services/circleci/buildpack-deps + shell: /usr/bin/env bash -euo pipefail -c environment: - PACKAGE_SPEC_ID: 86eb712fba163c80690185fe24c22b178dbd17f8 - linux_arm_package: - executor: builder + - AUTO_INSTALL_TOOLS: 'YES' + - BUILDKIT_PROGRESS: plain + - PRODUCT_REVISION: '' + - PACKAGE_SPEC_ID: 86eb712fba163c80690185fe24c22b178dbd17f8 steps: - - setup_remote_docker: - version: 19.03.12 - docker_layer_caching: false - - add_ssh_keys: - fingerprints: - - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 - - checkout: - path: . - - run: - command: make -C packages*.lock write-package-cache-key - name: Write package cache key - - restore_cache: - key: package-bc0d94feb5922f5c16715af7cc85b2060a87ddc7-{{checksum ".buildcache/cache-keys/package-bc0d94feb5922f5c16715af7cc85b2060a87ddc7"}} - name: Restore package cache - - run: - command: |2 - - 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 cache status - - run: - command: make -C packages*.lock write-builder-cache-keys - name: Write builder layer cache keys - - restore_cache: - key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} - keys: - - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} - - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} - - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} - - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} - - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} - - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} - - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} - - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} - - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} - name: 'Restore Builder Image Cache: copy-source' - - run: - command: make -C packages*.lock load-builder-cache - name: Load whatever builder cache we have (if any) into the Docker daemon - no_output_timeout: 30m - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." - fi - - make -C packages*.lock package - name: Compile Package - - run: - command: ls -lahR .buildcache/packages - name: List packages - - save_cache: - paths: - - .buildcache/packages/store - key: package-bc0d94feb5922f5c16715af7cc85b2060a87ddc7-{{checksum ".buildcache/cache-keys/package-bc0d94feb5922f5c16715af7cc85b2060a87ddc7"}} - name: Save package cache - environment: - PACKAGE_SPEC_ID: bc0d94feb5922f5c16715af7cc85b2060a87ddc7 - linux_arm64_package: - executor: builder + - setup_remote_docker: + docker_layer_caching: false + version: 19.03.12 + - add_ssh_keys: + fingerprints: + - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 + - checkout: + path: . + - run: + command: make -C packages*.lock write-package-cache-key + name: Write package cache key + - restore_cache: + key: package-86eb712fba163c80690185fe24c22b178dbd17f8-{{checksum ".buildcache/cache-keys/package-86eb712fba163c80690185fe24c22b178dbd17f8"}} + name: Restore package cache + - run: + command: |2 + + 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 cache status + - run: + command: make -C packages*.lock write-builder-cache-keys + name: Write builder layer cache keys + - restore_cache: + key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} + keys: + - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} + - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} + - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} + - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} + - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} + - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} + - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} + - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} + - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} + name: 'Restore Builder Image Cache: copy-source' + - run: + command: make -C packages*.lock load-builder-cache + name: Load whatever builder cache we have (if any) into the Docker daemon + no_output_timeout: 30m + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." + fi + + make -C packages*.lock package + name: Compile Package + - run: + command: ls -lahR .buildcache/packages + name: List packages + - save_cache: + key: package-86eb712fba163c80690185fe24c22b178dbd17f8-{{checksum ".buildcache/cache-keys/package-86eb712fba163c80690185fe24c22b178dbd17f8"}} + name: Save package cache + paths: + - .buildcache/packages/store + website-docker-image: + docker: + - image: circleci/buildpack-deps + shell: /usr/bin/env bash -euo pipefail -c steps: - - setup_remote_docker: - version: 19.03.12 - docker_layer_caching: false - - add_ssh_keys: - fingerprints: - - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 - - checkout: - path: . - - run: - command: make -C packages*.lock write-package-cache-key - name: Write package cache key - - restore_cache: - key: package-d608f9c10443d43d15a161559d07d812a24dffd4-{{checksum ".buildcache/cache-keys/package-d608f9c10443d43d15a161559d07d812a24dffd4"}} - name: Restore package cache - - run: - command: |2 - - 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 cache status - - run: - command: make -C packages*.lock write-builder-cache-keys - name: Write builder layer cache keys - - restore_cache: - key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} - keys: - - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} - - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} - - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} - - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} - - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} - - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} - - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} - - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} - - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} - name: 'Restore Builder Image Cache: copy-source' - - run: - command: make -C packages*.lock load-builder-cache - name: Load whatever builder cache we have (if any) into the Docker daemon - no_output_timeout: 30m - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." - fi - - make -C packages*.lock package - name: Compile Package - - run: - command: ls -lahR .buildcache/packages - name: List packages - - save_cache: - paths: - - .buildcache/packages/store - key: package-d608f9c10443d43d15a161559d07d812a24dffd4-{{checksum ".buildcache/cache-keys/package-d608f9c10443d43d15a161559d07d812a24dffd4"}} - name: Save package cache + - 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: docker.mirror.hashicorp.services/circleci/buildpack-deps + shell: /usr/bin/env bash -euo pipefail -c environment: - PACKAGE_SPEC_ID: d608f9c10443d43d15a161559d07d812a24dffd4 - netbsd_386_package: - executor: builder + - AUTO_INSTALL_TOOLS: 'YES' + - BUILDKIT_PROGRESS: plain + - PRODUCT_REVISION: '' + - PACKAGE_SPEC_ID: 359562b465a81cb702a7b863940395b5261ed70f steps: - - setup_remote_docker: - version: 19.03.12 - docker_layer_caching: false - - add_ssh_keys: - fingerprints: - - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 - - checkout: - path: . - - run: - command: make -C packages*.lock write-package-cache-key - name: Write package cache key - - restore_cache: - key: package-113e2a29f4786b4f0b53955ceb8dcf6ba42a38c2-{{checksum ".buildcache/cache-keys/package-113e2a29f4786b4f0b53955ceb8dcf6ba42a38c2"}} - name: Restore package cache - - run: - command: |2 - - 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." + - setup_remote_docker: + docker_layer_caching: false + version: 19.03.12 + - add_ssh_keys: + fingerprints: + - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 + - checkout: + path: . + - run: + command: make -C packages*.lock write-package-cache-key + name: Write package cache key + - restore_cache: + key: package-359562b465a81cb702a7b863940395b5261ed70f-{{checksum ".buildcache/cache-keys/package-359562b465a81cb702a7b863940395b5261ed70f"}} + name: Restore package cache + - run: + command: |2 + + 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 cache status + - run: + command: make -C packages*.lock write-builder-cache-keys + name: Write builder layer cache keys + - restore_cache: + key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} + keys: + - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} + - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} + - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} + - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} + - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} + - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} + - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} + - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} + - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} + name: 'Restore Builder Image Cache: copy-source' + - run: + command: make -C packages*.lock load-builder-cache + name: Load whatever builder cache we have (if any) into the Docker daemon + no_output_timeout: 30m + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." + fi + + make -C packages*.lock package + name: Compile Package + - run: + command: ls -lahR .buildcache/packages + name: List packages + - save_cache: + key: package-359562b465a81cb702a7b863940395b5261ed70f-{{checksum ".buildcache/cache-keys/package-359562b465a81cb702a7b863940395b5261ed70f"}} + name: Save package cache + paths: + - .buildcache/packages/store + test-go: + docker: + - image: docker.mirror.hashicorp.services/circleci/golang:1.16.7-buster + resource_class: large + working_directory: /go/src/github.com/hashicorp/vault + parallelism: 8 + 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 - name: Check cache status - - run: - command: make -C packages*.lock write-builder-cache-keys - name: Write builder layer cache keys - - restore_cache: - key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} - keys: - - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} - - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} - - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} - - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} - - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} - - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} - - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} - - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} - - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} - name: 'Restore Builder Image Cache: copy-source' - - run: - command: make -C packages*.lock load-builder-cache - name: Load whatever builder cache we have (if any) into the Docker daemon - no_output_timeout: 30m - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." + } + # exit with success either way + exit 0 + name: Check branch name + working_directory: ~/ + - checkout + - add_ssh_keys: + fingerprints: + - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 + - run: + command: | + git config --global url."git@github.com:".insteadOf https://github.com/ + - 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" }} + - restore_cache: + keys: + - v1.3-{{checksum "go.sum"}}-{{checksum "sdk/go.sum"}}-{{checksum "api/go.sum"}} + name: Restore exact go modules cache + - run: + command: | + set -x + + EXTRA_TAGS= + case "" in + *-race*) export VAULT_CI_GO_TEST_RACE=1;; + *) EXTRA_TAGS=deadlock;; + 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" + + USE_DOCKER=0 + + # 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. + if [ $USE_DOCKER == 1 ]; then + 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) + else + 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) + fi + + # After running tests split step, we are now running the following steps + # in multiple different containers, each getting a different subset of + # the test packages in their package_names variable. Each container + # has its own remote docker VM. + + make prep + mkdir -p test-results/go-test + + # We don't want VAULT_LICENSE set when running Go tests, because that's + # not what developers have in their environments and it could break some + # tests; it would be like setting VAULT_TOKEN. However some non-Go + # CI commands, like the UI tests, shouldn't have to worry about licensing. + # So we set VAULT_LICENSE in CI, and here we unset it. Instead of + # VAULT_LICENSE, we populate VAULT_LICENSE_CI, so that tests which want + # an externally supplied license can opt-in to using it. + export VAULT_LICENSE_CI="$VAULT_LICENSE" + VAULT_LICENSE= + + # Create a docker network for our testcontainer + if [ $USE_DOCKER == 1 ]; then + # Despite the fact that we're using a circleci image (thus getting the + # version they chose for the docker cli) and that we're specifying a + # docker version to use for the remote docker instances, we occasionally + # see "client version too new, max supported version 1.39" errors for + # reasons unclear. + export DOCKER_API_VERSION=1.39 + + export TEST_DOCKER_NETWORK_ID=$(docker network list -q -f 'name=vaulttest') + if [ -z $TEST_DOCKER_NETWORK_ID ]; then + TEST_DOCKER_NETWORK_ID=$(docker network create vaulttest) fi - make -C packages*.lock package - name: Compile Package - - run: - command: ls -lahR .buildcache/packages - name: List packages - - save_cache: - paths: - - .buildcache/packages/store - key: package-113e2a29f4786b4f0b53955ceb8dcf6ba42a38c2-{{checksum ".buildcache/cache-keys/package-113e2a29f4786b4f0b53955ceb8dcf6ba42a38c2"}} - name: Save package cache + + + # Start a docker testcontainer to run the tests in + docker run -d \ + -e TEST_DOCKER_NETWORK_ID \ + -e GOPRIVATE \ + -e DOCKER_CERT_PATH \ + -e DOCKER_HOST \ + -e DOCKER_MACHINE_NAME \ + -e DOCKER_TLS_VERIFY \ + -e NO_PROXY \ + -e VAULT_TEST_LOG_DIR=/tmp/testlogs \ + --network vaulttest --name \ + testcontainer docker.mirror.hashicorp.services/circleci/golang:1.16.7-buster \ + tail -f /dev/null + + # Run tests + test -d /tmp/go-cache && docker cp /tmp/go-cache testcontainer:/tmp/gocache + docker exec testcontainer sh -c 'mkdir -p /go/src/github.com/hashicorp/vault' + docker cp . testcontainer:/go/src/github.com/hashicorp/vault/ + docker cp $DOCKER_CERT_PATH/ testcontainer:$DOCKER_CERT_PATH + + # Copy the downloaded modules inside the container. + docker exec testcontainer sh -c 'mkdir -p /go/pkg' + docker cp "$(go env GOPATH)/pkg/mod" testcontainer:/go/pkg/mod + + docker exec -w /go/src/github.com/hashicorp/vault/ \ + -e CIRCLECI -e VAULT_CI_GO_TEST_RACE \ + -e GOCACHE=/tmp/gocache \ + -e GO_TAGS \ + -e GOPROXY="off" \ + -e VAULT_LICENSE_CI \ + -e GOARCH=amd64 \ + testcontainer \ + gotestsum --format=short-verbose \ + --junitfile test-results/go-test/results.xml \ + --jsonfile test-results/go-test/results.json \ + -- \ + -tags "${GO_TAGS} ${EXTRA_TAGS}" \ + -timeout=60m \ + -parallel=20 \ + \ + ${package_names} + else + GOARCH=amd64 \ + GOCACHE=/tmp/go-cache \ + gotestsum --format=short-verbose \ + --junitfile test-results/go-test/results.xml \ + --jsonfile test-results/go-test/results.json \ + -- \ + -tags "${GO_TAGS} ${EXTRA_TAGS}" \ + -timeout=60m \ + -parallel=20 \ + \ + ${package_names} + fi + environment: + GOPRIVATE: github.com/hashicorp/* + 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: - PACKAGE_SPEC_ID: 113e2a29f4786b4f0b53955ceb8dcf6ba42a38c2 + - CIRCLECI_CLI_VERSION: 0.1.5546 + - GO_TAGS: '' netbsd_amd64_package: - executor: builder + docker: + - image: docker.mirror.hashicorp.services/circleci/buildpack-deps + shell: /usr/bin/env bash -euo pipefail -c + environment: + - AUTO_INSTALL_TOOLS: 'YES' + - BUILDKIT_PROGRESS: plain + - PRODUCT_REVISION: '' + - PACKAGE_SPEC_ID: c6ab5585544823405f0a5a44616458612459c3b2 steps: - - setup_remote_docker: - version: 19.03.12 - docker_layer_caching: false - - add_ssh_keys: - fingerprints: - - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 - - checkout: - path: . - - run: - command: make -C packages*.lock write-package-cache-key - name: Write package cache key - - restore_cache: - key: package-c6ab5585544823405f0a5a44616458612459c3b2-{{checksum ".buildcache/cache-keys/package-c6ab5585544823405f0a5a44616458612459c3b2"}} - name: Restore package cache - - run: - command: |2 - - 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 cache status - - run: - command: make -C packages*.lock write-builder-cache-keys - name: Write builder layer cache keys - - restore_cache: - key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} - keys: - - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} - - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} - - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} - - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} - - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} - - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} - - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} - - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} - - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} - name: 'Restore Builder Image Cache: copy-source' - - run: - command: make -C packages*.lock load-builder-cache - name: Load whatever builder cache we have (if any) into the Docker daemon - no_output_timeout: 30m - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." - fi - - make -C packages*.lock package - name: Compile Package - - run: - command: ls -lahR .buildcache/packages - name: List packages - - save_cache: - paths: - - .buildcache/packages/store - key: package-c6ab5585544823405f0a5a44616458612459c3b2-{{checksum ".buildcache/cache-keys/package-c6ab5585544823405f0a5a44616458612459c3b2"}} - name: Save package cache + - setup_remote_docker: + docker_layer_caching: false + version: 19.03.12 + - add_ssh_keys: + fingerprints: + - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 + - checkout: + path: . + - run: + command: make -C packages*.lock write-package-cache-key + name: Write package cache key + - restore_cache: + key: package-c6ab5585544823405f0a5a44616458612459c3b2-{{checksum ".buildcache/cache-keys/package-c6ab5585544823405f0a5a44616458612459c3b2"}} + name: Restore package cache + - run: + command: |2 + + 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 cache status + - run: + command: make -C packages*.lock write-builder-cache-keys + name: Write builder layer cache keys + - restore_cache: + key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} + keys: + - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} + - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} + - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} + - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} + - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} + - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} + - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} + - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} + - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} + name: 'Restore Builder Image Cache: copy-source' + - run: + command: make -C packages*.lock load-builder-cache + name: Load whatever builder cache we have (if any) into the Docker daemon + no_output_timeout: 30m + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." + fi + + make -C packages*.lock package + name: Compile Package + - run: + command: ls -lahR .buildcache/packages + name: List packages + - save_cache: + key: package-c6ab5585544823405f0a5a44616458612459c3b2-{{checksum ".buildcache/cache-keys/package-c6ab5585544823405f0a5a44616458612459c3b2"}} + name: Save package cache + paths: + - .buildcache/packages/store + openbsd_amd64_package: + docker: + - image: docker.mirror.hashicorp.services/circleci/buildpack-deps + shell: /usr/bin/env bash -euo pipefail -c environment: - PACKAGE_SPEC_ID: c6ab5585544823405f0a5a44616458612459c3b2 - openbsd_386_package: - executor: builder + - AUTO_INSTALL_TOOLS: 'YES' + - BUILDKIT_PROGRESS: plain + - PRODUCT_REVISION: '' + - PACKAGE_SPEC_ID: 96216af336fd2ce49b883ccd837f4cbae27fd647 steps: - - setup_remote_docker: - version: 19.03.12 - docker_layer_caching: false - - add_ssh_keys: - fingerprints: - - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 - - checkout: - path: . - - run: - command: make -C packages*.lock write-package-cache-key - name: Write package cache key - - restore_cache: - key: package-15e0bf30e04ca7f3808ca5a0d872d99ec30fb2e7-{{checksum ".buildcache/cache-keys/package-15e0bf30e04ca7f3808ca5a0d872d99ec30fb2e7"}} - name: Restore package cache - - run: - command: |2 - - 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 cache status - - run: - command: make -C packages*.lock write-builder-cache-keys - name: Write builder layer cache keys - - restore_cache: - key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} - keys: - - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} - - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} - - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} - - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} - - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} - - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} - - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} - - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} - - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} - name: 'Restore Builder Image Cache: copy-source' - - run: - command: make -C packages*.lock load-builder-cache - name: Load whatever builder cache we have (if any) into the Docker daemon - no_output_timeout: 30m - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." - fi - - make -C packages*.lock package - name: Compile Package - - run: - command: ls -lahR .buildcache/packages - name: List packages - - save_cache: - paths: - - .buildcache/packages/store - key: package-15e0bf30e04ca7f3808ca5a0d872d99ec30fb2e7-{{checksum ".buildcache/cache-keys/package-15e0bf30e04ca7f3808ca5a0d872d99ec30fb2e7"}} - name: Save package cache + - setup_remote_docker: + docker_layer_caching: false + version: 19.03.12 + - add_ssh_keys: + fingerprints: + - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 + - checkout: + path: . + - run: + command: make -C packages*.lock write-package-cache-key + name: Write package cache key + - restore_cache: + key: package-96216af336fd2ce49b883ccd837f4cbae27fd647-{{checksum ".buildcache/cache-keys/package-96216af336fd2ce49b883ccd837f4cbae27fd647"}} + name: Restore package cache + - run: + command: |2 + + 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 cache status + - run: + command: make -C packages*.lock write-builder-cache-keys + name: Write builder layer cache keys + - restore_cache: + key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} + keys: + - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} + - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} + - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} + - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} + - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} + - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} + - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} + - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} + - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} + name: 'Restore Builder Image Cache: copy-source' + - run: + command: make -C packages*.lock load-builder-cache + name: Load whatever builder cache we have (if any) into the Docker daemon + no_output_timeout: 30m + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." + fi + + make -C packages*.lock package + name: Compile Package + - run: + command: ls -lahR .buildcache/packages + name: List packages + - save_cache: + key: package-96216af336fd2ce49b883ccd837f4cbae27fd647-{{checksum ".buildcache/cache-keys/package-96216af336fd2ce49b883ccd837f4cbae27fd647"}} + name: Save package cache + paths: + - .buildcache/packages/store + netbsd_386_package: + docker: + - image: docker.mirror.hashicorp.services/circleci/buildpack-deps + shell: /usr/bin/env bash -euo pipefail -c environment: - PACKAGE_SPEC_ID: 15e0bf30e04ca7f3808ca5a0d872d99ec30fb2e7 - openbsd_amd64_package: - executor: builder + - AUTO_INSTALL_TOOLS: 'YES' + - BUILDKIT_PROGRESS: plain + - PRODUCT_REVISION: '' + - PACKAGE_SPEC_ID: 113e2a29f4786b4f0b53955ceb8dcf6ba42a38c2 steps: - - setup_remote_docker: - version: 19.03.12 - docker_layer_caching: false - - add_ssh_keys: - fingerprints: - - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 - - checkout: - path: . - - run: - command: make -C packages*.lock write-package-cache-key - name: Write package cache key - - restore_cache: - key: package-96216af336fd2ce49b883ccd837f4cbae27fd647-{{checksum ".buildcache/cache-keys/package-96216af336fd2ce49b883ccd837f4cbae27fd647"}} - name: Restore package cache - - run: - command: |2 - - 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 cache status - - run: - command: make -C packages*.lock write-builder-cache-keys - name: Write builder layer cache keys - - restore_cache: - key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} - keys: - - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} - - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} - - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} - - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} - - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} - - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} - - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} - - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} - - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} - name: 'Restore Builder Image Cache: copy-source' - - run: - command: make -C packages*.lock load-builder-cache - name: Load whatever builder cache we have (if any) into the Docker daemon - no_output_timeout: 30m - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." - fi - - make -C packages*.lock package - name: Compile Package - - run: - command: ls -lahR .buildcache/packages - name: List packages - - save_cache: - paths: - - .buildcache/packages/store - key: package-96216af336fd2ce49b883ccd837f4cbae27fd647-{{checksum ".buildcache/cache-keys/package-96216af336fd2ce49b883ccd837f4cbae27fd647"}} - name: Save package cache + - setup_remote_docker: + docker_layer_caching: false + version: 19.03.12 + - add_ssh_keys: + fingerprints: + - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 + - checkout: + path: . + - run: + command: make -C packages*.lock write-package-cache-key + name: Write package cache key + - restore_cache: + key: package-113e2a29f4786b4f0b53955ceb8dcf6ba42a38c2-{{checksum ".buildcache/cache-keys/package-113e2a29f4786b4f0b53955ceb8dcf6ba42a38c2"}} + name: Restore package cache + - run: + command: |2 + + 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 cache status + - run: + command: make -C packages*.lock write-builder-cache-keys + name: Write builder layer cache keys + - restore_cache: + key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} + keys: + - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} + - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} + - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} + - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} + - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} + - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} + - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} + - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} + - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} + name: 'Restore Builder Image Cache: copy-source' + - run: + command: make -C packages*.lock load-builder-cache + name: Load whatever builder cache we have (if any) into the Docker daemon + no_output_timeout: 30m + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." + fi + + make -C packages*.lock package + name: Compile Package + - run: + command: ls -lahR .buildcache/packages + name: List packages + - save_cache: + key: package-113e2a29f4786b4f0b53955ceb8dcf6ba42a38c2-{{checksum ".buildcache/cache-keys/package-113e2a29f4786b4f0b53955ceb8dcf6ba42a38c2"}} + name: Save package cache + paths: + - .buildcache/packages/store + freebsd_arm_package: + docker: + - image: docker.mirror.hashicorp.services/circleci/buildpack-deps + shell: /usr/bin/env bash -euo pipefail -c environment: - PACKAGE_SPEC_ID: 96216af336fd2ce49b883ccd837f4cbae27fd647 - solaris_amd64_package: - executor: builder + - AUTO_INSTALL_TOOLS: 'YES' + - BUILDKIT_PROGRESS: plain + - PRODUCT_REVISION: '' + - PACKAGE_SPEC_ID: 552364a81ae60ec9e925bf03436153925235fa28 steps: - - setup_remote_docker: - version: 19.03.12 - docker_layer_caching: false - - add_ssh_keys: - fingerprints: - - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 - - checkout: - path: . - - run: - command: make -C packages*.lock write-package-cache-key - name: Write package cache key - - restore_cache: - key: package-359562b465a81cb702a7b863940395b5261ed70f-{{checksum ".buildcache/cache-keys/package-359562b465a81cb702a7b863940395b5261ed70f"}} - name: Restore package cache - - run: - command: |2 - - 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 cache status - - run: - command: make -C packages*.lock write-builder-cache-keys - name: Write builder layer cache keys - - restore_cache: - key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} - keys: - - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} - - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} - - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} - - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} - - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} - - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} - - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} - - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} - - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} - name: 'Restore Builder Image Cache: copy-source' - - run: - command: make -C packages*.lock load-builder-cache - name: Load whatever builder cache we have (if any) into the Docker daemon - no_output_timeout: 30m - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." - fi - - make -C packages*.lock package - name: Compile Package - - run: - command: ls -lahR .buildcache/packages - name: List packages - - save_cache: - paths: - - .buildcache/packages/store - key: package-359562b465a81cb702a7b863940395b5261ed70f-{{checksum ".buildcache/cache-keys/package-359562b465a81cb702a7b863940395b5261ed70f"}} - name: Save package cache + - setup_remote_docker: + docker_layer_caching: false + version: 19.03.12 + - add_ssh_keys: + fingerprints: + - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 + - checkout: + path: . + - run: + command: make -C packages*.lock write-package-cache-key + name: Write package cache key + - restore_cache: + key: package-552364a81ae60ec9e925bf03436153925235fa28-{{checksum ".buildcache/cache-keys/package-552364a81ae60ec9e925bf03436153925235fa28"}} + name: Restore package cache + - run: + command: |2 + + 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 cache status + - run: + command: make -C packages*.lock write-builder-cache-keys + name: Write builder layer cache keys + - restore_cache: + key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} + keys: + - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} + - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} + - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} + - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} + - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} + - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} + - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} + - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} + - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} + name: 'Restore Builder Image Cache: copy-source' + - run: + command: make -C packages*.lock load-builder-cache + name: Load whatever builder cache we have (if any) into the Docker daemon + no_output_timeout: 30m + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." + fi + + make -C packages*.lock package + name: Compile Package + - run: + command: ls -lahR .buildcache/packages + name: List packages + - save_cache: + key: package-552364a81ae60ec9e925bf03436153925235fa28-{{checksum ".buildcache/cache-keys/package-552364a81ae60ec9e925bf03436153925235fa28"}} + name: Save package cache + paths: + - .buildcache/packages/store + windows_amd64_package: + docker: + - image: docker.mirror.hashicorp.services/circleci/buildpack-deps + shell: /usr/bin/env bash -euo pipefail -c environment: - PACKAGE_SPEC_ID: 359562b465a81cb702a7b863940395b5261ed70f - windows_386_package: - executor: builder + - AUTO_INSTALL_TOOLS: 'YES' + - BUILDKIT_PROGRESS: plain + - PRODUCT_REVISION: '' + - PACKAGE_SPEC_ID: 38343475d76c802dd78fa4bee1dfb98cf2935923 steps: - - setup_remote_docker: - version: 19.03.12 - docker_layer_caching: false - - add_ssh_keys: - fingerprints: - - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 - - checkout: - path: . - - run: - command: make -C packages*.lock write-package-cache-key - name: Write package cache key - - restore_cache: - key: package-5300f05b8cb6c55f464cf5e973f5b22625c3ce02-{{checksum ".buildcache/cache-keys/package-5300f05b8cb6c55f464cf5e973f5b22625c3ce02"}} - name: Restore package cache - - run: - command: |2 - - 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 cache status - - run: - command: make -C packages*.lock write-builder-cache-keys - name: Write builder layer cache keys - - restore_cache: - key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} - keys: - - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} - - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} - - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} - - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} - - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} - - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} - - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} - - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} - - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} - name: 'Restore Builder Image Cache: copy-source' - - run: - command: make -C packages*.lock load-builder-cache - name: Load whatever builder cache we have (if any) into the Docker daemon - no_output_timeout: 30m - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." - fi - - make -C packages*.lock package - name: Compile Package - - run: - command: ls -lahR .buildcache/packages - name: List packages - - save_cache: - paths: - - .buildcache/packages/store - key: package-5300f05b8cb6c55f464cf5e973f5b22625c3ce02-{{checksum ".buildcache/cache-keys/package-5300f05b8cb6c55f464cf5e973f5b22625c3ce02"}} - name: Save package cache + - setup_remote_docker: + docker_layer_caching: false + version: 19.03.12 + - add_ssh_keys: + fingerprints: + - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 + - checkout: + path: . + - run: + command: make -C packages*.lock write-package-cache-key + name: Write package cache key + - restore_cache: + key: package-38343475d76c802dd78fa4bee1dfb98cf2935923-{{checksum ".buildcache/cache-keys/package-38343475d76c802dd78fa4bee1dfb98cf2935923"}} + name: Restore package cache + - run: + command: |2 + + 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 cache status + - run: + command: make -C packages*.lock write-builder-cache-keys + name: Write builder layer cache keys + - restore_cache: + key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} + keys: + - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} + - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} + - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} + - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} + - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} + - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} + - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} + - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} + - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} + name: 'Restore Builder Image Cache: copy-source' + - run: + command: make -C packages*.lock load-builder-cache + name: Load whatever builder cache we have (if any) into the Docker daemon + no_output_timeout: 30m + - run: + command: |2- + + KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" + eval "$(ssh-agent -s)" + if [ -f "$KEYFILE" ]; then + ssh-add "$KEYFILE" + else + echo "==> INFO: SSH key for github.com not found" + echo " Attempts to access private repositories from within" + echo " the build will fail, e.g. for private go modules, or" + echo " attempts to directly clone private repositories." + fi + + make -C packages*.lock package + name: Compile Package + - run: + command: ls -lahR .buildcache/packages + name: List packages + - save_cache: + key: package-38343475d76c802dd78fa4bee1dfb98cf2935923-{{checksum ".buildcache/cache-keys/package-38343475d76c802dd78fa4bee1dfb98cf2935923"}} + name: Save package cache + paths: + - .buildcache/packages/store + pre-flight-checks: + 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 "export GOPROXY=https://proxy.golang.org,direct" >> "$BASH_ENV" + echo "export GOPRIVATE=github.com/hashicorp/*" >> "$BASH_ENV" + + echo "$ go version" + go version + name: Setup Go + working_directory: ~/ + - checkout + - run: + command: | + export CCI_PATH=/tmp/circleci-cli/$CIRCLECI_CLI_VERSION + mkdir -p $CCI_PATH + NAME=circleci-cli_${CIRCLECI_CLI_VERSION}_${ARCH} + URL=$BASE/v${CIRCLECI_CLI_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 + - add_ssh_keys: + fingerprints: + - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 + - run: + command: | + git config --global url."git@github.com:".insteadOf https://github.com/ + - restore_cache: + keys: + - v1.3-{{checksum "go.sum"}}-{{checksum "sdk/go.sum"}}-{{checksum "api/go.sum"}} + - v1.3-{{checksum "go.sum"}}-{{checksum "sdk/go.sum"}} + - v1.3-{{checksum "go.sum"}} + name: Restore closest matching go modules cache + - run: + command: | + # go list ./... forces downloading some additional versions of modules that 'go mod + # download' misses. We need this because we make use of go list itself during + # code generation in later builds that rely on this module cache. + go list ./... + go mod download -json + ( cd sdk && go mod download -json; ) + ( cd api && go mod download -json; ) + name: go mod download + - run: + command: | + git --no-pager diff --exit-code || { + echo "ERROR: Files modified by go mod download, see above." + exit 1 + } + name: Verify downloading modules did not modify any files + - save_cache: + key: v1.3-{{checksum "go.sum"}}-{{checksum "sdk/go.sum"}}-{{checksum "api/go.sum"}} + name: Save go modules cache + paths: + - /go/pkg/mod environment: - PACKAGE_SPEC_ID: 5300f05b8cb6c55f464cf5e973f5b22625c3ce02 - windows_amd64_package: - executor: builder + - CIRCLECI_CLI_VERSION: 0.1.5546 + - GO_TAGS: '' + - GO_VERSION: 1.16.7 + - GOTESTSUM_VERSION: 0.5.2 + test-go-race-remote-docker: + docker: + - image: docker.mirror.hashicorp.services/circleci/golang:1.16.7-buster + resource_class: medium + working_directory: /go/src/github.com/hashicorp/vault + parallelism: 8 steps: - - setup_remote_docker: - version: 19.03.12 - docker_layer_caching: false - - add_ssh_keys: - fingerprints: - - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 - - checkout: - path: . - - run: - command: make -C packages*.lock write-package-cache-key - name: Write package cache key - - restore_cache: - key: package-38343475d76c802dd78fa4bee1dfb98cf2935923-{{checksum ".buildcache/cache-keys/package-38343475d76c802dd78fa4bee1dfb98cf2935923"}} - name: Restore package cache - - run: - command: |2 - - 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." + - 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 - name: Check cache status - - run: - command: make -C packages*.lock write-builder-cache-keys - name: Write builder layer cache keys - - restore_cache: - key: copy-source_e447_{{checksum ".buildcache/cache-keys/copy-source-e44738bcfed5b0118dac2fdada2f481407e7ab77"}} - keys: - - go-modules_4c90_{{checksum ".buildcache/cache-keys/go-modules-4c90107a2d0f1093d5c86e17687af65d824a1084"}} - - build-static-assets_9d8e_{{checksum ".buildcache/cache-keys/build-static-assets-9d8e2ea75cce111b948e6ad97418dbc405d5a6c8"}} - - build-ui_e7b0_{{checksum ".buildcache/cache-keys/build-ui-e7b0e9f937cc520fb2922701a3d60e8c9c7753b0"}} - - ui-dependencies_20df_{{checksum ".buildcache/cache-keys/ui-dependencies-20df976fc03d82353540ebbc2458e9ee7ff37fcf"}} - - install-yarn_0cc7_{{checksum ".buildcache/cache-keys/install-yarn-0cc7628bc3899bf26dbb9c7c28c8bad7a0d19564"}} - - set-workdir_d528_{{checksum ".buildcache/cache-keys/set-workdir-d5289ae315d2f41c295bae76fc96e40f40b10173"}} - - install-go-tools_6b8f_{{checksum ".buildcache/cache-keys/install-go-tools-6b8fb5d23ebb3195c49c01e69907717462efd485"}} - - install-go_8856_{{checksum ".buildcache/cache-keys/install-go-8856aed7b0bd773b4539b957c157d21ff7b05758"}} - - base_c6cd_{{checksum ".buildcache/cache-keys/base-c6cdf1b224722d2520e082320f2a71875913247c"}} - name: 'Restore Builder Image Cache: copy-source' - - run: - command: make -C packages*.lock load-builder-cache - name: Load whatever builder cache we have (if any) into the Docker daemon - no_output_timeout: 30m - - run: - command: |2- - - KEYFILE="$HOME/.ssh/id_rsa_0e0377f4e2c356c2536a03e131912f06" - eval "$(ssh-agent -s)" - if [ -f "$KEYFILE" ]; then - ssh-add "$KEYFILE" - else - echo "==> INFO: SSH key for github.com not found" - echo " Attempts to access private repositories from within" - echo " the build will fail, e.g. for private go modules, or" - echo " attempts to directly clone private repositories." + } + # exit with success either way + exit 0 + name: Check branch name + working_directory: ~/ + - checkout + - setup_remote_docker: + docker_layer_caching: true + version: 18.09.3 + - add_ssh_keys: + fingerprints: + - 0e:03:77:f4:e2:c3:56:c2:53:6a:03:e1:31:91:2f:06 + - run: + command: | + git config --global url."git@github.com:".insteadOf https://github.com/ + - 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" }} + - restore_cache: + keys: + - v1.3-{{checksum "go.sum"}}-{{checksum "sdk/go.sum"}}-{{checksum "api/go.sum"}} + name: Restore exact go modules cache + - run: + command: | + set -x + + EXTRA_TAGS= + case "-race" in + *-race*) export VAULT_CI_GO_TEST_RACE=1;; + *) EXTRA_TAGS=deadlock;; + 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" + + USE_DOCKER=0 + USE_DOCKER=1 + + # 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. + if [ $USE_DOCKER == 1 ]; then + 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) + else + 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) + fi + + # After running tests split step, we are now running the following steps + # in multiple different containers, each getting a different subset of + # the test packages in their package_names variable. Each container + # has its own remote docker VM. + + make prep + mkdir -p test-results/go-test + + # We don't want VAULT_LICENSE set when running Go tests, because that's + # not what developers have in their environments and it could break some + # tests; it would be like setting VAULT_TOKEN. However some non-Go + # CI commands, like the UI tests, shouldn't have to worry about licensing. + # So we set VAULT_LICENSE in CI, and here we unset it. Instead of + # VAULT_LICENSE, we populate VAULT_LICENSE_CI, so that tests which want + # an externally supplied license can opt-in to using it. + export VAULT_LICENSE_CI="$VAULT_LICENSE" + VAULT_LICENSE= + + # Create a docker network for our testcontainer + if [ $USE_DOCKER == 1 ]; then + # Despite the fact that we're using a circleci image (thus getting the + # version they chose for the docker cli) and that we're specifying a + # docker version to use for the remote docker instances, we occasionally + # see "client version too new, max supported version 1.39" errors for + # reasons unclear. + export DOCKER_API_VERSION=1.39 + + export TEST_DOCKER_NETWORK_ID=$(docker network list -q -f 'name=vaulttest') + if [ -z $TEST_DOCKER_NETWORK_ID ]; then + TEST_DOCKER_NETWORK_ID=$(docker network create vaulttest) fi - make -C packages*.lock package - name: Compile Package - - run: - command: ls -lahR .buildcache/packages - name: List packages - - save_cache: - paths: - - .buildcache/packages/store - key: package-38343475d76c802dd78fa4bee1dfb98cf2935923-{{checksum ".buildcache/cache-keys/package-38343475d76c802dd78fa4bee1dfb98cf2935923"}} - name: Save package cache + + + # Start a docker testcontainer to run the tests in + docker run -d \ + -e TEST_DOCKER_NETWORK_ID \ + -e GOPRIVATE \ + -e DOCKER_CERT_PATH \ + -e DOCKER_HOST \ + -e DOCKER_MACHINE_NAME \ + -e DOCKER_TLS_VERIFY \ + -e NO_PROXY \ + -e VAULT_TEST_LOG_DIR=/tmp/testlogs \ + --network vaulttest --name \ + testcontainer docker.mirror.hashicorp.services/circleci/golang:1.16.7-buster \ + tail -f /dev/null + + # Run tests + test -d /tmp/go-cache && docker cp /tmp/go-cache testcontainer:/tmp/gocache + docker exec testcontainer sh -c 'mkdir -p /go/src/github.com/hashicorp/vault' + docker cp . testcontainer:/go/src/github.com/hashicorp/vault/ + docker cp $DOCKER_CERT_PATH/ testcontainer:$DOCKER_CERT_PATH + + # Copy the downloaded modules inside the container. + docker exec testcontainer sh -c 'mkdir -p /go/pkg' + docker cp "$(go env GOPATH)/pkg/mod" testcontainer:/go/pkg/mod + + docker exec -w /go/src/github.com/hashicorp/vault/ \ + -e CIRCLECI -e VAULT_CI_GO_TEST_RACE \ + -e GOCACHE=/tmp/gocache \ + -e GO_TAGS \ + -e GOPROXY="off" \ + -e VAULT_LICENSE_CI \ + -e GOARCH=amd64 \ + testcontainer \ + gotestsum --format=short-verbose \ + --junitfile test-results/go-test/results.xml \ + --jsonfile test-results/go-test/results.json \ + -- \ + -tags "${GO_TAGS} ${EXTRA_TAGS}" \ + -timeout=60m \ + -parallel=20 \ + -race \ + ${package_names} + else + GOARCH=amd64 \ + GOCACHE=/tmp/go-cache \ + gotestsum --format=short-verbose \ + --junitfile test-results/go-test/results.xml \ + --jsonfile test-results/go-test/results.json \ + -- \ + -tags "${GO_TAGS} ${EXTRA_TAGS}" \ + -timeout=60m \ + -parallel=20 \ + -race \ + ${package_names} + fi + environment: + GOPRIVATE: github.com/hashicorp/* + name: Run Go tests + no_output_timeout: 60m + - run: + command: | + docker cp testcontainer:/go/src/github.com/hashicorp/vault/test-results . + docker cp testcontainer:/tmp/gocache /tmp/go-cache + name: Copy test results + when: always + - store_artifacts: + path: test-results + - store_test_results: + path: test-results + - store_artifacts: + path: /tmp/testlogs environment: - PACKAGE_SPEC_ID: 38343475d76c802dd78fa4bee1dfb98cf2935923 + - CIRCLECI_CLI_VERSION: 0.1.5546 + - GO_TAGS: '' workflows: - build-4cdca257789ddb0a: + build-34b4dd57b4a937e7: + jobs: + - build-common-layers + - darwin_amd64_package: + requires: + - build-common-layers + - bundle-releases: + requires: + - darwin_amd64_package + - darwin_arm64_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 + - darwin_arm64_package: + requires: + - build-common-layers + - freebsd_386_package: + requires: + - build-common-layers + - freebsd_amd64_package: + requires: + - build-common-layers + - freebsd_arm_package: + requires: + - build-common-layers + - linux_386_package: + requires: + - build-common-layers + - linux_amd64_package: + requires: + - build-common-layers + - linux_arm_package: + requires: + - build-common-layers + - linux_arm64_package: + requires: + - build-common-layers + - netbsd_386_package: + requires: + - build-common-layers + - netbsd_amd64_package: + requires: + - build-common-layers + - openbsd_386_package: + requires: + - build-common-layers + - openbsd_amd64_package: + requires: + - build-common-layers + - solaris_amd64_package: + requires: + - build-common-layers + - windows_386_package: + requires: + - build-common-layers + - windows_amd64_package: + requires: + - build-common-layers + ci: jobs: - - build-common-layers: {} - - darwin_amd64_package: - requires: - - build-common-layers - - bundle-releases: - requires: - - darwin_amd64_package - - darwin_arm64_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 - - darwin_arm64_package: - requires: - - build-common-layers - - freebsd_386_package: - requires: - - build-common-layers - - freebsd_amd64_package: - requires: - - build-common-layers - - freebsd_arm_package: - requires: - - build-common-layers - - linux_386_package: - requires: - - build-common-layers - - linux_amd64_package: - requires: - - build-common-layers - - linux_arm_package: - requires: - - build-common-layers - - linux_arm64_package: - requires: - - build-common-layers - - netbsd_386_package: - requires: - - build-common-layers - - netbsd_amd64_package: - requires: - - build-common-layers - - openbsd_386_package: - requires: - - build-common-layers - - openbsd_amd64_package: - requires: - - build-common-layers - - solaris_amd64_package: - requires: - - build-common-layers - - windows_386_package: - requires: - - build-common-layers - - windows_amd64_package: - requires: - - build-common-layers + - 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: + - pre-flight-checks + - test-go-remote-docker: + requires: + - pre-flight-checks + - test-go-race: + filters: + branches: + ignore: + - /^docs\/.*/ + - /^ui\/.*/ + requires: + - pre-flight-checks + - test-go-race-remote-docker: + filters: + branches: + ignore: + - /^docs\/.*/ + - /^ui\/.*/ + requires: + - pre-flight-checks + - website-docker-image: + filters: + branches: + only: + - main + context: vault-docs + - algolia-index: + filters: + branches: + only: + - stable-website + context: vault-docs + version: 2