Files
threshold/.circleci/config.yml
T

1652 lines
66 KiB
YAML
Generated

### ***
### WARNING: DO NOT manually EDIT or MERGE this file, it is generated by 'make ci-config'.
### INSTEAD: Edit or merge the source in config/ then run 'make ci-config'.
### ***
# Orb 'circleci/slack@3.4.2' resolved to 'circleci/slack@3.4.2'
version: 2
jobs:
test-sql-13-alpine:
machine:
image: ubuntu-2004:202107-02
resource_class: medium
working_directory: ~/boundary
steps:
- checkout
- run:
command: |
make test-sql POSTGRES_DOCKER_IMAGE_BASE=docker.mirror.hashicorp.services/postgres PG_DOCKER_TAG=13-alpine
name: Run SQL PgTap Tests
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-fa8840f2e78bfa9c58d242426d80f4e30464516f-{{checksum ".buildcache/cache-keys/package-fa8840f2e78bfa9c58d242426d80f4e30464516f"}}
name: Restore package cache
- restore_cache:
key: package-110a848ce5db07e7fc389430350c45261d2d7baa-{{checksum ".buildcache/cache-keys/package-110a848ce5db07e7fc389430350c45261d2d7baa"}}
name: Restore package cache
- restore_cache:
key: package-36032b26f94d618cdc87dcb7ac3b4eb820a4ab6d-{{checksum ".buildcache/cache-keys/package-36032b26f94d618cdc87dcb7ac3b4eb820a4ab6d"}}
name: Restore package cache
- restore_cache:
key: package-0922d907d014ef141526a2a3b9d54a3940adcbf3-{{checksum ".buildcache/cache-keys/package-0922d907d014ef141526a2a3b9d54a3940adcbf3"}}
name: Restore package cache
- restore_cache:
key: package-ccb0599d3f5653d5bf75173f87d906156ebf1e3d-{{checksum ".buildcache/cache-keys/package-ccb0599d3f5653d5bf75173f87d906156ebf1e3d"}}
name: Restore package cache
- restore_cache:
key: package-bced2a380b5354bba95ec9da4a54d06bc0a9b56d-{{checksum ".buildcache/cache-keys/package-bced2a380b5354bba95ec9da4a54d06bc0a9b56d"}}
name: Restore package cache
- restore_cache:
key: package-9cdfa7cc4f940bdb711b3e4c05e23a771d7ce29f-{{checksum ".buildcache/cache-keys/package-9cdfa7cc4f940bdb711b3e4c05e23a771d7ce29f"}}
name: Restore package cache
- restore_cache:
key: package-6c8214c1a10a7f53964bfb8d2688cadbe8c6b9e4-{{checksum ".buildcache/cache-keys/package-6c8214c1a10a7f53964bfb8d2688cadbe8c6b9e4"}}
name: Restore package cache
- restore_cache:
key: package-276415ef2d0ac06fb080dd55910bb71613f9c049-{{checksum ".buildcache/cache-keys/package-276415ef2d0ac06fb080dd55910bb71613f9c049"}}
name: Restore package cache
- restore_cache:
key: package-224e22a10a66af47d1f9468e0ca6c68f2a252599-{{checksum ".buildcache/cache-keys/package-224e22a10a66af47d1f9468e0ca6c68f2a252599"}}
name: Restore package cache
- restore_cache:
key: package-b971c9df855df00922afb57baeda53f399318c79-{{checksum ".buildcache/cache-keys/package-b971c9df855df00922afb57baeda53f399318c79"}}
name: Restore package cache
- restore_cache:
key: package-1c8250fee830f8fac2364e7d3e3f82ee5832983e-{{checksum ".buildcache/cache-keys/package-1c8250fee830f8fac2364e7d3e3f82ee5832983e"}}
name: Restore package cache
- restore_cache:
key: package-a8981b00f8f6bce3fb156f73b58c4e33fe077876-{{checksum ".buildcache/cache-keys/package-a8981b00f8f6bce3fb156f73b58c4e33fe077876"}}
name: Restore package cache
- restore_cache:
key: package-ee6ae4147a76888401e2032a2fee0926ef36ad00-{{checksum ".buildcache/cache-keys/package-ee6ae4147a76888401e2032a2fee0926ef36ad00"}}
name: Restore package cache
- restore_cache:
key: package-e3454f0b7ee22d489b83f6daf78d545f4878a79c-{{checksum ".buildcache/cache-keys/package-e3454f0b7ee22d489b83f6daf78d545f4878a79c"}}
name: Restore package cache
- restore_cache:
key: package-d92fb1003c4ac9e95b86d700d64bf54b76e6fef5-{{checksum ".buildcache/cache-keys/package-d92fb1003c4ac9e95b86d700d64bf54b76e6fef5"}}
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-87386c0c55d5c61a.yml
name: Update Lockfile Name
- run:
command: tar -czf packages-87386c0c55d5c61a.tar.gz .buildcache/packages lockfile-87386c0c55d5c61a.yml
name: Create Raw Package Tarball
- run:
command: tar -czf meta-87386c0c55d5c61a.tar.gz .buildcache/packages/store/*.json lockfile-87386c0c55d5c61a.yml
name: Create Metadata Tarball
- store_artifacts:
path: lockfile-87386c0c55d5c61a.yml
- store_artifacts:
path: packages-87386c0c55d5c61a.tar.gz
- store_artifacts:
path: meta-87386c0c55d5c61a.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: fa8840f2e78bfa9c58d242426d80f4e30464516f
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-fa8840f2e78bfa9c58d242426d80f4e30464516f-{{checksum ".buildcache/cache-keys/package-fa8840f2e78bfa9c58d242426d80f4e30464516f"}}
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_5c01_{{checksum ".buildcache/cache-keys/copy-source-5c01da64a31c9bfe7ba38f51d95e8bf99c0842f5"}}
keys:
- go-modules_a25c_{{checksum ".buildcache/cache-keys/go-modules-a25cdf16b83859e7e53c8fd5272e4c6b8366e2be"}}
- ui_7d0e_{{checksum ".buildcache/cache-keys/ui-7d0eb4b8e23fd3d22cf70da1dff7e4359673ce05"}}
- base_849b_{{checksum ".buildcache/cache-keys/base-849b90f357ec2b0e340c99c0a49e883d36073bd9"}}
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_c6969882dc046c39ddac8305e3151c98"
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-fa8840f2e78bfa9c58d242426d80f4e30464516f-{{checksum ".buildcache/cache-keys/package-fa8840f2e78bfa9c58d242426d80f4e30464516f"}}
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: 110a848ce5db07e7fc389430350c45261d2d7baa
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-110a848ce5db07e7fc389430350c45261d2d7baa-{{checksum ".buildcache/cache-keys/package-110a848ce5db07e7fc389430350c45261d2d7baa"}}
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_5c01_{{checksum ".buildcache/cache-keys/copy-source-5c01da64a31c9bfe7ba38f51d95e8bf99c0842f5"}}
keys:
- go-modules_a25c_{{checksum ".buildcache/cache-keys/go-modules-a25cdf16b83859e7e53c8fd5272e4c6b8366e2be"}}
- ui_7d0e_{{checksum ".buildcache/cache-keys/ui-7d0eb4b8e23fd3d22cf70da1dff7e4359673ce05"}}
- base_849b_{{checksum ".buildcache/cache-keys/base-849b90f357ec2b0e340c99c0a49e883d36073bd9"}}
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_c6969882dc046c39ddac8305e3151c98"
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-110a848ce5db07e7fc389430350c45261d2d7baa-{{checksum ".buildcache/cache-keys/package-110a848ce5db07e7fc389430350c45261d2d7baa"}}
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: e3454f0b7ee22d489b83f6daf78d545f4878a79c
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-e3454f0b7ee22d489b83f6daf78d545f4878a79c-{{checksum ".buildcache/cache-keys/package-e3454f0b7ee22d489b83f6daf78d545f4878a79c"}}
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_5c01_{{checksum ".buildcache/cache-keys/copy-source-5c01da64a31c9bfe7ba38f51d95e8bf99c0842f5"}}
keys:
- go-modules_a25c_{{checksum ".buildcache/cache-keys/go-modules-a25cdf16b83859e7e53c8fd5272e4c6b8366e2be"}}
- ui_7d0e_{{checksum ".buildcache/cache-keys/ui-7d0eb4b8e23fd3d22cf70da1dff7e4359673ce05"}}
- base_849b_{{checksum ".buildcache/cache-keys/base-849b90f357ec2b0e340c99c0a49e883d36073bd9"}}
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_c6969882dc046c39ddac8305e3151c98"
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-e3454f0b7ee22d489b83f6daf78d545f4878a79c-{{checksum ".buildcache/cache-keys/package-e3454f0b7ee22d489b83f6daf78d545f4878a79c"}}
name: Save package cache
paths:
- .buildcache/packages/store
test-sql-11-alpine:
machine:
image: ubuntu-2004:202107-02
resource_class: medium
working_directory: ~/boundary
steps:
- checkout
- run:
command: |
make test-sql POSTGRES_DOCKER_IMAGE_BASE=docker.mirror.hashicorp.services/postgres PG_DOCKER_TAG=11-alpine
name: Run SQL PgTap Tests
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_5c01_{{checksum ".buildcache/cache-keys/copy-source-5c01da64a31c9bfe7ba38f51d95e8bf99c0842f5"}}
keys:
- go-modules_a25c_{{checksum ".buildcache/cache-keys/go-modules-a25cdf16b83859e7e53c8fd5272e4c6b8366e2be"}}
- ui_7d0e_{{checksum ".buildcache/cache-keys/ui-7d0eb4b8e23fd3d22cf70da1dff7e4359673ce05"}}
- base_849b_{{checksum ".buildcache/cache-keys/base-849b90f357ec2b0e340c99c0a49e883d36073bd9"}}
name: 'Restore Layer Cache: copy-source'
- run:
command: LAYER_SPEC_ID=03-copy-source-5c01da64a31c9bfe7ba38f51d95e8bf99c0842f5 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_c6969882dc046c39ddac8305e3151c98"
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-849b90f357ec2b0e340c99c0a49e883d36073bd9-image
name: Build base layer
- run:
command: |2-
KEYFILE="$HOME/.ssh/id_rsa_c6969882dc046c39ddac8305e3151c98"
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-ui-7d0eb4b8e23fd3d22cf70da1dff7e4359673ce05-image
name: Build ui layer
- run:
command: |2-
KEYFILE="$HOME/.ssh/id_rsa_c6969882dc046c39ddac8305e3151c98"
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-go-modules-a25cdf16b83859e7e53c8fd5272e4c6b8366e2be-image
name: Build go-modules layer
- run:
command: |2-
KEYFILE="$HOME/.ssh/id_rsa_c6969882dc046c39ddac8305e3151c98"
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-copy-source-5c01da64a31c9bfe7ba38f51d95e8bf99c0842f5-image
name: Build copy-source layer
- run:
command: |2-
KEYFILE="$HOME/.ssh/id_rsa_c6969882dc046c39ddac8305e3151c98"
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-copy-source-5c01da64a31c9bfe7ba38f51d95e8bf99c0842f5-save
name: Build copy-source layer
- save_cache:
key: copy-source_5c01_{{checksum ".buildcache/cache-keys/copy-source-5c01da64a31c9bfe7ba38f51d95e8bf99c0842f5"}}
name: 'Save Layer Cache: copy-source'
paths:
- .buildcache/archives/03-copy-source-5c01da64a31c9bfe7ba38f51d95e8bf99c0842f5.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: 276415ef2d0ac06fb080dd55910bb71613f9c049
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-276415ef2d0ac06fb080dd55910bb71613f9c049-{{checksum ".buildcache/cache-keys/package-276415ef2d0ac06fb080dd55910bb71613f9c049"}}
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_5c01_{{checksum ".buildcache/cache-keys/copy-source-5c01da64a31c9bfe7ba38f51d95e8bf99c0842f5"}}
keys:
- go-modules_a25c_{{checksum ".buildcache/cache-keys/go-modules-a25cdf16b83859e7e53c8fd5272e4c6b8366e2be"}}
- ui_7d0e_{{checksum ".buildcache/cache-keys/ui-7d0eb4b8e23fd3d22cf70da1dff7e4359673ce05"}}
- base_849b_{{checksum ".buildcache/cache-keys/base-849b90f357ec2b0e340c99c0a49e883d36073bd9"}}
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_c6969882dc046c39ddac8305e3151c98"
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-276415ef2d0ac06fb080dd55910bb71613f9c049-{{checksum ".buildcache/cache-keys/package-276415ef2d0ac06fb080dd55910bb71613f9c049"}}
name: Save package cache
paths:
- .buildcache/packages/store
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: 6c8214c1a10a7f53964bfb8d2688cadbe8c6b9e4
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-6c8214c1a10a7f53964bfb8d2688cadbe8c6b9e4-{{checksum ".buildcache/cache-keys/package-6c8214c1a10a7f53964bfb8d2688cadbe8c6b9e4"}}
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_5c01_{{checksum ".buildcache/cache-keys/copy-source-5c01da64a31c9bfe7ba38f51d95e8bf99c0842f5"}}
keys:
- go-modules_a25c_{{checksum ".buildcache/cache-keys/go-modules-a25cdf16b83859e7e53c8fd5272e4c6b8366e2be"}}
- ui_7d0e_{{checksum ".buildcache/cache-keys/ui-7d0eb4b8e23fd3d22cf70da1dff7e4359673ce05"}}
- base_849b_{{checksum ".buildcache/cache-keys/base-849b90f357ec2b0e340c99c0a49e883d36073bd9"}}
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_c6969882dc046c39ddac8305e3151c98"
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-6c8214c1a10a7f53964bfb8d2688cadbe8c6b9e4-{{checksum ".buildcache/cache-keys/package-6c8214c1a10a7f53964bfb8d2688cadbe8c6b9e4"}}
name: Save package cache
paths:
- .buildcache/packages/store
algolia-index:
docker:
- image: docker.mirror.hashicorp.services/node:12
steps:
- checkout
- run:
command: |-
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: bced2a380b5354bba95ec9da4a54d06bc0a9b56d
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-bced2a380b5354bba95ec9da4a54d06bc0a9b56d-{{checksum ".buildcache/cache-keys/package-bced2a380b5354bba95ec9da4a54d06bc0a9b56d"}}
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_5c01_{{checksum ".buildcache/cache-keys/copy-source-5c01da64a31c9bfe7ba38f51d95e8bf99c0842f5"}}
keys:
- go-modules_a25c_{{checksum ".buildcache/cache-keys/go-modules-a25cdf16b83859e7e53c8fd5272e4c6b8366e2be"}}
- ui_7d0e_{{checksum ".buildcache/cache-keys/ui-7d0eb4b8e23fd3d22cf70da1dff7e4359673ce05"}}
- base_849b_{{checksum ".buildcache/cache-keys/base-849b90f357ec2b0e340c99c0a49e883d36073bd9"}}
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_c6969882dc046c39ddac8305e3151c98"
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-bced2a380b5354bba95ec9da4a54d06bc0a9b56d-{{checksum ".buildcache/cache-keys/package-bced2a380b5354bba95ec9da4a54d06bc0a9b56d"}}
name: Save package cache
paths:
- .buildcache/packages/store
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: 36032b26f94d618cdc87dcb7ac3b4eb820a4ab6d
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-36032b26f94d618cdc87dcb7ac3b4eb820a4ab6d-{{checksum ".buildcache/cache-keys/package-36032b26f94d618cdc87dcb7ac3b4eb820a4ab6d"}}
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_5c01_{{checksum ".buildcache/cache-keys/copy-source-5c01da64a31c9bfe7ba38f51d95e8bf99c0842f5"}}
keys:
- go-modules_a25c_{{checksum ".buildcache/cache-keys/go-modules-a25cdf16b83859e7e53c8fd5272e4c6b8366e2be"}}
- ui_7d0e_{{checksum ".buildcache/cache-keys/ui-7d0eb4b8e23fd3d22cf70da1dff7e4359673ce05"}}
- base_849b_{{checksum ".buildcache/cache-keys/base-849b90f357ec2b0e340c99c0a49e883d36073bd9"}}
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_c6969882dc046c39ddac8305e3151c98"
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-36032b26f94d618cdc87dcb7ac3b4eb820a4ab6d-{{checksum ".buildcache/cache-keys/package-36032b26f94d618cdc87dcb7ac3b4eb820a4ab6d"}}
name: Save package cache
paths:
- .buildcache/packages/store
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: 0922d907d014ef141526a2a3b9d54a3940adcbf3
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-0922d907d014ef141526a2a3b9d54a3940adcbf3-{{checksum ".buildcache/cache-keys/package-0922d907d014ef141526a2a3b9d54a3940adcbf3"}}
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_5c01_{{checksum ".buildcache/cache-keys/copy-source-5c01da64a31c9bfe7ba38f51d95e8bf99c0842f5"}}
keys:
- go-modules_a25c_{{checksum ".buildcache/cache-keys/go-modules-a25cdf16b83859e7e53c8fd5272e4c6b8366e2be"}}
- ui_7d0e_{{checksum ".buildcache/cache-keys/ui-7d0eb4b8e23fd3d22cf70da1dff7e4359673ce05"}}
- base_849b_{{checksum ".buildcache/cache-keys/base-849b90f357ec2b0e340c99c0a49e883d36073bd9"}}
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_c6969882dc046c39ddac8305e3151c98"
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-0922d907d014ef141526a2a3b9d54a3940adcbf3-{{checksum ".buildcache/cache-keys/package-0922d907d014ef141526a2a3b9d54a3940adcbf3"}}
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:
- AUTO_INSTALL_TOOLS: 'YES'
- BUILDKIT_PROGRESS: plain
- PRODUCT_REVISION: ''
- PACKAGE_SPEC_ID: 1c8250fee830f8fac2364e7d3e3f82ee5832983e
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-1c8250fee830f8fac2364e7d3e3f82ee5832983e-{{checksum ".buildcache/cache-keys/package-1c8250fee830f8fac2364e7d3e3f82ee5832983e"}}
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_5c01_{{checksum ".buildcache/cache-keys/copy-source-5c01da64a31c9bfe7ba38f51d95e8bf99c0842f5"}}
keys:
- go-modules_a25c_{{checksum ".buildcache/cache-keys/go-modules-a25cdf16b83859e7e53c8fd5272e4c6b8366e2be"}}
- ui_7d0e_{{checksum ".buildcache/cache-keys/ui-7d0eb4b8e23fd3d22cf70da1dff7e4359673ce05"}}
- base_849b_{{checksum ".buildcache/cache-keys/base-849b90f357ec2b0e340c99c0a49e883d36073bd9"}}
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_c6969882dc046c39ddac8305e3151c98"
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-1c8250fee830f8fac2364e7d3e3f82ee5832983e-{{checksum ".buildcache/cache-keys/package-1c8250fee830f8fac2364e7d3e3f82ee5832983e"}}
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
environment:
- AUTO_INSTALL_TOOLS: 'YES'
- BUILDKIT_PROGRESS: plain
- PRODUCT_REVISION: ''
- PACKAGE_SPEC_ID: 9cdfa7cc4f940bdb711b3e4c05e23a771d7ce29f
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-9cdfa7cc4f940bdb711b3e4c05e23a771d7ce29f-{{checksum ".buildcache/cache-keys/package-9cdfa7cc4f940bdb711b3e4c05e23a771d7ce29f"}}
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_5c01_{{checksum ".buildcache/cache-keys/copy-source-5c01da64a31c9bfe7ba38f51d95e8bf99c0842f5"}}
keys:
- go-modules_a25c_{{checksum ".buildcache/cache-keys/go-modules-a25cdf16b83859e7e53c8fd5272e4c6b8366e2be"}}
- ui_7d0e_{{checksum ".buildcache/cache-keys/ui-7d0eb4b8e23fd3d22cf70da1dff7e4359673ce05"}}
- base_849b_{{checksum ".buildcache/cache-keys/base-849b90f357ec2b0e340c99c0a49e883d36073bd9"}}
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_c6969882dc046c39ddac8305e3151c98"
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-9cdfa7cc4f940bdb711b3e4c05e23a771d7ce29f-{{checksum ".buildcache/cache-keys/package-9cdfa7cc4f940bdb711b3e4c05e23a771d7ce29f"}}
name: Save package cache
paths:
- .buildcache/packages/store
test-sql-12-alpine:
machine:
image: ubuntu-2004:202107-02
resource_class: medium
working_directory: ~/boundary
steps:
- checkout
- run:
command: |
make test-sql POSTGRES_DOCKER_IMAGE_BASE=docker.mirror.hashicorp.services/postgres PG_DOCKER_TAG=12-alpine
name: Run SQL PgTap Tests
solaris_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: ee6ae4147a76888401e2032a2fee0926ef36ad00
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-ee6ae4147a76888401e2032a2fee0926ef36ad00-{{checksum ".buildcache/cache-keys/package-ee6ae4147a76888401e2032a2fee0926ef36ad00"}}
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_5c01_{{checksum ".buildcache/cache-keys/copy-source-5c01da64a31c9bfe7ba38f51d95e8bf99c0842f5"}}
keys:
- go-modules_a25c_{{checksum ".buildcache/cache-keys/go-modules-a25cdf16b83859e7e53c8fd5272e4c6b8366e2be"}}
- ui_7d0e_{{checksum ".buildcache/cache-keys/ui-7d0eb4b8e23fd3d22cf70da1dff7e4359673ce05"}}
- base_849b_{{checksum ".buildcache/cache-keys/base-849b90f357ec2b0e340c99c0a49e883d36073bd9"}}
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_c6969882dc046c39ddac8305e3151c98"
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-ee6ae4147a76888401e2032a2fee0926ef36ad00-{{checksum ".buildcache/cache-keys/package-ee6ae4147a76888401e2032a2fee0926ef36ad00"}}
name: Save package cache
paths:
- .buildcache/packages/store
build:
machine:
image: ubuntu-2004:202107-02
resource_class: large
working_directory: ~/boundary
steps:
- checkout
- run:
command: |
which pg_isready || sudo apt-get update && sudo apt-get install -y postgresql-client
make DOCKER_ARGS='-d' -C testing/dbtest/docker database-up
until pg_isready -h 127.0.0.1; do docker container inspect boundary-sql-tests &> /dev/null || exit -1; sleep 1; done
name: Initialize Test Database
- run:
command: |
make test-ci
name: Run Acceptance Tests
no_output_timeout: 15m
- run:
command: |
make -C testing/dbtest/docker clean
name: Cleanup
when: always
- run:
command: |
echo 'export SLACK_BUILD_STATUS="fail"' >> $BASH_ENV
name: Slack - Setting Failure Condition
when: on_fail
- run:
command: |
echo 'export SLACK_BUILD_STATUS="success"' >> $BASH_ENV
name: Slack - Setting Success Condition
when: on_success
- run:
command: |
if [ ! -x /bin/bash ]; then
echo Bash not installed.
exit 1
fi
name: Provide error if non-bash shell
- run:
command: |
current_branch_in_filter=false
IFS="," read -ra BRANCH_FILTERS <<< "master"
for i in "${BRANCH_FILTERS[@]}"; do
if [ "${i}" == "${CIRCLE_BRANCH}" ]; then
current_branch_in_filter=true
fi
done
if [ "x" == "xmaster" ] || [ "$current_branch_in_filter" = true ]; then
# Provide error if no webhook is set and error. Otherwise continue
if [ -z "webhook" ]; then
echo "NO SLACK WEBHOOK SET"
echo "Please input your SLACK_WEBHOOK value either in the settings for this project, or as a parameter for this orb."
exit 1
else
#Create Members string
if [ -n "" ]; then
IFS="," read -ra SLACK_MEMBERS <<< ""
for i in "${SLACK_MEMBERS[@]}"; do
if [ $(echo ${i} | head -c 1) == "S" ]; then
SLACK_MENTIONS="${SLACK_MENTIONS}<!subteam^${i}> "
elif echo ${i} | grep -E "^(here|channel|everyone)$" > /dev/null; then
SLACK_MENTIONS="${SLACK_MENTIONS}<!${i}> "
else
SLACK_MENTIONS="${SLACK_MENTIONS}<@${i}> "
fi
done
fi
#If successful
if [ "$SLACK_BUILD_STATUS" = "success" ]; then
#Skip if fail_only
if [ true = true ]; then
echo "The job completed successfully"
echo '"fail_only" is set to "true". No Slack notification sent.'
else
curl -X POST -H 'Content-type: application/json' \
--data "{ \
\"attachments\": [ \
{ \
\"fallback\": \":tada: A $CIRCLE_JOB job has succeeded!\", \
\"text\": \":tada: A $CIRCLE_JOB job has succeeded! $SLACK_MENTIONS\", \
\"fields\": [ \
{ \
\"title\": \"Project\", \
\"value\": \"$CIRCLE_PROJECT_REPONAME\", \
\"short\": true \
}, \
{ \
\"title\": \"Job Number\", \
\"value\": \"$CIRCLE_BUILD_NUM\", \
\"short\": true \
} \
], \
\"actions\": [ \
{ \
\"type\": \"button\", \
\"text\": \"Visit Job\", \
\"url\": \"$CIRCLE_BUILD_URL\" \
} \
], \
\"color\": \"#1CBF43\" \
} \
] \
} " webhook
echo "Job completed successfully. Alert sent."
fi
else
#If Failed
curl -X POST -H 'Content-type: application/json' \
--data "{ \
\"attachments\": [ \
{ \
\"fallback\": \":red_circle: A $CIRCLE_JOB job has failed!\", \
\"text\": \":red_circle: A $CIRCLE_JOB job has failed! $SLACK_MENTIONS\", \
\"fields\": [ \
{ \
\"title\": \"Project\", \
\"value\": \"$CIRCLE_PROJECT_REPONAME\", \
\"short\": true \
}, \
{ \
\"title\": \"Job Number\", \
\"value\": \"$CIRCLE_BUILD_NUM\", \
\"short\": true \
} \
], \
\"actions\": [ \
{ \
\"type\": \"button\", \
\"text\": \"Visit Job\", \
\"url\": \"$CIRCLE_BUILD_URL\" \
} \
], \
\"color\": \"#ed5c5c\" \
} \
] \
} " webhook
echo "Job failed. Alert sent."
fi
fi
else
echo "Current branch is not included in only_for_branches filter; no status alert will be sent"
fi
name: Slack - Sending Status Alert
shell: /bin/bash
when: always
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: b971c9df855df00922afb57baeda53f399318c79
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-b971c9df855df00922afb57baeda53f399318c79-{{checksum ".buildcache/cache-keys/package-b971c9df855df00922afb57baeda53f399318c79"}}
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_5c01_{{checksum ".buildcache/cache-keys/copy-source-5c01da64a31c9bfe7ba38f51d95e8bf99c0842f5"}}
keys:
- go-modules_a25c_{{checksum ".buildcache/cache-keys/go-modules-a25cdf16b83859e7e53c8fd5272e4c6b8366e2be"}}
- ui_7d0e_{{checksum ".buildcache/cache-keys/ui-7d0eb4b8e23fd3d22cf70da1dff7e4359673ce05"}}
- base_849b_{{checksum ".buildcache/cache-keys/base-849b90f357ec2b0e340c99c0a49e883d36073bd9"}}
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_c6969882dc046c39ddac8305e3151c98"
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-b971c9df855df00922afb57baeda53f399318c79-{{checksum ".buildcache/cache-keys/package-b971c9df855df00922afb57baeda53f399318c79"}}
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:
- AUTO_INSTALL_TOOLS: 'YES'
- BUILDKIT_PROGRESS: plain
- PRODUCT_REVISION: ''
- PACKAGE_SPEC_ID: a8981b00f8f6bce3fb156f73b58c4e33fe077876
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-a8981b00f8f6bce3fb156f73b58c4e33fe077876-{{checksum ".buildcache/cache-keys/package-a8981b00f8f6bce3fb156f73b58c4e33fe077876"}}
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_5c01_{{checksum ".buildcache/cache-keys/copy-source-5c01da64a31c9bfe7ba38f51d95e8bf99c0842f5"}}
keys:
- go-modules_a25c_{{checksum ".buildcache/cache-keys/go-modules-a25cdf16b83859e7e53c8fd5272e4c6b8366e2be"}}
- ui_7d0e_{{checksum ".buildcache/cache-keys/ui-7d0eb4b8e23fd3d22cf70da1dff7e4359673ce05"}}
- base_849b_{{checksum ".buildcache/cache-keys/base-849b90f357ec2b0e340c99c0a49e883d36073bd9"}}
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_c6969882dc046c39ddac8305e3151c98"
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-a8981b00f8f6bce3fb156f73b58c4e33fe077876-{{checksum ".buildcache/cache-keys/package-a8981b00f8f6bce3fb156f73b58c4e33fe077876"}}
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:
- AUTO_INSTALL_TOOLS: 'YES'
- BUILDKIT_PROGRESS: plain
- PRODUCT_REVISION: ''
- PACKAGE_SPEC_ID: 224e22a10a66af47d1f9468e0ca6c68f2a252599
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-224e22a10a66af47d1f9468e0ca6c68f2a252599-{{checksum ".buildcache/cache-keys/package-224e22a10a66af47d1f9468e0ca6c68f2a252599"}}
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_5c01_{{checksum ".buildcache/cache-keys/copy-source-5c01da64a31c9bfe7ba38f51d95e8bf99c0842f5"}}
keys:
- go-modules_a25c_{{checksum ".buildcache/cache-keys/go-modules-a25cdf16b83859e7e53c8fd5272e4c6b8366e2be"}}
- ui_7d0e_{{checksum ".buildcache/cache-keys/ui-7d0eb4b8e23fd3d22cf70da1dff7e4359673ce05"}}
- base_849b_{{checksum ".buildcache/cache-keys/base-849b90f357ec2b0e340c99c0a49e883d36073bd9"}}
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_c6969882dc046c39ddac8305e3151c98"
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-224e22a10a66af47d1f9468e0ca6c68f2a252599-{{checksum ".buildcache/cache-keys/package-224e22a10a66af47d1f9468e0ca6c68f2a252599"}}
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:
- AUTO_INSTALL_TOOLS: 'YES'
- BUILDKIT_PROGRESS: plain
- PRODUCT_REVISION: ''
- PACKAGE_SPEC_ID: ccb0599d3f5653d5bf75173f87d906156ebf1e3d
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-ccb0599d3f5653d5bf75173f87d906156ebf1e3d-{{checksum ".buildcache/cache-keys/package-ccb0599d3f5653d5bf75173f87d906156ebf1e3d"}}
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_5c01_{{checksum ".buildcache/cache-keys/copy-source-5c01da64a31c9bfe7ba38f51d95e8bf99c0842f5"}}
keys:
- go-modules_a25c_{{checksum ".buildcache/cache-keys/go-modules-a25cdf16b83859e7e53c8fd5272e4c6b8366e2be"}}
- ui_7d0e_{{checksum ".buildcache/cache-keys/ui-7d0eb4b8e23fd3d22cf70da1dff7e4359673ce05"}}
- base_849b_{{checksum ".buildcache/cache-keys/base-849b90f357ec2b0e340c99c0a49e883d36073bd9"}}
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_c6969882dc046c39ddac8305e3151c98"
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-ccb0599d3f5653d5bf75173f87d906156ebf1e3d-{{checksum ".buildcache/cache-keys/package-ccb0599d3f5653d5bf75173f87d906156ebf1e3d"}}
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:
- AUTO_INSTALL_TOOLS: 'YES'
- BUILDKIT_PROGRESS: plain
- PRODUCT_REVISION: ''
- PACKAGE_SPEC_ID: d92fb1003c4ac9e95b86d700d64bf54b76e6fef5
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-d92fb1003c4ac9e95b86d700d64bf54b76e6fef5-{{checksum ".buildcache/cache-keys/package-d92fb1003c4ac9e95b86d700d64bf54b76e6fef5"}}
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_5c01_{{checksum ".buildcache/cache-keys/copy-source-5c01da64a31c9bfe7ba38f51d95e8bf99c0842f5"}}
keys:
- go-modules_a25c_{{checksum ".buildcache/cache-keys/go-modules-a25cdf16b83859e7e53c8fd5272e4c6b8366e2be"}}
- ui_7d0e_{{checksum ".buildcache/cache-keys/ui-7d0eb4b8e23fd3d22cf70da1dff7e4359673ce05"}}
- base_849b_{{checksum ".buildcache/cache-keys/base-849b90f357ec2b0e340c99c0a49e883d36073bd9"}}
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_c6969882dc046c39ddac8305e3151c98"
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-d92fb1003c4ac9e95b86d700d64bf54b76e6fef5-{{checksum ".buildcache/cache-keys/package-d92fb1003c4ac9e95b86d700d64bf54b76e6fef5"}}
name: Save package cache
paths:
- .buildcache/packages/store
test-sql-latest:
machine:
image: ubuntu-2004:202107-02
resource_class: medium
working_directory: ~/boundary
steps:
- checkout
- run:
command: |
make test-sql POSTGRES_DOCKER_IMAGE_BASE=docker.mirror.hashicorp.services/postgres PG_DOCKER_TAG=latest
name: Run SQL PgTap Tests
workflows:
build-87386c0c55d5c61a:
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
- test-sql-latest
- test-sql-11-alpine
- test-sql-12-alpine
- test-sql-13-alpine
- algolia-index:
filters:
branches:
only:
- stable-website
version: 2