Files
threshold/.circleci/config.yml
T

1726 lines
68 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-e02d359f8511c4069469b2a1a978328a6af3e619-{{checksum ".buildcache/cache-keys/package-e02d359f8511c4069469b2a1a978328a6af3e619"}}
name: Restore package cache
- restore_cache:
key: package-2f0053fd864a309e95669addd6fbb1b9d742d711-{{checksum ".buildcache/cache-keys/package-2f0053fd864a309e95669addd6fbb1b9d742d711"}}
name: Restore package cache
- restore_cache:
key: package-4c4040ca3a01808df5667f3fd51689850bc6a7f6-{{checksum ".buildcache/cache-keys/package-4c4040ca3a01808df5667f3fd51689850bc6a7f6"}}
name: Restore package cache
- restore_cache:
key: package-5eadd13cf1bd4e361cef8092d76b58d01d9f579f-{{checksum ".buildcache/cache-keys/package-5eadd13cf1bd4e361cef8092d76b58d01d9f579f"}}
name: Restore package cache
- restore_cache:
key: package-61bb0bc62d4537b3c359326ed9fd5950dc8715fb-{{checksum ".buildcache/cache-keys/package-61bb0bc62d4537b3c359326ed9fd5950dc8715fb"}}
name: Restore package cache
- restore_cache:
key: package-47cee347702f2a691f0a2ab28701dbf58430e4e0-{{checksum ".buildcache/cache-keys/package-47cee347702f2a691f0a2ab28701dbf58430e4e0"}}
name: Restore package cache
- restore_cache:
key: package-68e35d768281e33c871fdca37d2bd7febc317567-{{checksum ".buildcache/cache-keys/package-68e35d768281e33c871fdca37d2bd7febc317567"}}
name: Restore package cache
- restore_cache:
key: package-136f0b0f3e0f6fac055ceabbd601f3cbb98ca433-{{checksum ".buildcache/cache-keys/package-136f0b0f3e0f6fac055ceabbd601f3cbb98ca433"}}
name: Restore package cache
- restore_cache:
key: package-1dfbca7451d822e57de03ac1f5c0d806f0c6ebc3-{{checksum ".buildcache/cache-keys/package-1dfbca7451d822e57de03ac1f5c0d806f0c6ebc3"}}
name: Restore package cache
- restore_cache:
key: package-30342e8715fcd87884930530e628a8727fe6959b-{{checksum ".buildcache/cache-keys/package-30342e8715fcd87884930530e628a8727fe6959b"}}
name: Restore package cache
- restore_cache:
key: package-e446fa960c44cd16d7263a383f6215bc26dc5e72-{{checksum ".buildcache/cache-keys/package-e446fa960c44cd16d7263a383f6215bc26dc5e72"}}
name: Restore package cache
- restore_cache:
key: package-80927b28c6a4f64077f9e4ef785992bf2a87fea6-{{checksum ".buildcache/cache-keys/package-80927b28c6a4f64077f9e4ef785992bf2a87fea6"}}
name: Restore package cache
- restore_cache:
key: package-49ae1ef3a65694d36cf63a0625fae61481b213f7-{{checksum ".buildcache/cache-keys/package-49ae1ef3a65694d36cf63a0625fae61481b213f7"}}
name: Restore package cache
- restore_cache:
key: package-77e210c1416e80febe102d7df189c89688b78473-{{checksum ".buildcache/cache-keys/package-77e210c1416e80febe102d7df189c89688b78473"}}
name: Restore package cache
- restore_cache:
key: package-ea79a0beb1c0104eb42f067c033bc0aa549b2003-{{checksum ".buildcache/cache-keys/package-ea79a0beb1c0104eb42f067c033bc0aa549b2003"}}
name: Restore package cache
- restore_cache:
key: package-859af90cedc51a2a575e0a3c0bf0cad13af85dd1-{{checksum ".buildcache/cache-keys/package-859af90cedc51a2a575e0a3c0bf0cad13af85dd1"}}
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-d812e23b6b7c0d83.yml
name: Update Lockfile Name
- run:
command: tar -czf packages-d812e23b6b7c0d83.tar.gz .buildcache/packages lockfile-d812e23b6b7c0d83.yml
name: Create Raw Package Tarball
- run:
command: tar -czf meta-d812e23b6b7c0d83.tar.gz .buildcache/packages/store/*.json lockfile-d812e23b6b7c0d83.yml
name: Create Metadata Tarball
- store_artifacts:
path: lockfile-d812e23b6b7c0d83.yml
- store_artifacts:
path: packages-d812e23b6b7c0d83.tar.gz
- store_artifacts:
path: meta-d812e23b6b7c0d83.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: e02d359f8511c4069469b2a1a978328a6af3e619
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-e02d359f8511c4069469b2a1a978328a6af3e619-{{checksum ".buildcache/cache-keys/package-e02d359f8511c4069469b2a1a978328a6af3e619"}}
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_2180_{{checksum ".buildcache/cache-keys/copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d"}}
keys:
- go-modules_3b7f_{{checksum ".buildcache/cache-keys/go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445"}}
- ui_00aa_{{checksum ".buildcache/cache-keys/ui-00aac246fd625f14356db52ed98a657e40b02a82"}}
- base_4efc_{{checksum ".buildcache/cache-keys/base-4efc6b999f22c2117dd52d796786af51dd4d4d1f"}}
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-e02d359f8511c4069469b2a1a978328a6af3e619-{{checksum ".buildcache/cache-keys/package-e02d359f8511c4069469b2a1a978328a6af3e619"}}
name: Save package cache
paths:
- .buildcache/packages/store
test-api:
machine:
image: ubuntu-2004:202107-02
resource_class: medium
working_directory: ~/boundary
steps:
- checkout
- run:
command: |
make install-go
source ~/.bashrc
echo 'export GOROOT=$GOROOT' >> "$BASH_ENV"
echo 'export GOPATH=$GOPATH' >> "$BASH_ENV"
echo 'export PATH=$PATH' >> "$BASH_ENV"
echo "$ go version"
go version
name: Install go
- run:
command: |
make test-api
name: Run API Tests
no_output_timeout: 15m
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: 2f0053fd864a309e95669addd6fbb1b9d742d711
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-2f0053fd864a309e95669addd6fbb1b9d742d711-{{checksum ".buildcache/cache-keys/package-2f0053fd864a309e95669addd6fbb1b9d742d711"}}
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_2180_{{checksum ".buildcache/cache-keys/copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d"}}
keys:
- go-modules_3b7f_{{checksum ".buildcache/cache-keys/go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445"}}
- ui_00aa_{{checksum ".buildcache/cache-keys/ui-00aac246fd625f14356db52ed98a657e40b02a82"}}
- base_4efc_{{checksum ".buildcache/cache-keys/base-4efc6b999f22c2117dd52d796786af51dd4d4d1f"}}
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-2f0053fd864a309e95669addd6fbb1b9d742d711-{{checksum ".buildcache/cache-keys/package-2f0053fd864a309e95669addd6fbb1b9d742d711"}}
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: ea79a0beb1c0104eb42f067c033bc0aa549b2003
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-ea79a0beb1c0104eb42f067c033bc0aa549b2003-{{checksum ".buildcache/cache-keys/package-ea79a0beb1c0104eb42f067c033bc0aa549b2003"}}
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_2180_{{checksum ".buildcache/cache-keys/copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d"}}
keys:
- go-modules_3b7f_{{checksum ".buildcache/cache-keys/go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445"}}
- ui_00aa_{{checksum ".buildcache/cache-keys/ui-00aac246fd625f14356db52ed98a657e40b02a82"}}
- base_4efc_{{checksum ".buildcache/cache-keys/base-4efc6b999f22c2117dd52d796786af51dd4d4d1f"}}
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-ea79a0beb1c0104eb42f067c033bc0aa549b2003-{{checksum ".buildcache/cache-keys/package-ea79a0beb1c0104eb42f067c033bc0aa549b2003"}}
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_2180_{{checksum ".buildcache/cache-keys/copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d"}}
keys:
- go-modules_3b7f_{{checksum ".buildcache/cache-keys/go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445"}}
- ui_00aa_{{checksum ".buildcache/cache-keys/ui-00aac246fd625f14356db52ed98a657e40b02a82"}}
- base_4efc_{{checksum ".buildcache/cache-keys/base-4efc6b999f22c2117dd52d796786af51dd4d4d1f"}}
name: 'Restore Layer Cache: copy-source'
- run:
command: LAYER_SPEC_ID=03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d 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-4efc6b999f22c2117dd52d796786af51dd4d4d1f-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-00aac246fd625f14356db52ed98a657e40b02a82-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-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445-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-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d-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-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d-save
name: Build copy-source layer
- save_cache:
key: copy-source_2180_{{checksum ".buildcache/cache-keys/copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d"}}
name: 'Save Layer Cache: copy-source'
paths:
- .buildcache/archives/03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d.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: 1dfbca7451d822e57de03ac1f5c0d806f0c6ebc3
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-1dfbca7451d822e57de03ac1f5c0d806f0c6ebc3-{{checksum ".buildcache/cache-keys/package-1dfbca7451d822e57de03ac1f5c0d806f0c6ebc3"}}
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_2180_{{checksum ".buildcache/cache-keys/copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d"}}
keys:
- go-modules_3b7f_{{checksum ".buildcache/cache-keys/go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445"}}
- ui_00aa_{{checksum ".buildcache/cache-keys/ui-00aac246fd625f14356db52ed98a657e40b02a82"}}
- base_4efc_{{checksum ".buildcache/cache-keys/base-4efc6b999f22c2117dd52d796786af51dd4d4d1f"}}
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-1dfbca7451d822e57de03ac1f5c0d806f0c6ebc3-{{checksum ".buildcache/cache-keys/package-1dfbca7451d822e57de03ac1f5c0d806f0c6ebc3"}}
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: 136f0b0f3e0f6fac055ceabbd601f3cbb98ca433
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-136f0b0f3e0f6fac055ceabbd601f3cbb98ca433-{{checksum ".buildcache/cache-keys/package-136f0b0f3e0f6fac055ceabbd601f3cbb98ca433"}}
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_2180_{{checksum ".buildcache/cache-keys/copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d"}}
keys:
- go-modules_3b7f_{{checksum ".buildcache/cache-keys/go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445"}}
- ui_00aa_{{checksum ".buildcache/cache-keys/ui-00aac246fd625f14356db52ed98a657e40b02a82"}}
- base_4efc_{{checksum ".buildcache/cache-keys/base-4efc6b999f22c2117dd52d796786af51dd4d4d1f"}}
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-136f0b0f3e0f6fac055ceabbd601f3cbb98ca433-{{checksum ".buildcache/cache-keys/package-136f0b0f3e0f6fac055ceabbd601f3cbb98ca433"}}
name: Save package cache
paths:
- .buildcache/packages/store
test-sdk:
machine:
image: ubuntu-2004:202107-02
resource_class: medium
working_directory: ~/boundary
steps:
- checkout
- run:
command: |
make install-go
source ~/.bashrc
echo 'export GOROOT=$GOROOT' >> "$BASH_ENV"
echo 'export GOPATH=$GOPATH' >> "$BASH_ENV"
echo 'export PATH=$PATH' >> "$BASH_ENV"
echo "$ go version"
go version
name: Install go
- run:
command: |
make test-sdk
name: Run SDK Tests
no_output_timeout: 15m
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: 47cee347702f2a691f0a2ab28701dbf58430e4e0
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-47cee347702f2a691f0a2ab28701dbf58430e4e0-{{checksum ".buildcache/cache-keys/package-47cee347702f2a691f0a2ab28701dbf58430e4e0"}}
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_2180_{{checksum ".buildcache/cache-keys/copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d"}}
keys:
- go-modules_3b7f_{{checksum ".buildcache/cache-keys/go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445"}}
- ui_00aa_{{checksum ".buildcache/cache-keys/ui-00aac246fd625f14356db52ed98a657e40b02a82"}}
- base_4efc_{{checksum ".buildcache/cache-keys/base-4efc6b999f22c2117dd52d796786af51dd4d4d1f"}}
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-47cee347702f2a691f0a2ab28701dbf58430e4e0-{{checksum ".buildcache/cache-keys/package-47cee347702f2a691f0a2ab28701dbf58430e4e0"}}
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: 4c4040ca3a01808df5667f3fd51689850bc6a7f6
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-4c4040ca3a01808df5667f3fd51689850bc6a7f6-{{checksum ".buildcache/cache-keys/package-4c4040ca3a01808df5667f3fd51689850bc6a7f6"}}
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_2180_{{checksum ".buildcache/cache-keys/copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d"}}
keys:
- go-modules_3b7f_{{checksum ".buildcache/cache-keys/go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445"}}
- ui_00aa_{{checksum ".buildcache/cache-keys/ui-00aac246fd625f14356db52ed98a657e40b02a82"}}
- base_4efc_{{checksum ".buildcache/cache-keys/base-4efc6b999f22c2117dd52d796786af51dd4d4d1f"}}
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-4c4040ca3a01808df5667f3fd51689850bc6a7f6-{{checksum ".buildcache/cache-keys/package-4c4040ca3a01808df5667f3fd51689850bc6a7f6"}}
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: 5eadd13cf1bd4e361cef8092d76b58d01d9f579f
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-5eadd13cf1bd4e361cef8092d76b58d01d9f579f-{{checksum ".buildcache/cache-keys/package-5eadd13cf1bd4e361cef8092d76b58d01d9f579f"}}
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_2180_{{checksum ".buildcache/cache-keys/copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d"}}
keys:
- go-modules_3b7f_{{checksum ".buildcache/cache-keys/go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445"}}
- ui_00aa_{{checksum ".buildcache/cache-keys/ui-00aac246fd625f14356db52ed98a657e40b02a82"}}
- base_4efc_{{checksum ".buildcache/cache-keys/base-4efc6b999f22c2117dd52d796786af51dd4d4d1f"}}
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-5eadd13cf1bd4e361cef8092d76b58d01d9f579f-{{checksum ".buildcache/cache-keys/package-5eadd13cf1bd4e361cef8092d76b58d01d9f579f"}}
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: 80927b28c6a4f64077f9e4ef785992bf2a87fea6
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-80927b28c6a4f64077f9e4ef785992bf2a87fea6-{{checksum ".buildcache/cache-keys/package-80927b28c6a4f64077f9e4ef785992bf2a87fea6"}}
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_2180_{{checksum ".buildcache/cache-keys/copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d"}}
keys:
- go-modules_3b7f_{{checksum ".buildcache/cache-keys/go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445"}}
- ui_00aa_{{checksum ".buildcache/cache-keys/ui-00aac246fd625f14356db52ed98a657e40b02a82"}}
- base_4efc_{{checksum ".buildcache/cache-keys/base-4efc6b999f22c2117dd52d796786af51dd4d4d1f"}}
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-80927b28c6a4f64077f9e4ef785992bf2a87fea6-{{checksum ".buildcache/cache-keys/package-80927b28c6a4f64077f9e4ef785992bf2a87fea6"}}
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: 68e35d768281e33c871fdca37d2bd7febc317567
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-68e35d768281e33c871fdca37d2bd7febc317567-{{checksum ".buildcache/cache-keys/package-68e35d768281e33c871fdca37d2bd7febc317567"}}
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_2180_{{checksum ".buildcache/cache-keys/copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d"}}
keys:
- go-modules_3b7f_{{checksum ".buildcache/cache-keys/go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445"}}
- ui_00aa_{{checksum ".buildcache/cache-keys/ui-00aac246fd625f14356db52ed98a657e40b02a82"}}
- base_4efc_{{checksum ".buildcache/cache-keys/base-4efc6b999f22c2117dd52d796786af51dd4d4d1f"}}
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-68e35d768281e33c871fdca37d2bd7febc317567-{{checksum ".buildcache/cache-keys/package-68e35d768281e33c871fdca37d2bd7febc317567"}}
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: 77e210c1416e80febe102d7df189c89688b78473
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-77e210c1416e80febe102d7df189c89688b78473-{{checksum ".buildcache/cache-keys/package-77e210c1416e80febe102d7df189c89688b78473"}}
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_2180_{{checksum ".buildcache/cache-keys/copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d"}}
keys:
- go-modules_3b7f_{{checksum ".buildcache/cache-keys/go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445"}}
- ui_00aa_{{checksum ".buildcache/cache-keys/ui-00aac246fd625f14356db52ed98a657e40b02a82"}}
- base_4efc_{{checksum ".buildcache/cache-keys/base-4efc6b999f22c2117dd52d796786af51dd4d4d1f"}}
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-77e210c1416e80febe102d7df189c89688b78473-{{checksum ".buildcache/cache-keys/package-77e210c1416e80febe102d7df189c89688b78473"}}
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: |
make install-go
source ~/.bashrc
echo 'export GOROOT=$GOROOT' >> "$BASH_ENV"
echo 'export GOPATH=$GOPATH' >> "$BASH_ENV"
echo 'export PATH=$PATH' >> "$BASH_ENV"
echo "$ go version"
go version
name: Install go
- run:
command: |
which pg_isready || sudo apt-get update && sudo apt-get install -y postgresql-client
make DOCKER_ARGS='-d' PG_OPTS='-c shared_buffers=256MB -c max_connections=200000' -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: e446fa960c44cd16d7263a383f6215bc26dc5e72
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-e446fa960c44cd16d7263a383f6215bc26dc5e72-{{checksum ".buildcache/cache-keys/package-e446fa960c44cd16d7263a383f6215bc26dc5e72"}}
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_2180_{{checksum ".buildcache/cache-keys/copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d"}}
keys:
- go-modules_3b7f_{{checksum ".buildcache/cache-keys/go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445"}}
- ui_00aa_{{checksum ".buildcache/cache-keys/ui-00aac246fd625f14356db52ed98a657e40b02a82"}}
- base_4efc_{{checksum ".buildcache/cache-keys/base-4efc6b999f22c2117dd52d796786af51dd4d4d1f"}}
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-e446fa960c44cd16d7263a383f6215bc26dc5e72-{{checksum ".buildcache/cache-keys/package-e446fa960c44cd16d7263a383f6215bc26dc5e72"}}
name: Save package cache
paths:
- .buildcache/packages/store
trigger-merge-to-ent:
machine:
image: ubuntu-2004:202107-02
resource_class: medium
working_directory: ~/boundary
steps:
- checkout
- run:
command: |
./scripts/trigger-merge-to-ent
name: Trigger Merge to Enterprise
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: 49ae1ef3a65694d36cf63a0625fae61481b213f7
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-49ae1ef3a65694d36cf63a0625fae61481b213f7-{{checksum ".buildcache/cache-keys/package-49ae1ef3a65694d36cf63a0625fae61481b213f7"}}
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_2180_{{checksum ".buildcache/cache-keys/copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d"}}
keys:
- go-modules_3b7f_{{checksum ".buildcache/cache-keys/go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445"}}
- ui_00aa_{{checksum ".buildcache/cache-keys/ui-00aac246fd625f14356db52ed98a657e40b02a82"}}
- base_4efc_{{checksum ".buildcache/cache-keys/base-4efc6b999f22c2117dd52d796786af51dd4d4d1f"}}
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-49ae1ef3a65694d36cf63a0625fae61481b213f7-{{checksum ".buildcache/cache-keys/package-49ae1ef3a65694d36cf63a0625fae61481b213f7"}}
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: 30342e8715fcd87884930530e628a8727fe6959b
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-30342e8715fcd87884930530e628a8727fe6959b-{{checksum ".buildcache/cache-keys/package-30342e8715fcd87884930530e628a8727fe6959b"}}
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_2180_{{checksum ".buildcache/cache-keys/copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d"}}
keys:
- go-modules_3b7f_{{checksum ".buildcache/cache-keys/go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445"}}
- ui_00aa_{{checksum ".buildcache/cache-keys/ui-00aac246fd625f14356db52ed98a657e40b02a82"}}
- base_4efc_{{checksum ".buildcache/cache-keys/base-4efc6b999f22c2117dd52d796786af51dd4d4d1f"}}
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-30342e8715fcd87884930530e628a8727fe6959b-{{checksum ".buildcache/cache-keys/package-30342e8715fcd87884930530e628a8727fe6959b"}}
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: 61bb0bc62d4537b3c359326ed9fd5950dc8715fb
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-61bb0bc62d4537b3c359326ed9fd5950dc8715fb-{{checksum ".buildcache/cache-keys/package-61bb0bc62d4537b3c359326ed9fd5950dc8715fb"}}
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_2180_{{checksum ".buildcache/cache-keys/copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d"}}
keys:
- go-modules_3b7f_{{checksum ".buildcache/cache-keys/go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445"}}
- ui_00aa_{{checksum ".buildcache/cache-keys/ui-00aac246fd625f14356db52ed98a657e40b02a82"}}
- base_4efc_{{checksum ".buildcache/cache-keys/base-4efc6b999f22c2117dd52d796786af51dd4d4d1f"}}
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-61bb0bc62d4537b3c359326ed9fd5950dc8715fb-{{checksum ".buildcache/cache-keys/package-61bb0bc62d4537b3c359326ed9fd5950dc8715fb"}}
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: 859af90cedc51a2a575e0a3c0bf0cad13af85dd1
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-859af90cedc51a2a575e0a3c0bf0cad13af85dd1-{{checksum ".buildcache/cache-keys/package-859af90cedc51a2a575e0a3c0bf0cad13af85dd1"}}
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_2180_{{checksum ".buildcache/cache-keys/copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d"}}
keys:
- go-modules_3b7f_{{checksum ".buildcache/cache-keys/go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445"}}
- ui_00aa_{{checksum ".buildcache/cache-keys/ui-00aac246fd625f14356db52ed98a657e40b02a82"}}
- base_4efc_{{checksum ".buildcache/cache-keys/base-4efc6b999f22c2117dd52d796786af51dd4d4d1f"}}
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-859af90cedc51a2a575e0a3c0bf0cad13af85dd1-{{checksum ".buildcache/cache-keys/package-859af90cedc51a2a575e0a3c0bf0cad13af85dd1"}}
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-d812e23b6b7c0d83:
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-api
- test-sdk
- test-sql-latest
- test-sql-11-alpine
- test-sql-12-alpine
- test-sql-13-alpine
- algolia-index:
filters:
branches:
only:
- stable-website
trigger-merge-to-ent:
jobs:
- trigger-merge-to-ent:
filters:
branches:
only:
- main
version: 2