|
|
|
|
@ -32,13 +32,11 @@ workflows:
|
|
|
|
|
- darwin_amd64_package: { requires: [ build-common-layers ] }
|
|
|
|
|
- linux_amd64_package: { requires: [ build-common-layers ] }
|
|
|
|
|
- windows_amd64_package: { requires: [ build-common-layers ] }
|
|
|
|
|
- freebsd_amd64_package: { requires: [ build-common-layers ] }
|
|
|
|
|
- bundle-releases:
|
|
|
|
|
requires:
|
|
|
|
|
- darwin_amd64_package
|
|
|
|
|
- linux_amd64_package
|
|
|
|
|
- windows_amd64_package
|
|
|
|
|
- freebsd_amd64_package
|
|
|
|
|
jobs:
|
|
|
|
|
build-common-layers:
|
|
|
|
|
executor: builder-machine
|
|
|
|
|
@ -394,81 +392,6 @@ jobs:
|
|
|
|
|
# Save builder image cache if necessary.
|
|
|
|
|
# The range should only iterate over a single layer.
|
|
|
|
|
|
|
|
|
|
freebsd_amd64_package:
|
|
|
|
|
executor: builder
|
|
|
|
|
environment:
|
|
|
|
|
- PACKAGE_SPEC_ID: 3ea9166f458f56c1565fcf45fe049b931dafa85a
|
|
|
|
|
steps:
|
|
|
|
|
|
|
|
|
|
- setup_remote_docker:
|
|
|
|
|
version: 19.03.12
|
|
|
|
|
|
|
|
|
|
- add_ssh_keys:
|
|
|
|
|
fingerprints:
|
|
|
|
|
# hashicorp-ci github user.
|
|
|
|
|
- "c6:96:98:82:dc:04:6c:39:dd:ac:83:05:e3:15:1c:98"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- checkout
|
|
|
|
|
|
|
|
|
|
# Restore the package cache first, we might not need to rebuild.
|
|
|
|
|
- write-package-cache-key
|
|
|
|
|
- restore_cache:
|
|
|
|
|
name: Restore package cache
|
|
|
|
|
key: 'cache006-package-3ea9166f458f56c1565fcf45fe049b931dafa85a-{{checksum ".buildcache/cache-keys/package-3ea9166f458f56c1565fcf45fe049b931dafa85a"}}'
|
|
|
|
|
- run:
|
|
|
|
|
name: Check the cache status.
|
|
|
|
|
command: |
|
|
|
|
|
if ! { PKG=$(find .buildcache/packages/store -maxdepth 1 -mindepth 1 -name '*.zip' 2> /dev/null) && [ -n "$PKG" ]; }; then
|
|
|
|
|
echo "No package found, continuing with build."
|
|
|
|
|
exit 0
|
|
|
|
|
fi
|
|
|
|
|
echo "Package already cached, skipping build."
|
|
|
|
|
circleci-agent step halt
|
|
|
|
|
|
|
|
|
|
# We need to rebuild, so load the builder cache.
|
|
|
|
|
- write-build-layer-cache-keys
|
|
|
|
|
- restore_cache:
|
|
|
|
|
name: Restore build layer cache
|
|
|
|
|
keys:
|
|
|
|
|
- cache006-copy-source_dde4_{{checksum ".buildcache/cache-keys/copy-source-dde49480ad145a6d7ce0f55c0d23e6f50c04d8d3"}}
|
|
|
|
|
- cache006-go-modules_694e_{{checksum ".buildcache/cache-keys/go-modules-694e8500194e3b187b35bd9a40229f3bd215710e"}}
|
|
|
|
|
- cache006-ui_5f82_{{checksum ".buildcache/cache-keys/ui-5f82d1f0cbf979ee051aa1ba0f7105483fa6947d"}}
|
|
|
|
|
- cache006-base_aac1_{{checksum ".buildcache/cache-keys/base-aac1d959b4b3af1495941602b5e51fb6181baded"}}
|
|
|
|
|
- run:
|
|
|
|
|
name: Load whatever builder cache we have (if any) into the Docker daemon
|
|
|
|
|
no_output_timeout: 30m
|
|
|
|
|
command: |
|
|
|
|
|
make -C packages*.lock load-builder-cache
|
|
|
|
|
|
|
|
|
|
- run:
|
|
|
|
|
name: Compile Package
|
|
|
|
|
command: |
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
- run:
|
|
|
|
|
name: List packages
|
|
|
|
|
command: ls -lahR .buildcache/packages
|
|
|
|
|
- save_cache:
|
|
|
|
|
name: Saving package cache
|
|
|
|
|
key: 'cache006-package-3ea9166f458f56c1565fcf45fe049b931dafa85a-{{checksum ".buildcache/cache-keys/package-3ea9166f458f56c1565fcf45fe049b931dafa85a"}}'
|
|
|
|
|
paths:
|
|
|
|
|
- .buildcache/packages/store
|
|
|
|
|
# Save builder image cache if necessary.
|
|
|
|
|
# The range should only iterate over a single layer.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bundle-releases:
|
|
|
|
|
executor: builder
|
|
|
|
|
@ -496,13 +419,6 @@ jobs:
|
|
|
|
|
name: Write package metadata for windows_amd64_package
|
|
|
|
|
command: |
|
|
|
|
|
make package-meta
|
|
|
|
|
- load-freebsd_amd64_package
|
|
|
|
|
- run:
|
|
|
|
|
environment:
|
|
|
|
|
PACKAGE_SPEC_ID: 3ea9166f458f56c1565fcf45fe049b931dafa85a
|
|
|
|
|
name: Write package metadata for freebsd_amd64_package
|
|
|
|
|
command: |
|
|
|
|
|
make package-meta
|
|
|
|
|
- run:
|
|
|
|
|
name: Write package aliases
|
|
|
|
|
command:
|
|
|
|
|
@ -553,11 +469,6 @@ commands:
|
|
|
|
|
- restore_cache:
|
|
|
|
|
key: 'cache006-package-6b5bf7794d67cf76b1b4772807af52deb1f6a808-{{checksum ".buildcache/cache-keys/package-6b5bf7794d67cf76b1b4772807af52deb1f6a808"}}'
|
|
|
|
|
|
|
|
|
|
load-freebsd_amd64_package:
|
|
|
|
|
steps:
|
|
|
|
|
- restore_cache:
|
|
|
|
|
key: 'cache006-package-3ea9166f458f56c1565fcf45fe049b931dafa85a-{{checksum ".buildcache/cache-keys/package-3ea9166f458f56c1565fcf45fe049b931dafa85a"}}'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
write-build-layer-cache-keys:
|
|
|
|
|
steps:
|
|
|
|
|
|