mirror of https://github.com/hashicorp/boundary
Onboard Boundary to CRT (#1786)
Onboard Boundary to Common Release Tooling Co-authored-by: mdrake <mdrake@hashicorp.com> Co-authored-by: jeanneryan <jeanneryan@hashicorp.com>pull/1836/head
parent
5743580ca5
commit
84f6cc698c
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,10 +1,10 @@
|
||||
go-machine:
|
||||
machine:
|
||||
image: 'ubuntu-2004:202107-02'
|
||||
image: 'ubuntu-2004:202111-01'
|
||||
resource_class: large
|
||||
working_directory: ~/boundary
|
||||
go-machine-medium:
|
||||
machine:
|
||||
image: 'ubuntu-2004:202107-02'
|
||||
image: 'ubuntu-2004:202111-01'
|
||||
resource_class: medium
|
||||
working_directory: ~/boundary
|
||||
|
||||
@ -0,0 +1,312 @@
|
||||
name: build
|
||||
|
||||
on:
|
||||
push:
|
||||
# Sequence of patterns matched against refs/heads
|
||||
branches:
|
||||
# Push events on main branch
|
||||
- 'main'
|
||||
|
||||
env:
|
||||
PKG_NAME: "boundary"
|
||||
|
||||
jobs:
|
||||
get-product-version:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
product-version: ${{ steps.get-product-version.outputs.product-version }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Setup go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: "1.17.5"
|
||||
- name: get product version
|
||||
id: get-product-version
|
||||
run: |
|
||||
make version
|
||||
echo "::set-output name=product-version::$(make version)"
|
||||
|
||||
generate-metadata-file:
|
||||
needs: get-product-version
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
filepath: ${{ steps.generate-metadata-file.outputs.filepath }}
|
||||
steps:
|
||||
- name: 'Checkout directory'
|
||||
uses: actions/checkout@v2
|
||||
- name: Generate metadata file
|
||||
id: generate-metadata-file
|
||||
uses: hashicorp/actions-generate-metadata@main
|
||||
with:
|
||||
version: ${{ needs.get-product-version.outputs.product-version }}
|
||||
product: ${{ env.PKG_NAME }}
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: metadata.json
|
||||
path: ${{ steps.generate-metadata-file.outputs.filepath }}
|
||||
|
||||
set-ld-flags:
|
||||
needs: get-product-version
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
ldflags: ${{ steps.generate-ld-flags.outputs.ldflags }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: 'Generate ld flags'
|
||||
id: generate-ld-flags
|
||||
run: |
|
||||
project="$(go list -m)"
|
||||
sha="$(git rev-parse HEAD)"
|
||||
echo "::set-output name=ldflags::"-s -w -X \'$project/version.GitCommit=$sha\'""
|
||||
|
||||
build-other:
|
||||
needs:
|
||||
- get-product-version
|
||||
- set-ld-flags
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
goos: [ freebsd, windows, netbsd, openbsd, solaris ]
|
||||
goarch: [ "386", "amd64", "arm" ]
|
||||
go: [ "1.17.5" ]
|
||||
exclude:
|
||||
- goos: solaris
|
||||
goarch: 386
|
||||
- goos: solaris
|
||||
goarch: arm
|
||||
- goos: windows
|
||||
goarch: arm
|
||||
fail-fast: true
|
||||
|
||||
name: Go ${{ matrix.go }} ${{ matrix.goos }} ${{ matrix.goarch }} build
|
||||
env:
|
||||
GOPRIVATE: "github.com/hashicorp"
|
||||
GO111MODULE: on
|
||||
LD_FLAGS: ${{ needs.set-ld-flags.outputs.ldflags }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Setup go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: ${{ matrix.go }}
|
||||
- name: Setup Git
|
||||
run: git config --global url."https://${{ secrets.ELEVATED_GITHUB_TOKEN }}:@github.com".insteadOf "https://github.com"
|
||||
- name: Setup node and yarn
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '14'
|
||||
cache-dependency-path: 'ui/yarn.lock'
|
||||
- name: Install Yarn
|
||||
run: |
|
||||
npm install -g yarn
|
||||
- name: UI Build
|
||||
run: |
|
||||
SHA="$(head -n1 internal/ui/VERSION | cut -d ' ' -f1)"
|
||||
DIR=internal/ui/.tmp/boundary-ui
|
||||
mkdir -p "$(dirname "$DIR")"
|
||||
git clone https://github.com/hashicorp/boundary-ui "$DIR"
|
||||
cd "$DIR"
|
||||
git fetch origin "$SHA"
|
||||
git checkout "$SHA"
|
||||
yarn install
|
||||
yarn build:ui:admin
|
||||
- name: Go Build
|
||||
env:
|
||||
GOOS: ${{ matrix.goos }}
|
||||
GOARCH: ${{ matrix.goarch }}
|
||||
CGO_ENABLED: 0
|
||||
run: |
|
||||
mkdir dist out
|
||||
go build -v -tags "ui" -ldflags "${{ env.LD_FLAGS }}" -o dist/ ./cmd/boundary
|
||||
zip -r -j out/${{ env.PKG_NAME }}_${{ needs.get-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip dist/
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ${{ env.PKG_NAME }}_${{ needs.get-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip
|
||||
path: out/${{ env.PKG_NAME }}_${{ needs.get-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip
|
||||
|
||||
build-linux:
|
||||
needs:
|
||||
- get-product-version
|
||||
- set-ld-flags
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
goos: [linux]
|
||||
goarch: ["arm", "arm64", "386", "amd64"]
|
||||
go: [ "1.17.5" ]
|
||||
fail-fast: true
|
||||
|
||||
name: Go ${{ matrix.go }} ${{ matrix.goos }} ${{ matrix.goarch }} build
|
||||
|
||||
env:
|
||||
GOPRIVATE: "github.com/hashicorp"
|
||||
GO111MODULE: on
|
||||
LD_FLAGS: ${{ needs.set-ld-flags.outputs.ldflags }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Setup Git
|
||||
run: git config --global url."https://${{ secrets.ELEVATED_GITHUB_TOKEN }}:@github.com".insteadOf "https://github.com"
|
||||
- name: Setup go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: ${{ matrix.go }}
|
||||
- name: Setup node and yarn
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '14'
|
||||
cache-dependency-path: 'ui/yarn.lock'
|
||||
- name: Install Yarn
|
||||
run: |
|
||||
npm install -g yarn
|
||||
- name: UI Build
|
||||
run: |
|
||||
SHA="$(head -n1 internal/ui/VERSION | cut -d ' ' -f1)"
|
||||
DIR=internal/ui/.tmp/boundary-ui
|
||||
mkdir -p "$(dirname "$DIR")"
|
||||
git clone https://github.com/hashicorp/boundary-ui "$DIR"
|
||||
cd "$DIR"
|
||||
git fetch origin "$SHA"
|
||||
git checkout "$SHA"
|
||||
yarn install
|
||||
yarn build:ui:admin
|
||||
- name: Go Build
|
||||
env:
|
||||
GOOS: ${{ matrix.goos }}
|
||||
GOARCH: ${{ matrix.goarch }}
|
||||
CGO_ENABLED: 0
|
||||
run: |
|
||||
mkdir dist out
|
||||
go build -v -tags "ui" -ldflags "${{ env.LD_FLAGS }}" -o dist/ ./cmd/boundary
|
||||
zip -r -j out/${{ env.PKG_NAME }}_${{ needs.get-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip dist/
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ${{ env.PKG_NAME }}_${{ needs.get-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip
|
||||
path: out/${{ env.PKG_NAME }}_${{ needs.get-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip
|
||||
|
||||
- name: Linux Packaging
|
||||
uses: hashicorp/actions-packaging-linux@v1
|
||||
with:
|
||||
name: ${{ github.event.repository.name }}
|
||||
description: "HashiCorp Boundary - Identity-based access management for dynamic infrastructure"
|
||||
arch: ${{ matrix.goarch }}
|
||||
version: ${{ needs.get-product-version.outputs.product-version }}
|
||||
maintainer: "HashiCorp"
|
||||
homepage: "https://github.com/hashicorp/boundary"
|
||||
license: "MPL-2.0"
|
||||
binary: "dist/${{ env.PKG_NAME }}"
|
||||
deb_depends: "openssl"
|
||||
rpm_depends: "openssl"
|
||||
config_dir: ".release/linux/package/"
|
||||
preinstall: ".release/linux/preinst"
|
||||
postremove: ".release/linux/postrm"
|
||||
- name: Add Linux Package names to env
|
||||
run: |
|
||||
echo "RPM_PACKAGE=$(basename out/*.rpm)" >> $GITHUB_ENV
|
||||
echo "DEB_PACKAGE=$(basename out/*.deb)" >> $GITHUB_ENV
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ${{ env.RPM_PACKAGE }}
|
||||
path: out/${{ env.RPM_PACKAGE }}
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ${{ env.DEB_PACKAGE }}
|
||||
path: out/${{ env.DEB_PACKAGE }}
|
||||
|
||||
|
||||
build-darwin:
|
||||
needs:
|
||||
- get-product-version
|
||||
- set-ld-flags
|
||||
runs-on: macos-latest
|
||||
strategy:
|
||||
matrix:
|
||||
goos: [ darwin ]
|
||||
goarch: [ "amd64", "arm64" ]
|
||||
go: [ "1.17.5" ]
|
||||
fail-fast: true
|
||||
name: Go ${{ matrix.go }} ${{ matrix.goos }} ${{ matrix.goarch }} build
|
||||
|
||||
env:
|
||||
GOPRIVATE: "github.com/hashicorp"
|
||||
GO111MODULE: on
|
||||
LD_FLAGS: ${{ needs.set-ld-flags.outputs.ldflags }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Setup go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: ${{ matrix.go }}
|
||||
- name: Setup node and yarn
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '14'
|
||||
cache-dependency-path: 'ui/yarn.lock'
|
||||
- name: Install Yarn
|
||||
run: |
|
||||
npm install -g yarn
|
||||
- name: UI Build
|
||||
run: |
|
||||
SHA="$(head -n1 internal/ui/VERSION | cut -d ' ' -f1)"
|
||||
DIR=internal/ui/.tmp/boundary-ui
|
||||
mkdir -p "$(dirname "$DIR")"
|
||||
git clone https://github.com/hashicorp/boundary-ui "$DIR"
|
||||
cd "$DIR"
|
||||
git fetch origin "$SHA"
|
||||
git checkout "$SHA"
|
||||
yarn install
|
||||
yarn build:ui:admin
|
||||
- name: Go Build
|
||||
env:
|
||||
GOOS: ${{ matrix.goos }}
|
||||
GOARCH: ${{ matrix.goarch }}
|
||||
CGO_ENABLED: 0
|
||||
run: |
|
||||
mkdir -p dist out
|
||||
unset GOPATH;
|
||||
# Build plugins
|
||||
sh ./scripts/plugins.sh
|
||||
go build -v -tags "ui netcgo" -ldflags "${{ env.LD_FLAGS }}" -o dist/ ./cmd/boundary
|
||||
zip -r -j out/${{ env.PKG_NAME }}_${{ needs.get-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip dist/
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ${{ env.PKG_NAME }}_${{ needs.get-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip
|
||||
path: out/${{ env.PKG_NAME }}_${{ needs.get-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip
|
||||
|
||||
build-docker:
|
||||
name: Docker ${{ matrix.arch }} build
|
||||
needs:
|
||||
- get-product-version
|
||||
- build-linux
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
arch: ["arm", "arm64", "386", "amd64"]
|
||||
env:
|
||||
repo: ${{ github.event.repository.name }}
|
||||
version: ${{ needs.get-product-version.outputs.product-version }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Login to Artifactory
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: docker.artifactory.hashicorp.engineering
|
||||
username: ${{ secrets.ARTIFACTORY_RO_USER }}
|
||||
password: ${{ secrets.ARTIFACTORY_RO_TOKEN }}
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
with:
|
||||
image: docker.artifactory.hashicorp.engineering/prodsec-binfmt:latest
|
||||
- name: Docker Build (Action)
|
||||
uses: hashicorp/actions-docker-build@v1
|
||||
with:
|
||||
version: ${{ env.version }}
|
||||
target: default
|
||||
arch: ${{ matrix.arch }}
|
||||
zip_artifact_name: ${{ env.PKG_NAME }}_${{ needs.get-product-version.outputs.product-version }}_linux_${{ matrix.arch }}.zip
|
||||
tags: |
|
||||
docker.io/hashicorp/${{ env.repo }}:${{ env.version }}
|
||||
public.ecr.aws/hashicorp/${{ env.repo }}:${{ env.version }}
|
||||
@ -0,0 +1,215 @@
|
||||
schema = "1"
|
||||
|
||||
project "boundary" {
|
||||
team = "#proj-boundary-release-engineering"
|
||||
slack {
|
||||
notification_channel = "C01BWLSMJ03"
|
||||
}
|
||||
github {
|
||||
organization = "hashicorp"
|
||||
repository = "boundary"
|
||||
release_branches = [
|
||||
"main"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
event "merge" {
|
||||
// "entrypoint" to use if build is not run automatically
|
||||
// i.e. send "merge" complete signal to orchestrator to trigger build
|
||||
}
|
||||
|
||||
event "build" {
|
||||
depends = ["merge"]
|
||||
action "build" {
|
||||
organization = "hashicorp"
|
||||
repository = "boundary"
|
||||
workflow = "build"
|
||||
}
|
||||
}
|
||||
|
||||
event "upload-dev" {
|
||||
depends = ["build"]
|
||||
action "upload-dev" {
|
||||
organization = "hashicorp"
|
||||
repository = "crt-workflows-common"
|
||||
workflow = "upload-dev"
|
||||
depends = ["build"]
|
||||
}
|
||||
|
||||
notification {
|
||||
on = "fail"
|
||||
}
|
||||
}
|
||||
|
||||
event "quality-tests" {
|
||||
depends = ["upload-dev"]
|
||||
action "quality-tests" {
|
||||
organization = "hashicorp"
|
||||
repository = "crt-workflows-common"
|
||||
workflow = "quality-tests"
|
||||
}
|
||||
|
||||
notification {
|
||||
on = "fail"
|
||||
}
|
||||
}
|
||||
|
||||
event "security-scan-binaries" {
|
||||
depends = ["upload-dev"]
|
||||
action "security-scan-binaries" {
|
||||
organization = "hashicorp"
|
||||
repository = "crt-workflows-common"
|
||||
workflow = "security-scan-binaries"
|
||||
config = "security-scan.hcl"
|
||||
}
|
||||
|
||||
notification {
|
||||
on = "fail"
|
||||
}
|
||||
}
|
||||
|
||||
event "security-scan-containers" {
|
||||
depends = ["security-scan-binaries"]
|
||||
action "security-scan-containers" {
|
||||
organization = "hashicorp"
|
||||
repository = "crt-workflows-common"
|
||||
workflow = "security-scan-containers"
|
||||
config = "security-scan.hcl"
|
||||
}
|
||||
|
||||
notification {
|
||||
on = "fail"
|
||||
}
|
||||
}
|
||||
|
||||
event "notarize-darwin-amd64" {
|
||||
depends = ["security-scan-containers"]
|
||||
action "notarize-darwin-amd64" {
|
||||
organization = "hashicorp"
|
||||
repository = "crt-workflows-common"
|
||||
workflow = "notarize-darwin-amd64"
|
||||
}
|
||||
|
||||
notification {
|
||||
on = "fail"
|
||||
}
|
||||
}
|
||||
|
||||
event "notarize-windows-386" {
|
||||
depends = ["notarize-darwin-amd64"]
|
||||
action "notarize-windows-386" {
|
||||
organization = "hashicorp"
|
||||
repository = "crt-workflows-common"
|
||||
workflow = "notarize-windows-386"
|
||||
}
|
||||
|
||||
notification {
|
||||
on = "fail"
|
||||
}
|
||||
}
|
||||
|
||||
event "notarize-windows-amd64" {
|
||||
depends = ["notarize-windows-386"]
|
||||
action "notarize-windows-amd64" {
|
||||
organization = "hashicorp"
|
||||
repository = "crt-workflows-common"
|
||||
workflow = "notarize-windows-amd64"
|
||||
}
|
||||
|
||||
notification {
|
||||
on = "fail"
|
||||
}
|
||||
}
|
||||
|
||||
event "sign" {
|
||||
depends = ["notarize-windows-amd64"]
|
||||
action "sign" {
|
||||
organization = "hashicorp"
|
||||
repository = "crt-workflows-common"
|
||||
workflow = "sign"
|
||||
}
|
||||
|
||||
notification {
|
||||
on = "fail"
|
||||
}
|
||||
}
|
||||
|
||||
event "sign-linux-rpms" {
|
||||
depends = ["sign"]
|
||||
action "sign-linux-rpms" {
|
||||
organization = "hashicorp"
|
||||
repository = "crt-workflows-common"
|
||||
workflow = "sign-linux-rpms"
|
||||
}
|
||||
|
||||
notification {
|
||||
on = "fail"
|
||||
}
|
||||
}
|
||||
|
||||
event "verify" {
|
||||
depends = ["sign-linux-rpms"]
|
||||
action "verify" {
|
||||
organization = "hashicorp"
|
||||
repository = "crt-workflows-common"
|
||||
workflow = "verify"
|
||||
}
|
||||
|
||||
notification {
|
||||
on = "fail"
|
||||
}
|
||||
}
|
||||
|
||||
event "promote-staging" {
|
||||
|
||||
action "promote-staging" {
|
||||
organization = "hashicorp"
|
||||
repository = "crt-workflows-common"
|
||||
workflow = "promote-staging"
|
||||
}
|
||||
|
||||
notification {
|
||||
on = "fail"
|
||||
}
|
||||
|
||||
notification {
|
||||
on = "success"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
event "promote-production" {
|
||||
|
||||
action "promote-production" {
|
||||
organization = "hashicorp"
|
||||
repository = "crt-workflows-common"
|
||||
workflow = "promote-production"
|
||||
}
|
||||
|
||||
notification {
|
||||
on = "fail"
|
||||
}
|
||||
|
||||
notification {
|
||||
on = "success"
|
||||
}
|
||||
}
|
||||
|
||||
event "post-publish" {
|
||||
depends = ["promote-production"]
|
||||
|
||||
action "post-publish" {
|
||||
organization = "hashicorp"
|
||||
repository = "crt-workflows-common"
|
||||
workflow = "post-publish"
|
||||
}
|
||||
|
||||
notification {
|
||||
on = "fail"
|
||||
}
|
||||
|
||||
notification {
|
||||
on = "success"
|
||||
}
|
||||
}
|
||||
@ -1,13 +1,14 @@
|
||||
# Boundary Docker Image
|
||||
|
||||
This directory contains the officially supported HashiCorp Dockerfile to build the hashicorp/boundary docker image.
|
||||
The root of this repository contains the officially supported HashiCorp Dockerfile to build the hashicorp/boundary docker image. The dev docker image should be built for local dev and testing, while the production docker image is built in CI and makes use of CI-built binaries. The official docker image is built using the official binaries from releases.hashicorp.com.
|
||||
|
||||
## Build
|
||||
|
||||
See the Makefile targets in the root of this repository for building and publishing this image in either
|
||||
See the Makefile targets in the root of this repository for building Boundary images in either
|
||||
development or release modes:
|
||||
|
||||
- `make docker-build-dev`
|
||||
- `make docker-multiarch-build`
|
||||
- `make docker-build`
|
||||
- `make docker`
|
||||
|
||||
@ -0,0 +1,3 @@
|
||||
# # Full configuration options can be found at https://www.boundaryproject.io/docs/configuration
|
||||
|
||||
# disable_mlock = true
|
||||
@ -0,0 +1,71 @@
|
||||
# # Note that this is an example systemd file and is not intended to be functional as-is.
|
||||
# # Full configuration options can be found at https://www.boundaryproject.io/docs/configuration/controller
|
||||
|
||||
# # Disable memory lock: https://www.man7.org/linux/man-pages/man2/mlock.2.html
|
||||
# # disable_mlock = true
|
||||
|
||||
# # Controller configuration block
|
||||
# controller {
|
||||
# # This name attr must be unique across all controller instances if running in HA mode
|
||||
# name = "demo-controller-1"
|
||||
# description = "A controller for a demo!"
|
||||
|
||||
# # Database URL for postgres. This can be a direct "postgres://"
|
||||
# # URL, or it can be "file://" to read the contents of a file to
|
||||
# # supply the url, or "env://" to name an environment variable
|
||||
# # that contains the URL.
|
||||
# database {
|
||||
# url = "postgresql://boundary:boundarydemo@postgres.yourdomain.com:5432/boundary"
|
||||
# }
|
||||
# }
|
||||
|
||||
# # API listener configuration block
|
||||
# listener "tcp" {
|
||||
# # Should be the address of the NIC that the controller server will be reached on
|
||||
# address = "10.0.0.1"
|
||||
# # The purpose of this listener block
|
||||
# purpose = "api"
|
||||
|
||||
# tls_disable = false
|
||||
|
||||
# # Uncomment to enable CORS for the Admin UI. Be sure to set the allowed origin(s)
|
||||
# # to appropriate values.
|
||||
# #cors_enabled = true
|
||||
# #cors_allowed_origins = ["https://yourcorp.yourdomain.com", "serve://boundary"]
|
||||
# }
|
||||
|
||||
# # Data-plane listener configuration block (used for worker coordination)
|
||||
# listener "tcp" {
|
||||
# # Should be the IP of the NIC that the worker will connect on
|
||||
# address = "10.0.0.1"
|
||||
# # The purpose of this listener
|
||||
# purpose = "cluster"
|
||||
# }
|
||||
|
||||
# # Root KMS configuration block: this is the root key for Boundary
|
||||
# # Use a production KMS such as AWS KMS in production installs
|
||||
# kms "aead" {
|
||||
# purpose = "root"
|
||||
# aead_type = "aes-gcm"
|
||||
# key = "sP1fnF5Xz85RrXyELHFeZg9Ad2qt4Z4bgNHVGtD6ung="
|
||||
# key_id = "global_root"
|
||||
# }
|
||||
|
||||
# # Worker authorization KMS
|
||||
# # Use a production KMS such as AWS KMS for production installs
|
||||
# # This key is the same key used in the worker configuration
|
||||
# kms "aead" {
|
||||
# purpose = "worker-auth"
|
||||
# aead_type = "aes-gcm"
|
||||
# key = "8fZBjCUfN0TzjEGLQldGY4+iE9AkOvCfjh7+p0GtRBQ="
|
||||
# key_id = "global_worker-auth"
|
||||
# }
|
||||
|
||||
# # Recovery KMS block: configures the recovery key for Boundary
|
||||
# # Use a production KMS such as AWS KMS for production installs
|
||||
# kms "aead" {
|
||||
# purpose = "recovery"
|
||||
# aead_type = "aes-gcm"
|
||||
# key = "8fZBjCUfN0TzjEGLQldGY4+iE9AkOvCfjh7+p0GtRBQ="
|
||||
# key_id = "global_recovery"
|
||||
# }
|
||||
@ -0,0 +1,36 @@
|
||||
# # Note that this is an example systemd file and is not intended to be functional as-is.
|
||||
# # Full configuration options can be found at https://www.boundaryproject.io/docs/configuration/worker
|
||||
|
||||
# listener "tcp" {
|
||||
# purpose = "proxy"
|
||||
# tls_disable = true
|
||||
# address = "127.0.0.1"
|
||||
# }
|
||||
|
||||
# worker {
|
||||
# # Name attr must be unique across workers
|
||||
# name = "demo-worker-1"
|
||||
# description = "A default worker created demonstration"
|
||||
|
||||
# # Workers must be able to reach controllers on :9201
|
||||
# controllers = [
|
||||
# "10.0.0.1",
|
||||
# "10.0.0.2",
|
||||
# "10.0.0.3",
|
||||
# ]
|
||||
|
||||
# public_addr = "myhost.mycompany.com"
|
||||
|
||||
# tags {
|
||||
# type = ["prod", "webservers"]
|
||||
# region = ["us-east-1"]
|
||||
# }
|
||||
# }
|
||||
|
||||
# # must be same key as used on controller config
|
||||
# kms "aead" {
|
||||
# purpose = "worker-auth"
|
||||
# aead_type = "aes-gcm"
|
||||
# key = "8fZBjCUfN0TzjEGLQldGY4+iE9AkOvCfjh7+p0GtRBQ="
|
||||
# key_id = "global_worker-auth"
|
||||
# }
|
||||
@ -0,0 +1,23 @@
|
||||
[Unit]
|
||||
Description="HashiCorp Boundary - Identity-based access management for dynamic infrastructure"
|
||||
Documentation=https://www.boundaryproject.io/docs
|
||||
StartLimitIntervalSec=60
|
||||
StartLimitBurst=3
|
||||
|
||||
[Service]
|
||||
EnvironmentFile=-/etc/boundary.d/boundary.env
|
||||
User=boundary
|
||||
Group=boundary
|
||||
ProtectSystem=full
|
||||
ProtectHome=read-only
|
||||
ExecStart=/usr/bin/boundary server -config=/etc/boundary.d/%i.hcl
|
||||
ExecReload=/bin/kill --signal HUP $MAINPID
|
||||
KillMode=process
|
||||
KillSignal=SIGINT
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
TimeoutStopSec=30
|
||||
LimitMEMLOCK=infinity
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$1" = "purge" ]
|
||||
then
|
||||
userdel boundary
|
||||
fi
|
||||
|
||||
exit 0
|
||||
@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eu
|
||||
|
||||
USER="boundary"
|
||||
|
||||
if ! id -u $USER > /dev/null 2>&1; then
|
||||
useradd \
|
||||
--system \
|
||||
--user-group \
|
||||
--shell /bin/false \
|
||||
$USER
|
||||
fi
|
||||
@ -0,0 +1,13 @@
|
||||
container {
|
||||
dependencies = false
|
||||
alpine_secdb = true
|
||||
secrets = false
|
||||
}
|
||||
|
||||
binary {
|
||||
secrets = true
|
||||
go_modules = true
|
||||
osv = true
|
||||
oss_index = true
|
||||
nvd = true
|
||||
}
|
||||
@ -0,0 +1,124 @@
|
||||
# This Dockerfile contains multiple targets.
|
||||
# Use 'docker build --target=<name> .' to build one.
|
||||
# e.g. `docker build --target=dev .`
|
||||
#
|
||||
# All non-dev targets have a VERSION argument that must be provided
|
||||
# via --build-arg=VERSION=<version> when building.
|
||||
# e.g. --build-arg=0.7.4
|
||||
#
|
||||
# `default` is the production docker image which cannot be built locally.
|
||||
# For local dev and testing purposes, please build and use the `dev` docker image.
|
||||
|
||||
|
||||
# Development docker image
|
||||
FROM docker.mirror.hashicorp.services/alpine:3.13.6 as dev
|
||||
|
||||
RUN set -eux && \
|
||||
addgroup boundary && \
|
||||
adduser -s /bin/sh -S -G boundary boundary && \
|
||||
apk add --no-cache wget ca-certificates dumb-init gnupg libcap openssl su-exec iputils libc6-compat iptables
|
||||
|
||||
ADD bin/boundary /bin/boundary
|
||||
|
||||
RUN mkdir /boundary/
|
||||
ADD .release/docker/config.hcl /boundary/config.hcl
|
||||
RUN chown -R boundary:boundary /boundary/
|
||||
|
||||
EXPOSE 9200 9201 9202
|
||||
VOLUME /boundary/
|
||||
|
||||
COPY .release/docker/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
|
||||
ENTRYPOINT ["docker-entrypoint.sh"]
|
||||
CMD ["server", "-config", "/boundary/config.hcl"]
|
||||
|
||||
|
||||
# Official docker image that uses binaries from releases.hashicorp.com
|
||||
FROM docker.mirror.hashicorp.services/alpine:3.13.6 as official
|
||||
|
||||
ARG VERSION
|
||||
|
||||
LABEL name="Boundary" \
|
||||
maintainer="HashiCorp Boundary Team <boundary@hashicorp.com>" \
|
||||
vendor="HashiCorp" \
|
||||
version=$VERSION \
|
||||
release=$VERSION \
|
||||
summary="Boundary provides simple and secure access to hosts and services" \
|
||||
description="The Boundary Docker image is designed to enable practitioners to run Boundary in server mode on a container scheduler"
|
||||
|
||||
RUN set -eux && \
|
||||
addgroup boundary && \
|
||||
adduser -s /bin/sh -S -G boundary boundary && \
|
||||
apk add --no-cache wget ca-certificates dumb-init gnupg libcap openssl su-exec iputils libc6-compat iptables && \
|
||||
gpg --keyserver keyserver.ubuntu.com --recv-keys C874011F0AB405110D02105534365D9472D7468F && \
|
||||
cd /tmp && \
|
||||
apkArch="$(apk --print-arch)" && \
|
||||
case "${apkArch}" in \
|
||||
aarch64) boundaryArch='arm64' ;; \
|
||||
armhf) boundaryArch='armhfv6' ;; \
|
||||
x86) boundaryArch='386' ;; \
|
||||
x86_64) boundaryArch='amd64' ;; \
|
||||
*) echo >&2 "error: unsupported architecture: ${apkArch} (see https://releases.hashicorp.com/boundary/${VERSION}/ )" && exit 1 ;; \
|
||||
esac && \
|
||||
wget https://releases.hashicorp.com/boundary/${VERSION}/boundary_${VERSION}_linux_${boundaryArch}.zip && \
|
||||
wget https://releases.hashicorp.com/boundary/${VERSION}/boundary_${VERSION}_SHA256SUMS && \
|
||||
wget https://releases.hashicorp.com/boundary/${VERSION}/boundary_${VERSION}_SHA256SUMS.sig && \
|
||||
gpg --batch --verify boundary_${VERSION}_SHA256SUMS.sig boundary_${VERSION}_SHA256SUMS && \
|
||||
grep boundary_${VERSION}_linux_${boundaryArch}.zip boundary_${VERSION}_SHA256SUMS | sha256sum -c && \
|
||||
unzip -d /bin boundary_${VERSION}_linux_${boundaryArch}.zip && \
|
||||
rm boundary_${VERSION}_linux_${boundaryArch}.zip boundary_${VERSION}_SHA256SUMS boundary_${VERSION}_SHA256SUMS.sig && \
|
||||
mkdir /boundary
|
||||
|
||||
COPY .release/docker/config.hcl /boundary/config.hcl
|
||||
|
||||
RUN chown -R boundary:boundary /boundary/
|
||||
|
||||
EXPOSE 9200 9201 9202
|
||||
VOLUME /boundary/
|
||||
|
||||
COPY .release/docker/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
|
||||
ENTRYPOINT ["docker-entrypoint.sh"]
|
||||
CMD ["server", "-config", "/boundary/config.hcl"]
|
||||
|
||||
|
||||
# Production docker image
|
||||
# Remember, this cannot be built locally
|
||||
FROM docker.mirror.hashicorp.services/alpine:3.13.6 as default
|
||||
|
||||
ARG BIN_NAME
|
||||
# NAME and VERSION are the name of the software in releases.hashicorp.com
|
||||
# and the version to download. Example: NAME=boundary VERSION=1.2.3.
|
||||
ARG NAME=boundary
|
||||
ARG VERSION
|
||||
# TARGETARCH and TARGETOS are set automatically when --platform is provided.
|
||||
ARG TARGETOS TARGETARCH
|
||||
|
||||
LABEL name="Boundary" \
|
||||
maintainer="HashiCorp Boundary Team <boundary@hashicorp.com>" \
|
||||
vendor="HashiCorp" \
|
||||
version=$VERSION \
|
||||
release=$VERSION \
|
||||
summary="Boundary provides simple and secure access to hosts and services" \
|
||||
description="The Boundary Docker image is designed to enable practitioners to run Boundary in server mode on a container scheduler"
|
||||
|
||||
# Set ARGs as ENV so that they can be used in ENTRYPOINT/CMD
|
||||
ENV NAME=$NAME
|
||||
ENV VERSION=$VERSION
|
||||
|
||||
# Create a non-root user to run the software.
|
||||
RUN addgroup ${NAME} && adduser -s /bin/sh -S -G ${NAME} ${NAME}
|
||||
|
||||
RUN apk add --no-cache wget ca-certificates dumb-init gnupg libcap openssl su-exec iputils libc6-compat iptables
|
||||
|
||||
COPY .release/docker/config.hcl /boundary/config.hcl
|
||||
|
||||
COPY dist/$TARGETOS/$TARGETARCH/$BIN_NAME /bin/
|
||||
|
||||
RUN chown -R ${NAME}:${NAME} /boundary
|
||||
|
||||
EXPOSE 9200 9201 9202
|
||||
VOLUME /boundary/
|
||||
|
||||
COPY .release/docker/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["docker-entrypoint.sh"]
|
||||
CMD ["server", "-config", "/boundary/config.hcl"]
|
||||
@ -1,19 +0,0 @@
|
||||
FROM docker.mirror.hashicorp.services/alpine:3.13.6
|
||||
|
||||
RUN set -eux && \
|
||||
addgroup boundary && \
|
||||
adduser -s /bin/sh -S -G boundary boundary && \
|
||||
apk add --no-cache wget ca-certificates dumb-init gnupg libcap openssl su-exec iputils libc6-compat iptables
|
||||
|
||||
ADD bin/boundary /bin/boundary
|
||||
|
||||
RUN mkdir /boundary/
|
||||
ADD ./config.hcl /boundary/config.hcl
|
||||
RUN chown -R boundary:boundary /boundary/
|
||||
|
||||
EXPOSE 9200 9201 9202
|
||||
VOLUME /boundary/
|
||||
|
||||
COPY ./docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
|
||||
ENTRYPOINT ["docker-entrypoint.sh"]
|
||||
CMD ["server", "-config", "/boundary/config.hcl"]
|
||||
@ -1,45 +0,0 @@
|
||||
FROM docker.mirror.hashicorp.services/alpine:3.13.6
|
||||
|
||||
ARG VERSION=0.7.4
|
||||
|
||||
LABEL name="Boundary" \
|
||||
maintainer="HashiCorp Boundary Team <boundary@hashicorp.com>" \
|
||||
vendor="HashiCorp" \
|
||||
version=$VERSION \
|
||||
release=$VERSION \
|
||||
summary="Boundary provides simple and secure access to hosts and services" \
|
||||
description="The Boundary Docker image is designed to enable practitioners to run Boundary in server mode on a container scheduler"
|
||||
|
||||
RUN set -eux && \
|
||||
addgroup boundary && \
|
||||
adduser -s /bin/sh -S -G boundary boundary && \
|
||||
apk add --no-cache wget ca-certificates dumb-init gnupg libcap openssl su-exec iputils libc6-compat iptables && \
|
||||
gpg --keyserver keyserver.ubuntu.com --recv-keys C874011F0AB405110D02105534365D9472D7468F && \
|
||||
cd /tmp && \
|
||||
apkArch="$(apk --print-arch)" && \
|
||||
case "${apkArch}" in \
|
||||
aarch64) boundaryArch='arm64' ;; \
|
||||
armhf) boundaryArch='armhfv6' ;; \
|
||||
x86) boundaryArch='386' ;; \
|
||||
x86_64) boundaryArch='amd64' ;; \
|
||||
*) echo >&2 "error: unsupported architecture: ${apkArch} (see https://releases.hashicorp.com/boundary/${VERSION}/ )" && exit 1 ;; \
|
||||
esac && \
|
||||
wget https://releases.hashicorp.com/boundary/${VERSION}/boundary_${VERSION}_linux_${boundaryArch}.zip && \
|
||||
wget https://releases.hashicorp.com/boundary/${VERSION}/boundary_${VERSION}_SHA256SUMS && \
|
||||
wget https://releases.hashicorp.com/boundary/${VERSION}/boundary_${VERSION}_SHA256SUMS.sig && \
|
||||
gpg --batch --verify boundary_${VERSION}_SHA256SUMS.sig boundary_${VERSION}_SHA256SUMS && \
|
||||
grep boundary_${VERSION}_linux_${boundaryArch}.zip boundary_${VERSION}_SHA256SUMS | sha256sum -c && \
|
||||
unzip -d /bin boundary_${VERSION}_linux_${boundaryArch}.zip && \
|
||||
rm boundary_${VERSION}_linux_${boundaryArch}.zip boundary_${VERSION}_SHA256SUMS boundary_${VERSION}_SHA256SUMS.sig && \
|
||||
mkdir /boundary
|
||||
|
||||
COPY config.hcl /boundary/config.hcl
|
||||
|
||||
RUN chown -R boundary:boundary /boundary/
|
||||
|
||||
EXPOSE 9200 9201 9202
|
||||
VOLUME /boundary/
|
||||
|
||||
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
|
||||
ENTRYPOINT ["docker-entrypoint.sh"]
|
||||
CMD ["server", "-config", "/boundary/config.hcl"]
|
||||
@ -1,3 +0,0 @@
|
||||
{
|
||||
"lockfileVersion": 1
|
||||
}
|
||||
@ -1,4 +0,0 @@
|
||||
# ***
|
||||
# WARNING: Do not EDIT or MERGE this file, it is generated by packagespec.
|
||||
# ***
|
||||
* linguist-generated
|
||||
@ -1,312 +0,0 @@
|
||||
# ***
|
||||
# WARNING: Do not EDIT or MERGE this file, it is generated by packagespec.
|
||||
# ***
|
||||
include $(shell git rev-parse --show-toplevel)/packages*.lock/config.mk
|
||||
|
||||
.PHONY: packages commands build package write-builder-cache-keys \
|
||||
write-all-package-cache-keys build-all
|
||||
|
||||
GOOS ?= $(shell go env GOOS 2>/dev/null || echo linux)
|
||||
GOARCH ?= $(shell go env GOARCH 2>/dev/null || echo amd64)
|
||||
|
||||
DEFAULT_PACKAGE_YQ := [ .packages[] | select(.inputs.GOOS=="$(GOOS)" and .inputs.GOARCH=="$(GOARCH)") ][0]
|
||||
QUERY_DEFAULT_PACKAGESPEC = $(call QUERY_LOCK,$(DEFAULT_PACKAGE_YQ) | $(1))
|
||||
|
||||
# MK is shorthand for changing to repo root and selecting a make target
|
||||
# from a file in this directory. All *.mk files in this directory assume
|
||||
# the current working directory is the repo root. This Makefile exists
|
||||
# to invoke those mk files correctly.
|
||||
MK := $(MAKE) -C $(REPO_ROOT) -f $(LOCKDIR)/
|
||||
|
||||
# configure load-builder-cache target to load the most specific builder layer cache
|
||||
# available as an archive in the build cache.
|
||||
|
||||
ifneq ($(PACKAGE_SPEC_ID),)
|
||||
|
||||
PACKAGE_CACHE_KEY_FILE := $(shell $(call QUERY_PACKAGESPEC,.meta.builtin.PACKAGE_CACHE_KEY_FILE))
|
||||
|
||||
# Loading the best available archive for a specific package build.
|
||||
|
||||
BUILD_LAYER_ARCHIVES := $(shell $(call QUERY_PACKAGESPEC,.meta.builtin.BUILD_LAYERS[].archive))
|
||||
BEST_BUILD_LAYER_ARCHIVE := $(shell cd $(REPO_ROOT) && for F in $(BUILD_LAYER_ARCHIVES); do \
|
||||
if [ -f $$F ]; then echo $$F; exit 0; fi; done)
|
||||
ifeq ($(BEST_BUILD_LAYER_ARCHIVE),)
|
||||
load-builder-cache:
|
||||
@echo "No build layer archives found in build cache. Looked for: $(BUILD_LAYER_ARCHIVES)"
|
||||
else
|
||||
BEST_BUILD_LAYER_NAME := $(shell $(call QUERY_PACKAGESPEC,.meta.builtin.BUILD_LAYERS[] \
|
||||
| select(.archive=="$(BEST_BUILD_LAYER_ARCHIVE)") | .name))
|
||||
BEST_BUILD_LAYER_LOAD_TARGET := $(BEST_BUILD_LAYER_NAME)-load
|
||||
|
||||
load-builder-cache:
|
||||
@$(MK)layer.mk $(BEST_BUILD_LAYER_LOAD_TARGET)
|
||||
|
||||
endif
|
||||
|
||||
else ifneq ($(LAYER_SPEC_ID),)
|
||||
|
||||
# Loading the best avilable archive for a specific layer build.
|
||||
|
||||
BUILD_LAYER_ARCHIVES := $(shell $(call QUERY_LOCK,.layers[] | select(.name=="$(LAYER_SPEC_ID)") \
|
||||
| .meta.builtin.LAYER_LIST[].archive))
|
||||
BEST_BUILD_LAYER_ARCHIVE := $(shell cd $(REPO_ROOT) && for F in $(BUILD_LAYER_ARCHIVES); do \
|
||||
if [ -f $$F ]; then echo $$F; exit 0; fi; done)
|
||||
ifeq ($(BEST_BUILD_LAYER_ARCHIVE),)
|
||||
|
||||
load-builder-cache:
|
||||
@echo "No build layer archives found in build cache. Looked for: $(BUILD_LAYER_ARCHIVES)"
|
||||
|
||||
else
|
||||
BEST_BUILD_LAYER_NAME := $(shell $(call QUERY_LOCK,.layers[] | select(.name=="$(LAYER_SPEC_ID)") \
|
||||
| .meta.builtin.LAYER_LIST[] | select(.archive=="$(BEST_BUILD_LAYER_ARCHIVE)") | .name))
|
||||
BEST_BUILD_LAYER_LOAD_TARGET := $(BEST_BUILD_LAYER_NAME)-load
|
||||
|
||||
load-builder-cache:
|
||||
@$(MK)layer.mk $(BEST_BUILD_LAYER_LOAD_TARGET)
|
||||
|
||||
endif
|
||||
|
||||
else
|
||||
|
||||
load-builder-cache:
|
||||
@echo "You must set PACKAGE_SPEC_ID or LAYER_SPEC_ID so we know which caches to look for."
|
||||
|
||||
endif
|
||||
|
||||
commands:
|
||||
@$(MAKE) -f packages.mk commands
|
||||
|
||||
ifeq ($(DIRTY_FILES),)
|
||||
DIRTY_SOURCE_WARNING :=
|
||||
else
|
||||
DIRTY_SOURCE_WARNING = echo "==> SOURCE TREE IS DIRTY; $(1)"
|
||||
endif
|
||||
|
||||
# build is a convenience target for local builds, do not use in CI.
|
||||
# Instead, use `make package` specifying PACKAGE_SPEC_ID.
|
||||
build:
|
||||
@$(call DIRTY_SOURCE_WARNING,PERFORMING DIRTY BUILD)
|
||||
@echo "==> Building default package for GOOS=$(GOOS) GOARCH=$(GOARCH)"
|
||||
@ALIASES=$$($(call QUERY_DEFAULT_PACKAGESPEC,.aliases[] | "alias type:\(.type) path:\(.path)") | column -t); \
|
||||
echo "$$ALIASES"
|
||||
@PACKAGE_SPEC_ID="$$($(call QUERY_DEFAULT_PACKAGESPEC,.packagespecid) | head -n1)"; \
|
||||
COMMAND="PACKAGE_SOURCE_ID=$$PACKAGE_SOURCE_ID PACKAGE_SPEC_ID=$$PACKAGE_SPEC_ID $(MK)build.mk package"; \
|
||||
echo "$$COMMAND"; \
|
||||
$(SHELL) "$$COMMAND"
|
||||
|
||||
# package-contents is a convenience target for local builds, do not use in CI.
|
||||
package-contents:
|
||||
@$(call DIRTY_SOURCE_WARNING,GETTING CONTENTS OF DIRTY BUILD)
|
||||
@echo "==> Getting contents of default package for GOOS=$(GOOS) GOARCH=$(GOARCH)"
|
||||
@ALIASES=$$($(call QUERY_DEFAULT_PACKAGESPEC,.aliases[] | "alias type:\(.type) path:\(.path)") | column -t); \
|
||||
echo "$$ALIASES"
|
||||
@PACKAGE_SPEC_ID="$$($(call QUERY_DEFAULT_PACKAGESPEC,.packagespecid) | head -n1)"; \
|
||||
COMMAND="PACKAGE_SOURCE_ID=$$PACKAGE_SOURCE_ID PACKAGE_SPEC_ID=$$PACKAGE_SPEC_ID $(MK)build.mk package-contents"; \
|
||||
echo "$$COMMAND"; \
|
||||
$(SHELL) "$$COMMAND"
|
||||
|
||||
# copy-package-contents is a convenience target for local builds, do not use in CI.
|
||||
copy-package-contents:
|
||||
@$(call DIRTY_SOURCE_WARNING,COPYING CONTENTS OF DIRTY BUILD)
|
||||
@echo "==> Getting contents of default package for GOOS=$(GOOS) GOARCH=$(GOARCH)"
|
||||
@ALIASES=$$($(call QUERY_DEFAULT_PACKAGESPEC,.aliases[] | "alias type:\(.type) path:\(.path)") | column -t); \
|
||||
echo "$$ALIASES"
|
||||
@PACKAGE_SPEC_ID="$$($(call QUERY_DEFAULT_PACKAGESPEC,.packagespecid) | head -n1)"; \
|
||||
COMMAND="PACKAGE_SOURCE_ID=$$PACKAGE_SOURCE_ID PACKAGE_SPEC_ID=$$PACKAGE_SPEC_ID $(MK)build.mk copy-package-contents"; \
|
||||
echo "$$COMMAND"; \
|
||||
$(SHELL) "$$COMMAND"
|
||||
|
||||
# meta is a convenience target for local builds, do not use in CI.
|
||||
# Instead, use `make package-meta` specifying PACKAGE_SPEC_ID.
|
||||
meta:
|
||||
@$(call DIRTY_SOURCE_WARNING,WRITING METADATA FOR DIRTY BUILD)
|
||||
@echo "==> Writing metacdata for default package (GOOS=$(GOOS) GOARCH=$(GOARCH))"
|
||||
@ALIASES=$$($(call QUERY_DEFAULT_PACKAGESPEC,.aliases[] | "alias type:\(.type) path:\(.path)") | column -t); \
|
||||
echo "$$ALIASES"
|
||||
@PACKAGE_SPEC_ID="$$($(call QUERY_DEFAULT_PACKAGESPEC,.packagespecid) | head -n1)"; \
|
||||
COMMAND="PACKAGE_SOURCE_ID=$$PACKAGE_SOURCE_ID PACKAGE_SPEC_ID=$$PACKAGE_SPEC_ID $(MK)build.mk package-meta"; \
|
||||
echo "$$COMMAND"; \
|
||||
$(SHELL) "$$COMMAND"
|
||||
|
||||
# build-all is a convenience target to sequentially build each package.
|
||||
# It is mostly useful in the tutorial, do not use this in CI as it is much slower
|
||||
# than building packages in parallel.
|
||||
build-all:
|
||||
@PACKAGE_SPEC_IDS="$$($(call QUERY_LOCK,.packages[] | .packagespecid))"; \
|
||||
COUNT=$$(echo $$PACKAGE_SPEC_IDS | wc -w | xargs); \
|
||||
echo "==> Building all $$COUNT packages sequentially."; \
|
||||
for PACKAGE_SPEC_ID in $$PACKAGE_SPEC_IDS; do \
|
||||
COMMAND="PACKAGE_SOURCE_ID=$$PACKAGE_SOURCE_ID PACKAGE_SPEC_ID=$$PACKAGE_SPEC_ID $(MK)build.mk package"; \
|
||||
echo "$$COMMAND"; \
|
||||
$(SHELL) "$$COMMAND"; \
|
||||
done
|
||||
|
||||
# package expects PACKAGE_SPEC_ID to already be set, use this in CI.
|
||||
package:
|
||||
@$(call DIRTY_SOURCE_WARNING,BUILDING DIRTY PACKAGE)
|
||||
@echo "==> Building package spec $(PACKAGE_SPEC_ID)"
|
||||
@ALIASES=$$($(call QUERY_PACKAGESPEC,.aliases[] | "alias type:\(.type) path:\(.path)") | column -t); \
|
||||
echo "$$ALIASES"
|
||||
@COMMAND="PACKAGE_SOURCE_ID=$$PACKAGE_SOURCE_ID PACKAGE_SPEC_ID=$$PACKAGE_SPEC_ID $(MK)build.mk package"; \
|
||||
echo "$$COMMAND"; \
|
||||
$(SHELL) "$$COMMAND"
|
||||
|
||||
# package-meta expects PACKAGE_SPEC_ID to already be set, use this in CI.
|
||||
package-meta:
|
||||
@$(call DIRTY_SOURCE_WARNING,WRITING DIRTY METADATA FOR DIRTY PACKAGE)
|
||||
@echo "==> Writing metadata for package $(PACKAGE_SPEC_ID)"
|
||||
@ALIASES=$$($(call QUERY_PACKAGESPEC,.aliases[] | "alias type:\(.type) path:\(.path)") | column -t); \
|
||||
echo "$$ALIASES"
|
||||
@COMMAND="PACKAGE_SOURCE_ID=$$PACKAGE_SOURCE_ID PACKAGE_SPEC_ID=$$PACKAGE_SPEC_ID $(MK)build.mk package-meta"; \
|
||||
echo "$$COMMAND"; \
|
||||
$(SHELL) "$$COMMAND"
|
||||
|
||||
# package-meta expects PACKAGE_SPEC_ID to already be set, use this in CI.
|
||||
package-meta-all:
|
||||
@$(call DIRTY_SOURCE_WARNING,WRITING DIRTY METADATA FOR DIRTY PACKAGES)
|
||||
@PACKAGE_SPEC_IDS="$$($(call QUERY_LOCK,.packages[] | .packagespecid))"; \
|
||||
COUNT=$$(echo $$PACKAGE_SPEC_IDS | wc -w | xargs); \
|
||||
echo "==> Writing $$COUNT packages' metadata..."; \
|
||||
for PACKAGE_SPEC_ID in $$PACKAGE_SPEC_IDS; do \
|
||||
export PACKAGE_SPEC_ID; \
|
||||
FILE="$(PACKAGE_SOURCE_ID)-$${PACKAGE_SPEC_ID}.zip.meta.json"; \
|
||||
OUT="$(PACKAGE_STORE)/$$FILE"; \
|
||||
COMMAND="$(call QUERY_PACKAGESPEC_BY_ID,env.PACKAGE_SPEC_ID,.) > $$OUT"; \
|
||||
echo "$$COMMAND"; \
|
||||
$(SHELL) "$$COMMAND"; \
|
||||
done
|
||||
|
||||
# aliases writes all alias symlinks for packages in the package store that
|
||||
# match the current LOCKFILE and PRODUCT_REVISION. It does not cause a new build.
|
||||
# If the package store contains no matchin binaries, then this does nothing.
|
||||
aliases:
|
||||
@echo "==> Writing alias symlinks for existing packages in the store."; \
|
||||
cd $(REPO_ROOT); \
|
||||
PACKAGE_SPEC_IDS="$$($(call QUERY_LOCK,.packages[] | .packagespecid))"; \
|
||||
for PACKAGE_SPEC_ID in $$PACKAGE_SPEC_IDS; do \
|
||||
PACKAGE_FILE="$$PACKAGE_SOURCE_ID-$$PACKAGE_SPEC_ID.zip"; \
|
||||
PACKAGE="$(CACHE_ROOT)/packages/store/$$PACKAGE_FILE"; \
|
||||
[ -f $$PACKAGE ] || continue; \
|
||||
ALIASES=$$($(call QUERY_PACKAGESPEC_BY_ID,'$$PACKAGE_SPEC_ID',.aliases[] | "$(CACHE_ROOT)/packages/by-alias/\(.type)/\(.path)")); \
|
||||
for A in $$ALIASES; do \
|
||||
mkdir -p $$(dirname $$A); \
|
||||
$(LN) -rfs $$PACKAGE $$A; \
|
||||
echo "==> Alias written: $$A -> $$PACKAGE"; \
|
||||
done; \
|
||||
done
|
||||
|
||||
|
||||
write-builder-cache-keys:
|
||||
@echo "==> Writing build layer cache keys"
|
||||
@$(MK)layer.mk write-cache-keys
|
||||
|
||||
write-package-cache-key:
|
||||
@if [ -z "$(PACKAGE_CACHE_KEY_FILE)" ]; then echo "Must set PACKAGE_SPEC_ID"; exit 1; fi
|
||||
@$(WRITE_PACKAGE_CACHE_KEY)
|
||||
@echo "==> Package cache key written: $(PACKAGE_CACHE_KEY_FILE)"
|
||||
|
||||
# WRITE_PACKAGE_CACHE_KEY writes the package cache key for PACKAGE_SPEC_ID.
|
||||
# We reference this as an environment variable, so you can override it in a
|
||||
# recipe rather than relying on the global setting.
|
||||
define WRITE_PACKAGE_CACHE_KEY
|
||||
( \
|
||||
cd $(REPO_ROOT); \
|
||||
KEY="PACKAGE_SPEC_ID=$$PACKAGE_SPEC_ID"$$'\n'"PACKAGE_SOURCE_ID=$(PACKAGE_SOURCE_ID)"; \
|
||||
FILE=$$(yq -r ".packages[] | select(.packagespecid==\"$$PACKAGE_SPEC_ID\") \
|
||||
| .meta.builtin.PACKAGE_CACHE_KEY_FILE" < $(LOCK)); \
|
||||
echo "$$FILE"; \
|
||||
echo "$$KEY"; \
|
||||
mkdir -p $$(dirname $$FILE); \
|
||||
echo "$$KEY" > "$$FILE";\
|
||||
)
|
||||
endef
|
||||
|
||||
write-all-package-cache-keys:
|
||||
@IDS="$$($(call QUERY_LOCK,.packages[].packagespecid))"; \
|
||||
for PACKAGE_SPEC_ID in $$IDS; do \
|
||||
$(WRITE_PACKAGE_CACHE_KEY); \
|
||||
done; \
|
||||
echo "==> All package cache keys written"
|
||||
|
||||
clean-builder-images:
|
||||
@IMAGES=$$(docker images --format '{{.Repository}}:{{.Tag}}' | grep '^$(BUILDER_IMAGE_PREFIX)' || true); \
|
||||
if [ -z "$$IMAGES" ]; then exit 0; fi; \
|
||||
docker rmi -f $$IMAGES
|
||||
|
||||
clean:
|
||||
@cd $(REPO_ROOT); rm -rf $(CACHE_ROOT)
|
||||
|
||||
clean-all: clean clean-builder-images
|
||||
|
||||
clean-all-prune: clean-all
|
||||
docker container prune
|
||||
docker image prune
|
||||
|
||||
RELEASER_DIR := $(REPO_ROOT)/.packagespec/release
|
||||
|
||||
# REQUIRE_EXPORT requires a set of make variables to be nonempty,
|
||||
# exits 1 if any are not, and exports each one otherwise.
|
||||
# To be used in recipe bodies.
|
||||
define REQUIRE_EXPORT
|
||||
$(foreach VAR,$(1),[ -n "$($(VAR))" ] || { echo "Must set $(VAR)"; exit 1; }; export $(VAR)='$($(VAR))';)
|
||||
endef
|
||||
|
||||
# EXPORT exports each named variable, if it exists.
|
||||
define EXPORT
|
||||
$(foreach VAR,$(1),export $(VAR)='$($(VAR))';)
|
||||
endef
|
||||
|
||||
# INVOKE_RELEASER_TARGET invokes the named target (first arg) in the releaser
|
||||
# repository, first calling REQUIRE_EXPORT on all the named variables (second arg).
|
||||
define INVOKE_RELEASER_TARGET
|
||||
$(call REQUIRE_EXPORT,\
|
||||
PRODUCT_REPO_LOCAL PRODUCT_REPO PRODUCT_PATH \
|
||||
PRODUCT_CIRCLECI_SLUG PRODUCT_CIRCLECI_HOST RELEASE_SYSTEM_BRANCH \
|
||||
PRODUCT_RELEASE_REPO SPEC LOCKDIR \
|
||||
) \
|
||||
( cd $(REPO_ROOT) && packagespec load -asset=PREP_TIME -lockdir "$(LOCKDIR)"; ); \
|
||||
( cd $(REPO_ROOT) && packagespec load -asset=WORK_DIR -lockdir "$(LOCKDIR)"; ); \
|
||||
$(MAKE) -C $(RELEASER_DIR) $(1)
|
||||
endef
|
||||
|
||||
# RELEASE_TARGETS are targets in the release repo we pass control to
|
||||
# to perform release actions.
|
||||
# Note: The release repo is only available to HashiCorp employees.
|
||||
RELEASE_TARGETS := build-ci stage-config stage custom-build custom-build-config orchestrator stop-orchestrator bundle
|
||||
|
||||
# We always rev-parse the PRODUCT_REVISION to obtain the full SHA. This is required
|
||||
# for downstream processes which use it to determine part of the package name.
|
||||
$(RELEASE_TARGETS): PRODUCT_REVISION := $(shell git rev-parse $${PRODUCT_REVISION:-HEAD})
|
||||
$(RELEASE_TARGETS): PRODUCT_VERSION ?= 0.0.0-$(USER)-snapshot
|
||||
$(RELEASE_TARGETS): RELEASE_SYSTEM_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD)
|
||||
custom-build: PRODUCT_VERSION := $(PRODUCT_VERSION)-$(PRODUCT_REVISION)
|
||||
bundle: PRODUCT_VERSION := $(shell $(call QUERY_LOCK,.packages[0].inputs.PRODUCT_VERSION))
|
||||
orchestrator: PRODUCT_VERSION := $(shell $(call QUERY_LOCK,.packages[0].inputs.PRODUCT_VERSION))
|
||||
stop-orchestrator: PRODUCT_VERSION := $(shell $(call QUERY_LOCK,.packages[0].inputs.PRODUCT_VERSION))
|
||||
$(RELEASE_TARGETS):
|
||||
@\
|
||||
echo $(PRODUCT_VERSION) \
|
||||
$(call REQUIRE_EXPORT,PRODUCT_REVISION PRODUCT_VERSION) \
|
||||
$(call INVOKE_RELEASER_TARGET,$@)
|
||||
|
||||
# QUERY_TARGETS are targets in the release repo that perform queries, and are therefore
|
||||
# not necessarily bound to a specific PRODUCT_VERSION or PRODUCT_REVISION.
|
||||
# We still export PRODUCT_VERSION and PRODUCT_REVISION because they can be used as query
|
||||
# parameters.
|
||||
QUERY_TARGETS := list-staged-builds list-promoted-builds list-custom-builds watch-ci
|
||||
|
||||
$(QUERY_TARGETS): RELEASE_SYSTEM_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD)
|
||||
$(QUERY_TARGETS):
|
||||
@\
|
||||
$(call EXPORT,PRODUCT_REVISION PRODUCT_VERSION) \
|
||||
$(call INVOKE_RELEASER_TARGET,$@)
|
||||
|
||||
# BUNDLE_TARGETS are targets acting on specific staged bundles, identified by
|
||||
# their BUNDLE_ID.
|
||||
BUNDLE_TARGETS := publish-config publish inspect-staged-build workflow
|
||||
|
||||
$(BUNDLE_TARGETS): RELEASE_SYSTEM_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD)
|
||||
$(BUNDLE_TARGETS):
|
||||
@\
|
||||
$(call REQUIRE_EXPORT,BUNDLE_ID) \
|
||||
$(call INVOKE_RELEASER_TARGET,$@)
|
||||
@ -1,138 +0,0 @@
|
||||
# ***
|
||||
# WARNING: Do not EDIT or MERGE this file, it is generated by packagespec.
|
||||
# ***
|
||||
# build.mk builds the packages defined in packages.lock, first building all necessary
|
||||
# builder images.
|
||||
#
|
||||
# NOTE: This file should always run as though it were in the repo root, so all paths
|
||||
# are relative to the repo root.
|
||||
|
||||
# Include config.mk relative to repo root.
|
||||
include $(shell git rev-parse --show-toplevel)/packages*.lock/config.mk
|
||||
|
||||
ifeq ($(PACKAGE_SPEC_ID),)
|
||||
$(error You must set PACKAGE_SPEC_ID; 'make build' does this for you.)
|
||||
endif
|
||||
|
||||
ifneq ($(PRODUCT_VERSION),)
|
||||
$(error You cannot set PRODUCT_VERSION for local builds, did you mean PRODUCT_REVISION?)
|
||||
endif
|
||||
|
||||
# Include the layers driver.
|
||||
include $(LOCKDIR)/layer.mk
|
||||
|
||||
# GET_IMAGE_MARKER_FILE gets the name of the Docker image marker file
|
||||
# for the named build layer.
|
||||
GET_IMAGE_MARKER_FILE = $($(1)_IMAGE)
|
||||
# GET_IMAGE_NAME gets the Docker image name of the build layer.
|
||||
GET_IMAGE_NAME = $($(1)_IMAGE_NAME)
|
||||
|
||||
# Determine the top-level build layer.
|
||||
BUILD_LAYER_NAME := $(shell $(call QUERY_PACKAGESPEC,.meta.builtin.BUILD_LAYERS[0].name))
|
||||
BUILD_LAYER_IMAGE = $(call GET_IMAGE_MARKER_FILE,$(BUILD_LAYER_NAME))
|
||||
BUILD_LAYER_IMAGE_NAME = $(call GET_IMAGE_NAME,$(BUILD_LAYER_NAME))
|
||||
|
||||
BUILD_COMMAND := $(shell $(call QUERY_PACKAGESPEC,.["build-command"]))
|
||||
BUILD_ENV := $(shell $(call QUERY_PACKAGESPEC,.inputs | to_entries[] | "\(.key)=\(.value)"))
|
||||
ALIASES := $(shell $(call QUERY_PACKAGESPEC,.aliases[] | "\(.type)/\(.path)"))
|
||||
ALIASES := $(addprefix $(BY_ALIAS)/,$(ALIASES))
|
||||
|
||||
ifeq ($(BUILD_COMMAND),)
|
||||
$(error Unable to find build command for package spec ID $(PACKAGE_SPEC_ID))
|
||||
endif
|
||||
ifeq ($(BUILD_ENV),)
|
||||
$(error Unable to find build inputs for package spec ID $(PACKAGE_SPEC_ID))
|
||||
endif
|
||||
|
||||
# Configure paths and filenames.
|
||||
OUTPUT_DIR := $(PACKAGE_STORE)
|
||||
_ := $(shell mkdir -p $(OUTPUT_DIR))
|
||||
# PACKAGE_NAME is the input-addressed name of the package.
|
||||
PACKAGE_NAME := $(PACKAGE_SOURCE_ID)-$(PACKAGE_SPEC_ID)
|
||||
PACKAGE_ZIP_NAME := $(PACKAGE_NAME).zip
|
||||
PACKAGE := $(OUTPUT_DIR)/$(PACKAGE_ZIP_NAME)
|
||||
# PACKAGE_CONTENTS is used when a built package needs to be unzipped to examine
|
||||
# its contents. It is a path to a directory where these contents will be unzipped
|
||||
# to. This is not needed to produce builds, but is useful for post-build tasks
|
||||
# when the package contents need to be checked.
|
||||
PACKAGE_CONTENTS := $(PACKAGE)_contents
|
||||
META_JSON_NAME := $(PACKAGE_ZIP_NAME).meta.json
|
||||
META := $(OUTPUT_DIR)/$(META_JSON_NAME)
|
||||
|
||||
# In the container, place the output dir at root. This makes 'docker cp' easier.
|
||||
CONTAINER_OUTPUT_DIR := /$(OUTPUT_DIR)
|
||||
|
||||
FULL_BUILD_COMMAND := export $(BUILD_ENV) && mkdir -p $(CONTAINER_OUTPUT_DIR) && $(BUILD_COMMAND)
|
||||
|
||||
### Docker run command configuration.
|
||||
|
||||
DOCKER_SHELL := /bin/bash -euo pipefail -c
|
||||
|
||||
DOCKER_RUN_ENV_FLAGS := \
|
||||
-e PACKAGE_SOURCE_ID=$(PACKAGE_SOURCE_ID) \
|
||||
-e OUTPUT_DIR=$(CONTAINER_OUTPUT_DIR) \
|
||||
-e PACKAGE_ZIP_NAME=$(PACKAGE_ZIP_NAME)
|
||||
|
||||
BUILD_CONTAINER_NAME := build-$(PACKAGE_SPEC_ID)-$(PACKAGE_SOURCE_ID)
|
||||
DOCKER_RUN_FLAGS := $(DOCKER_RUN_ENV_FLAGS) --name $(BUILD_CONTAINER_NAME)
|
||||
# DOCKER_RUN_COMMAND ties everything together to build the final package as a
|
||||
# single docker run invocation.
|
||||
DOCKER_RUN_COMMAND = docker run $(DOCKER_RUN_FLAGS) $(BUILD_LAYER_IMAGE_NAME) $(DOCKER_SHELL) '$(FULL_BUILD_COMMAND)'
|
||||
# DOCKER_CP_COMMAND copies the built artefact from the build container.
|
||||
DOCKER_CP_COMMAND = docker cp $(BUILD_CONTAINER_NAME):$(CONTAINER_OUTPUT_DIR)/$(PACKAGE_ZIP_NAME) $(PACKAGE)
|
||||
|
||||
# package builds the package according to the set PACKAGE_SPEC_ID and PRODUCT_REVISION.
|
||||
.PHONY: package
|
||||
package: $(ALIASES)
|
||||
@echo $(PACKAGE)
|
||||
|
||||
# package-contents builds the package according to PACKAGE_SPEC_ID and PRODUCT_REVISION,
|
||||
# and then extracts the zip file into an adjacent directory.
|
||||
.PHONY: package-contents
|
||||
package-contents: $(PACKAGE_CONTENTS)
|
||||
@echo "$(PACKAGE_CONTENTS)/"
|
||||
|
||||
# copy-package-contents allows copying the contents of a package to a specific
|
||||
# directory. You must set PACKAGE_CONTENTS_DEST_DIR to this directory.
|
||||
# This is useful for implementing a top-level make target that places your
|
||||
# build artifacts in a well-known location.
|
||||
.PHONY: copy-package-contents
|
||||
copy-package-contents: $(PACKAGE_CONTENTS)
|
||||
@[ -n "$(PACKAGE_CONTENTS_DEST_DIR)" ] || { \
|
||||
echo "==> ERROR: Must set PACKAGE_CONTENTS_DEST_DIR"; \
|
||||
exit 1; \
|
||||
}; \
|
||||
mkdir -p "$(PACKAGE_CONTENTS_DEST_DIR)"; \
|
||||
cp -r "$(PACKAGE_CONTENTS)"/* "$(PACKAGE_CONTENTS_DEST_DIR)"
|
||||
|
||||
.PHONY: package-meta
|
||||
package-meta: $(META)
|
||||
@echo $(META)
|
||||
|
||||
$(META): $(LOCK)
|
||||
@$(call QUERY_PACKAGESPEC,.) > $@
|
||||
|
||||
# PACKAGE builds the package.
|
||||
$(PACKAGE): $(BUILD_LAYER_IMAGE)
|
||||
@mkdir -p $$(dirname $@)
|
||||
@echo "==> Building package: $@"
|
||||
@echo "PACKAGE_SOURCE_ID: $(PACKAGE_SOURCE_ID)"
|
||||
@echo "PACKAGE_SPEC_ID: $(PACKAGE_SPEC_ID)"
|
||||
@# Print alias info.
|
||||
@$(call QUERY_PACKAGESPEC,.aliases[] | "alias type:\(.type) path:\(.path)") | column -t
|
||||
@docker rm -f $(BUILD_CONTAINER_NAME) > /dev/null 2>&1 || true # Speculative cleanup.
|
||||
$(DOCKER_RUN_COMMAND)
|
||||
$(DOCKER_CP_COMMAND)
|
||||
@docker rm -f $(BUILD_CONTAINER_NAME)
|
||||
|
||||
$(PACKAGE_CONTENTS): $(PACKAGE)
|
||||
@mkdir -p "$@" && unzip "$<" -d "$@"
|
||||
|
||||
# ALIASES writes the package alias links.
|
||||
# ALIASES must be phony to ensure they are updated to point to the
|
||||
# latest builds.
|
||||
.PHONY: $(ALIASES)
|
||||
$(ALIASES): $(PACKAGE)
|
||||
@mkdir -p $(dir $@)
|
||||
@$(LN) -rfs $(PACKAGE) $@
|
||||
@echo "==> Package alias written: $@"
|
||||
@ -1,253 +0,0 @@
|
||||
# ***
|
||||
# WARNING: Do not EDIT or MERGE this file, it is generated by packagespec.
|
||||
# ***
|
||||
# config.mk contains constants and derived configuration that applies to
|
||||
# building both layers and final packages.
|
||||
|
||||
# Only include the config once. This means we can include it in the header
|
||||
# of each makefile, to allow calling them individually and when they call
|
||||
# each other.
|
||||
ifneq ($(CONFIG_INCLUDED),YES)
|
||||
CONFIG_INCLUDED := YES
|
||||
|
||||
# Set SHELL to strict mode, in a way compatible with both old and new GNU make.
|
||||
SHELL := /usr/bin/env bash -euo pipefail -c
|
||||
|
||||
REPO_ROOT := $(shell git rev-parse --show-toplevel)
|
||||
|
||||
# Set AUTO_INSTALL_TOOLS to YES in CI to have any missing required tools installed
|
||||
# automatically.
|
||||
AUTO_INSTALL_TOOLS ?= NO
|
||||
|
||||
define ENSURE_GITIGNORE_ALL
|
||||
_ := $(shell cd "$(REPO_ROOT)" && [ -f "$(1)/.gitignore" ] || { mkdir -p "$(1)"; echo '*' > "$(1)/.gitignore"; })
|
||||
endef
|
||||
|
||||
# CACHE_ROOT is the build cache directory.
|
||||
CACHE_ROOT ?= .buildcache
|
||||
_ := $(call ENSURE_GITIGNORE_ALL,$(CACHE_ROOT))
|
||||
# PACKAGES_ROOT holds the package store, as well as other package aliases.
|
||||
PACKAGES_ROOT := $(CACHE_ROOT)/packages
|
||||
_ := $(call ENSURE_GITIGNORE_ALL,$(PACKAGES_ROOT))
|
||||
# PACKAGE_STORE is where we store all the package files themselves
|
||||
# addressed by their input hashes.
|
||||
PACKAGE_STORE := $(PACKAGES_ROOT)/store
|
||||
_ := $(call ENSURE_GITIGNORE_ALL,$(PACKAGE_STORE))
|
||||
# BY_ALIAS is where we store alias symlinks to the store.
|
||||
BY_ALIAS := $(PACKAGES_ROOT)/by-alias
|
||||
_ := $(call ENSURE_GITIGNORE_ALL,$(BY_ALIAS))
|
||||
|
||||
# SPEC is the human-managed description of which packages we are able to build.
|
||||
SPEC_FILE_PATTERN := packages*.yml
|
||||
SPEC := $(shell cd $(REPO_ROOT); find . -mindepth 1 -maxdepth 1 -name '$(SPEC_FILE_PATTERN)')
|
||||
ifneq ($(words $(SPEC)),1)
|
||||
$(error Found $(words $(SPEC)) $(SPEC_FILE_PATTERN) files, need exactly 1: $(SPEC))
|
||||
endif
|
||||
|
||||
SPEC_FILENAME := $(notdir $(SPEC))
|
||||
SPEC_MODIFIER := $(SPEC_FILENAME:packages%.yml=%)
|
||||
|
||||
# LOCKDIR contains the lockfile and layer files.
|
||||
LOCKDIR := packages$(SPEC_MODIFIER).lock
|
||||
|
||||
# BUILDER_IMAGE_PREFIX is used in generating layers' docker image names.
|
||||
BUILDER_IMAGE_PREFIX := build-layer
|
||||
|
||||
# LOCK is the generated fully-expanded rendition of SPEC, for use in generating CI
|
||||
# pipelines and other things.
|
||||
LOCK := $(LOCKDIR)/pkgs.yml
|
||||
|
||||
### Utilities and constants
|
||||
GIT_EXCLUDE_PREFIX := :(exclude)
|
||||
# SUM generates the sha1sum of its input.
|
||||
SUM := sha1sum | cut -d' ' -f1
|
||||
# QUOTE_LIST wraps a list of space-separated strings in quotes.
|
||||
QUOTE := $(shell echo "'")
|
||||
QUOTE_LIST = $(addprefix $(QUOTE),$(addsuffix $(QUOTE),$(1)))
|
||||
GIT_EXCLUDE_LIST = $(call QUOTE_LIST,$(addprefix $(GIT_EXCLUDE_PREFIX),$(1)))
|
||||
### End utilities and constants.
|
||||
|
||||
# ALWAYS_EXCLUDE_SOURCE prevents source from these directories from taking
|
||||
# part in the SOURCE_ID, or from being sent to the builder image layers.
|
||||
# This is important for allowing the head of master to build other commits
|
||||
# where this build system has not been vendored.
|
||||
#
|
||||
# Source in LOCKDIR is encoded as PACKAGE_SPEC_ID and included in paths
|
||||
# and cache keys. Source in .circleci/ should not do much more than call
|
||||
# code in the release/ directory, SPEC is the source of LOCKDIR.
|
||||
ALWAYS_EXCLUDE_SOURCE := $(SPEC) $(LOCKDIR)/ ./packagespec.mk ./.circleci/
|
||||
# ALWAYS_EXCLUD_SOURCE_GIT is git path filter parlance for the above.
|
||||
ALWAYS_EXCLUDE_SOURCE_GIT := $(call GIT_EXCLUDE_LIST,$(ALWAYS_EXCLUDE_SOURCE))
|
||||
|
||||
YQ_PACKAGE_BY_ID = .packages[] | select(.packagespecid == "$(1)")
|
||||
|
||||
# YQ_PACKAGE_PATH is a yq query fragment to select the package PACKAGE_SPEC_ID.
|
||||
# This may be invalid, check that PACKAGE_SPEC_ID is not empty before use.
|
||||
YQ_PACKAGE_PATH := $(call YQ_PACKAGE_BY_ID,$(PACKAGE_SPEC_ID))
|
||||
|
||||
YQ_PACKAGE_PATH_BY_ID = $(call YQ_PACKAGE_BY_ID,$(1))
|
||||
|
||||
# QUERY_LOCK is a macro to query the lock file.
|
||||
QUERY_LOCK = cd $(REPO_ROOT); yq -r '$(1)' < $(LOCK)
|
||||
|
||||
QUERY_SPEC = cd $(REPO_ROOT); yq -r '$(1)' < $(SPEC)
|
||||
|
||||
# QUERY_PACKAGESPEC queries the package according to the current PACKAGE_SPEC_ID.
|
||||
QUERY_PACKAGESPEC = $(call QUERY_LOCK,$(YQ_PACKAGE_PATH) | $(1))
|
||||
QUERY_PACKAGESPEC_BY_ID = $(call QUERY_LOCK,$(call YQ_PACKAGE_PATH_BY_ID,$(1)) | $(2))
|
||||
|
||||
# GIT_COMMIT_OR_TAG_REF returns the git commit or tag ref SHA that the passed
|
||||
# commit-ish points to (that can be a commit, tag or branch ref).
|
||||
#
|
||||
# Note we used to suffix the passed commit-ish with '^{}' in order to traverse tags down
|
||||
# to individual commits, in case the commit-ish is an annotated tag. However this
|
||||
# makes build output confusing in case a tag ref is used rather than a commit ref.
|
||||
# Therefore we now allow building tag refs, even though this means sometimes we might
|
||||
# be building the same source with two different source IDs, and potentially wasting
|
||||
# some potential cache hits. The tradeoff in terms of ease of use seems worth it for
|
||||
# now, but this could be revisited later.
|
||||
# The original of the line below was:
|
||||
define GIT_COMMIT_OR_TAG_REF
|
||||
git rev-parse --verify '$(1)'
|
||||
endef
|
||||
|
||||
ifeq ($(PACKAGE_SOURCE_ID),)
|
||||
# Even though layers may have different Git revisions, based on the latest
|
||||
# revision of their source, we always want to
|
||||
# honour either HEAD or the specified PRODUCT_REVISION for compiling the
|
||||
# final binaries, as this revision is the one picked by a human to form
|
||||
# the release, and may be baked into the binaries produced.
|
||||
ifeq ($(PRODUCT_REVISION),)
|
||||
# If PRODUCT_REVISION is empty (the default) we are concerned with building the
|
||||
# current work tree, regardless of whether it is dirty or not. For local builds
|
||||
# this is more convenient and more likely expected behaviour than having to commit
|
||||
# just to perform a new build.
|
||||
#
|
||||
# Determine the PACKAGE_SOURCE_ID.
|
||||
#
|
||||
# Dirty package builds should never be cached because their PACKAGE_SOURCE_ID
|
||||
# is not unique to the code, it just reflects the last commit ID in the git log
|
||||
# prefixed with dirty_<dirty_files_sha>.
|
||||
GIT_REF := HEAD
|
||||
ALLOW_DIRTY ?= YES
|
||||
PRODUCT_REVISION_NICE_NAME := <current-workdir>
|
||||
DIRTY_FILES := $(shell cd $(REPO_ROOT) && git ls-files -o -m --exclude-standard -- $(ALWAYS_EXCLUDE_SOURCE_GIT) | xargs)
|
||||
ifneq ($(DIRTY_FILES),)
|
||||
DIRTY := dirty_$(shell cd $(REPO_ROOT) && cat $(DIRTY_FILES) | $(SUM) || echo FAIL)_
|
||||
ifeq ($(findstring FAIL_,$(DIRTY)),FAIL_)
|
||||
$(error Failed to determine dirty files sha1sum)
|
||||
endif
|
||||
endif
|
||||
PACKAGE_SOURCE_ID := $(DIRTY)$(shell $(call GIT_COMMIT_OR_TAG_REF,$(GIT_REF)))
|
||||
else
|
||||
|
||||
# PRODUCT_REVISION is non-empty so treat it as a git commit ref and pull files
|
||||
# directly from git rather than the work tree.
|
||||
GIT_REF := $(PRODUCT_REVISION)
|
||||
ALLOW_DIRTY := NO
|
||||
PRODUCT_REVISION_NICE_NAME := $(PRODUCT_REVISION)
|
||||
PACKAGE_SOURCE_ID := $(shell if COMMIT=$$($(call GIT_COMMIT_OR_TAG_REF,$(PRODUCT_REVISION))); then echo $$COMMIT; else echo FAILED; fi)
|
||||
|
||||
ifeq ($(PACKAGE_SOURCE_ID),FAILED)
|
||||
$(error Unable to find git ref "$(PRODUCT_REVISION)", do you need to 'git fetch' it?)
|
||||
endif
|
||||
|
||||
endif
|
||||
endif
|
||||
|
||||
export PRODUCT_REVISION GIT_REF ALLOW_DIRTY PACKAGE_SOURCE_ID
|
||||
|
||||
# REQ_TOOLS detects availability of a set of tools, and optionally auto-installs them.
|
||||
define REQ_TOOLS
|
||||
GROUP_NAME := $(1)
|
||||
INSTALL_TOOL := $(2)
|
||||
INSTALL_COMMAND := $(3)
|
||||
TOOLS := $(4)
|
||||
TOOL_INSTALL_LOG := $(REPO_ROOT)/$(CACHE_ROOT)/tool-install-$$(GROUP_NAME).log
|
||||
_ := $$(shell mkdir -p $$(dir $$(TOOL_INSTALL_LOG)))
|
||||
INSTALL_TOOL_AVAILABLE := $$(shell command -v $$(INSTALL_TOOL) > /dev/null 2>&1 && echo YES)
|
||||
ATTEMPT_AUTO_INSTALL := NO
|
||||
ifeq ($$(INSTALL_TOOL_AVAILABLE),YES)
|
||||
ifeq ($$(AUTO_INSTALL_TOOLS),YES)
|
||||
ATTEMPT_AUTO_INSTALL := YES
|
||||
endif
|
||||
endif
|
||||
MISSING_PACKAGES := $$(shell \
|
||||
for T in $$(TOOLS); do \
|
||||
BIN=$$$$(echo $$$$T | cut -d':' -f1); \
|
||||
if ! command -v $$$$BIN > /dev/null 2>&1; then \
|
||||
echo $$$$T | cut -d':' -f2; \
|
||||
fi; \
|
||||
done | sort | uniq)
|
||||
ifneq ($$(MISSING_PACKAGES),)
|
||||
ifneq ($$(ATTEMPT_AUTO_INSTALL),YES)
|
||||
$$(error You are missing required tools, please run '$$(INSTALL_COMMAND) $$(MISSING_PACKAGES)'.)
|
||||
else
|
||||
RESULT := $$(shell $$(INSTALL_COMMAND) $$(MISSING_PACKAGES) && echo OK > $$(TOOL_INSTALL_LOG))
|
||||
ifneq ($$(shell cat $$(TOOL_INSTALL_LOG)),OK)
|
||||
$$(info Failed to auto-install packages with command $$(INSTALL_COMMAND) $$(MISSING_PACKAGES))
|
||||
$$(error $$(shell cat $$(TOOL_INSTALL_LOG)))
|
||||
else
|
||||
$$(info $$(TOOL_INSTALL_LOG))
|
||||
$$(info Installed $$(GROUP_NAME) tools successfully.)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endef
|
||||
|
||||
ifeq ($(shell uname),Darwin)
|
||||
# On Mac, try to install things with homebrew.
|
||||
BREW_TOOLS := gln:coreutils gtouch:coreutils gstat:coreutils \
|
||||
gtar:gnu-tar gfind:findutils jq:jq yq:python-yq
|
||||
$(eval $(call REQ_TOOLS,brew,brew,brew install,$(BREW_TOOLS)))
|
||||
else
|
||||
# If not mac, try to install using apt.
|
||||
SUDO := $(shell which sudo 2>/dev/null || true)
|
||||
APT_TOOLS := pip3:python3-pip jq:jq column:bsdmainutils
|
||||
$(eval $(call REQ_TOOLS,apt,apt-get,$(SUDO) apt-get update && $(SUDO) apt-get install -y,$(APT_TOOLS)))
|
||||
PIP_TOOLS := yq:yq
|
||||
$(eval $(call REQ_TOOLS,pip,pip3,pip3 install,$(PIP_TOOLS)))
|
||||
|
||||
endif
|
||||
|
||||
# We rely on GNU touch, tar and ln.
|
||||
# On macOS, we assume they are installed as gtouch, gtar, gln by homebrew.
|
||||
ifeq ($(shell uname),Darwin)
|
||||
TOUCH := gtouch
|
||||
TAR := gtar
|
||||
LN := gln
|
||||
STAT := gstat
|
||||
FIND := gfind
|
||||
else
|
||||
TOUCH := touch
|
||||
TAR := tar
|
||||
LN := ln
|
||||
STAT := stat
|
||||
FIND := find
|
||||
endif
|
||||
|
||||
# Read config from the spec.
|
||||
|
||||
# PRODUCT_REPO is the official Git repo for this project.
|
||||
PRODUCT_REPO := $(shell $(call QUERY_SPEC,.config["product-repo"]))
|
||||
|
||||
# PRODUCT_REPO_LOCAL is the local clone of this git repo.
|
||||
PRODUCT_REPO_LOCAL := $(REPO_ROOT)
|
||||
|
||||
# RELEASE_REPO is the release repository for this project.
|
||||
PRODUCT_RELEASE_REPO := $(shell $(call QUERY_SPEC,.config["release-repo"]))
|
||||
|
||||
# PRODUCT_PATH must be unique for every repo.
|
||||
# A golang-style package path is ideal.
|
||||
PRODUCT_PATH := $(shell $(call QUERY_SPEC,.config["product-id"]))
|
||||
|
||||
# PRODUCT_CIRCLECI_SLUG is the slug of this repo's CircleCI project.
|
||||
PRODUCT_CIRCLECI_SLUG := $(shell $(call QUERY_SPEC,.config["circleci-project-slug"]))
|
||||
|
||||
# PRODUCT_CIRCLECI_HOST is the host configured to build this repo.
|
||||
PRODUCT_CIRCLECI_HOST := $(shell $(call QUERY_SPEC,.config["circleci-host"]))
|
||||
|
||||
export ON_PUBLISH := $(shell $(call QUERY_SPEC,.config["on-publish"]))
|
||||
|
||||
# End including config once only.
|
||||
endif
|
||||
@ -1,361 +0,0 @@
|
||||
# ***
|
||||
# WARNING: Do not EDIT or MERGE this file, it is generated by packagespec.
|
||||
# ***
|
||||
# layer.mk contains the machinery to incrementally build the builder image
|
||||
# as separate layers, so each can be cached both locally and in CI. This serves
|
||||
# both to speed up builds by avoiding unnecessary repetition of work already done,
|
||||
# as well as to ehnance the reliability of builds by downloading external
|
||||
# dependencies only once per build when necessary.
|
||||
#
|
||||
# The build layers themselves can be individually exported as tarballs (by calling
|
||||
# make <layer-name>-save) for later inspection, for sharing, or for implementing
|
||||
# on-host caching without recourse to external docker registries.
|
||||
#
|
||||
# To use this file, include it in another makefile, and from there you must eval
|
||||
# calls to the LAYER macro with this syntax:
|
||||
#
|
||||
# $(eval $(call LAYER,<name>,<type>,<parent-name>,<source-include>,<source-exclude>))
|
||||
#
|
||||
# Each layer assumes the existence of a Dockerfile named <name>.Dockerfile in
|
||||
# packages.lock/layers.
|
||||
# It uses the <parent-name> to set a Docker build arg called BASE_IMAGE to the
|
||||
# resultant docker image ref of the named parent layer. You should use this BASE_IMAGE
|
||||
# in the FROM line in your image.
|
||||
#
|
||||
# There must also be a base image which has no parent, and that Dockerfile should
|
||||
# use a FROM line from an explicit docker image, e.g. debian:buster.
|
||||
#
|
||||
# Each image is provided only the source code identified by <source-include>, minus
|
||||
# any source code matched by <source-exclude>. Source code is any files which are
|
||||
# present and not ignored by Git. This includes cached files, modified files and new,
|
||||
# untracked files. The Dockerfile belonging to this layer is ALWAYS included in the
|
||||
# source, so you don't need to manually specify that.
|
||||
#
|
||||
# The set of source code identified by a single image layer is used to produce its
|
||||
# SOURCE_ID. The SOURCE_ID, when all the files are tracked by Git and are not modified
|
||||
# equals the latest Git commit SHA that affected any of those files or directories.
|
||||
# When there are any new or modified files, we take a SHA 256 sum of the latest Git
|
||||
# commit affecting those files concatenated with the output of git diff and the contents
|
||||
# of any untracked files, and prefix this with "dirty_". The SOURCE_ID is used as part of
|
||||
# the cache key for that layer.
|
||||
#
|
||||
# Because different combinations of source-include and source-exclude may have been
|
||||
# modified by the same commit, they may share the same source ID. Therefore, we also
|
||||
# calculate the LAYER_ID which takes into account not only the current layer's source
|
||||
# ID, but also its source include/exclude and the ID of its base layer. Thus any change
|
||||
# in any of the inputs of any base layer invalidates the cache of all subsequent layers.
|
||||
|
||||
include $(shell git rev-parse --show-toplevel)/packages*.lock/config.mk
|
||||
|
||||
.SECONDARY:
|
||||
|
||||
_ := $(shell mkdir -p $(CACHE_ROOT)/source-archives)
|
||||
|
||||
### END BUILDER IMAGE LAYERS
|
||||
|
||||
## LAYER
|
||||
|
||||
# The LAYER macro defines all the targets for each image defined above.
|
||||
#
|
||||
# The phony targets are the ones we typically run ourselves or in CI, they are:
|
||||
#
|
||||
# <name>-debug : dump debug info for this image layer
|
||||
# <name>-image : build the image for this image layer
|
||||
# <name>-save : save the docker image for this layer as a tar.gz
|
||||
# <name>-load : load this image from the saved tar.gz
|
||||
|
||||
define LAYER
|
||||
LAYERS += $(1)
|
||||
$(1)_NAME := $(1)
|
||||
$(1)_TYPE := $(2)
|
||||
$(1)_BASE := $(3)
|
||||
$(1)_SOURCE_INCLUDE := $(4)
|
||||
$(1)_SOURCE_EXCLUDE := $(sort $(5) $(ALWAYS_EXCLUDE_SOURCE))
|
||||
$(1)_CACHE_KEY_FILE := $(REPO_ROOT)/$(6)
|
||||
$(1)_IMAGE_ARCHIVE := $(REPO_ROOT)/$(7)
|
||||
|
||||
$(1)_CACHE_ROOT := $(CACHE_ROOT)/layers/$$($(1)_NAME)
|
||||
|
||||
ifneq ($$($(1)_BASE),)
|
||||
$(1)_BASE_CACHE_ROOT := $(CACHE_ROOT)/layers/$$($(1)_BASE)
|
||||
$(1)_BASE_ID_FILE := $$($(1)_BASE_CACHE_ROOT)/current-layer-id
|
||||
$(1)_BASE_LAYER_ID := $$(shell cat $$($(1)_BASE_ID_FILE))
|
||||
$(1)_BASE_CACHE := $$($(1)_BASE_CACHE_ROOT)/$$($(1)_BASE_LAYER_ID)
|
||||
$(1)_BASE_IMAGE := $$($(1)_BASE_CACHE)/image.marker
|
||||
$(1)_BASE_IMAGE_NAME = $$(shell cat $$($(1)_BASE_IMAGE))
|
||||
endif
|
||||
|
||||
# If no source is included, set source ID to none.
|
||||
# Note that we include the checksum of the generated Dockerfile as part of cache IDs
|
||||
# so we still invalidate the cache appropriately.
|
||||
ifeq ($$($(1)_SOURCE_INCLUDE),)
|
||||
|
||||
$(1)_SOURCE_CMD := echo ""
|
||||
$(1)_SOURCE_ID := packagespec-only-$$($(1)_NAME)
|
||||
$(1)_SOURCE_ID_NICE_NAME := <packagespec-only>
|
||||
|
||||
else
|
||||
|
||||
$(1)_SOURCE_GIT = $$(call QUOTE_LIST,$$($(1)_SOURCE_INCLUDE)) $$(call GIT_EXCLUDE_LIST,$$($(1)_SOURCE_EXCLUDE))
|
||||
$(1)_SOURCE_COMMIT := $$(shell git rev-list -n1 $(GIT_REF) -- $$($(1)_SOURCE_GIT))
|
||||
|
||||
# If we allow dirty builds, generate the source ID as a function of the
|
||||
# source in in the current work tree. Where the source all happens to match a Git commit,
|
||||
# that commit's SHA will be the source ID.
|
||||
ifeq ($(ALLOW_DIRTY),YES)
|
||||
|
||||
$(1)_SOURCE_CMD := { { \
|
||||
git ls-files -- $$($(1)_SOURCE_GIT); \
|
||||
git ls-files -m --exclude-standard -- $$($(1)_SOURCE_GIT); \
|
||||
} | sort | uniq; }
|
||||
|
||||
$(1)_SOURCE_MODIFIED := $$(shell git ls-files -m -- $$($(1)_SOURCE_GIT) | xargs)
|
||||
$(1)_SOURCE_NEW := $$(shell git ls-files -o --exclude-standard -- $$($(1)_SOURCE_GIT) | xargs)
|
||||
$(1)_SOURCE_DIRTY_LIST := $$(shell echo "$$($(1)_SOURCE_MODIFIED) $$($(1)_SOURCE_NEW)" | xargs)
|
||||
$(1)_SOURCE_DIRTY_SUM := $$(shell [ -z "$$($(1)_SOURCE_DIRTY_LIST)" ] || cat $$($(1)_SOURCE_DIRTY_LIST) | $(SUM))
|
||||
|
||||
$(1)_SOURCE_ID := $$(shell if [ -z "$$($(1)_SOURCE_DIRTY_LIST)" ]; then \
|
||||
echo "$$($(1)_SOURCE_COMMIT)"; \
|
||||
else \
|
||||
echo -n "dirty_$$($(1)_SOURCE_DIRTY_SUM)"; \
|
||||
fi)
|
||||
|
||||
$(1)_ID_PREFIX := $$(shell [ -z "$$($(1)_SOURCE_DIRTY_LIST)" ] || echo "dirty_")
|
||||
|
||||
$(1)_SOURCE_ID_NICE_NAME := $$($(1)_SOURCE_ID)
|
||||
|
||||
# No dirty builds allowed, so the SOURCE_ID is the git commit SHA,
|
||||
# and we list files using git ls-tree.
|
||||
else
|
||||
|
||||
$(1)_SOURCE_ID := $$($(1)_SOURCE_COMMIT)
|
||||
$(1)_SOURCE_ID_NICE_NAME := $$($(1)_SOURCE_ID)
|
||||
$(1)_SOURCE_CMD := git ls-tree -r --name-only $(GIT_REF) -- $$($(1)_SOURCE_GIT)
|
||||
|
||||
endif
|
||||
endif
|
||||
|
||||
# LAYER_ID_CONTENTS dictates all the fields that can cause cache invalidation
|
||||
# to propagate from the current layer to all dependent layers.
|
||||
define $(1)_LAYER_ID_CONTENTS
|
||||
BASE_LAYER_ID=$$($(1)_BASE_LAYER_ID);
|
||||
LAYER_NAME=$$($(1)_NAME);
|
||||
SOURCE_ID=$$($(1)_SOURCE_ID);
|
||||
SOURCE_INCLUDE=$$($(1)_SOURCE_INCLUDE);
|
||||
SOURCE_EXCLUDE=$$($(1)_SOURCE_EXCLUDE);
|
||||
endef
|
||||
|
||||
$(1)_LAYER_ID_CONTENTS_FILE := $$($(1)_CACHE_ROOT)/current-layer-id-contents
|
||||
$(1)_LAYER_ID_FILE := $$($(1)_CACHE_ROOT)/current-layer-id
|
||||
$(1)_DOCKERFILE := $$($(1)_CACHE_ROOT)/Dockerfile
|
||||
|
||||
# Create cache root dir and write LAYER_ID_FILE_CONTENTS file.
|
||||
_ := $$(shell \
|
||||
mkdir -p $$($(1)_CACHE_ROOT); \
|
||||
echo "$$($(1)_LAYER_ID_CONTENTS)" > $$($(1)_LAYER_ID_CONTENTS_FILE); \
|
||||
)
|
||||
|
||||
$(1)_LAYER_ID := $$($(1)_ID_PREFIX)$$(shell cat $$($(1)_LAYER_ID_CONTENTS_FILE) | $(SUM))
|
||||
$(1)_SOURCE_ARCHIVE := $(CACHE_ROOT)/source-archives/$$($(1)_TYPE)-$$($(1)_LAYER_ID).tar
|
||||
$(1)_IMAGE_NAME := $(BUILDER_IMAGE_PREFIX)-$$($(1)_NAME):$$($(1)_LAYER_ID)
|
||||
$(1)_CACHE := $(CACHE_ROOT)/layers/$$($(1)_NAME)/$$($(1)_LAYER_ID)
|
||||
|
||||
|
||||
ifeq ($(DEBUG),YES)
|
||||
$$(info ===== LAYER DEBUG INFO ($(1)) )
|
||||
$$(info SOURCE_GIT=$$($(1)_SOURCE_GIT))
|
||||
$$(info SOURCE_COMMIT=$$($(1)_SOURCE_COMMIT))
|
||||
$$(info SOURCE_MODIFIED=$$($(1)_SOURCE_MODIFIED))
|
||||
$$(info SOURCE_NEW=$$($(1)_SOURCE_NEW))
|
||||
$$(info SOURCE_DIRTY_LIST=$$($(1)_SOURCE_DIRTY_LIST))
|
||||
$$(info SOURCE_DIRTY_SUM=$$($(1)_SOURCE_DIRTY_SUM))
|
||||
$$(info SOURCE_ID=$$($(1)_SOURCE_ID))
|
||||
$$(info LAYER_ID=$$($(1)_LAYER_ID))
|
||||
$$(info SOURCE_LIST=$$(shell $$($(1)_SOURCE_CMD)))
|
||||
$$(info =====)
|
||||
endif
|
||||
|
||||
|
||||
# Create cache dir and write Layer ID file.
|
||||
_ := $$(shell \
|
||||
mkdir -p $$($(1)_CACHE); \
|
||||
echo $$($(1)_LAYER_ID) > $$($(1)_LAYER_ID_FILE); \
|
||||
)
|
||||
|
||||
$(1)_PHONY_TARGET_NAMES := debug id image save load
|
||||
|
||||
$(1)_PHONY_TARGETS := $$(addprefix $$($(1)_NAME)-,$$($(1)_PHONY_TARGET_NAMES))
|
||||
|
||||
.PHONY: $$($(1)_PHONY_TARGETS)
|
||||
|
||||
# File targets.
|
||||
$(1)_IMAGE := $$($(1)_CACHE)/image.marker
|
||||
$(1)_LAYER_REFS := $$($(1)_CACHE)/image.layer_refs
|
||||
$(1)_IMAGE_TIMESTAMP := $$($(1)_CACHE)/image.created_time
|
||||
|
||||
$(1)_TARGETS = $$($(1)_PHONY_TARGETS)
|
||||
|
||||
# UPDATE_MARKER_FILE ensures the image marker file has the same timestamp as the
|
||||
# docker image creation date it represents. This enables make to only rebuild it when
|
||||
# it has really changed, especially after loading the image from an archive.
|
||||
# It also writes a list of all the layers in this docker image's history, for use
|
||||
# when saving layers out to archives for use in pre-populating Docker build caches.
|
||||
define $(1)_UPDATE_MARKER_FILE
|
||||
export MARKER=$$($(1)_IMAGE); \
|
||||
export LAYER_REFS=$$($(1)_LAYER_REFS); \
|
||||
export IMAGE=$$($(1)_IMAGE_NAME); \
|
||||
export IMAGE_CREATED; \
|
||||
if ! { IMAGE_CREATED="$$$$(docker inspect -f '{{.Created}}' $$$$IMAGE 2>/dev/null)"; }; then \
|
||||
if [ -f "$$$$MARKER" ]; then \
|
||||
echo "==> Removing stale marker file for $$$$IMAGE" 1>&2; \
|
||||
rm -f $$$$MARKER; \
|
||||
fi; \
|
||||
exit 0; \
|
||||
fi; \
|
||||
if [ ! -f "$$$$MARKER" ]; then \
|
||||
echo "==> Writing marker file for $$$$IMAGE (created $$$$IMAGE_CREATED)" 1>&2; \
|
||||
fi; \
|
||||
echo $$$$IMAGE > $$$$MARKER; \
|
||||
$(TOUCH) -m -d $$$$IMAGE_CREATED $$$$MARKER; \
|
||||
echo "$$$$IMAGE" > $$$$LAYER_REFS; \
|
||||
docker history --no-trunc -q $$$$IMAGE | grep -Fv '<missing>' >> $$$$LAYER_REFS;
|
||||
endef
|
||||
|
||||
## PHONY targets
|
||||
$(1)-debug:
|
||||
@echo "==> Debug info: $$($(1)_NAME) depends on $$($(1)_BASE)"
|
||||
@echo "$(1)_TARGETS = $$($(1)_TARGETS)"
|
||||
@echo "$(1)_SOURCE_CMD = $$($(1)_SOURCE_CMD)"
|
||||
@echo "$(1)_CACHE = $$($(1)_CACHE)"
|
||||
@echo "$(1)_DOCKERFILE = $$($(1)_DOCKERFILE)"
|
||||
@echo "$(1)_SOURCE_COMMIT = $$($(1)_SOURCE_COMMIT)"
|
||||
@echo "$(1)_SOURCE_ID = $$($(1)_SOURCE_ID)"
|
||||
@echo "$(1)_SOURCE_MODIFIED = $$($(1)_SOURCE_MODIFIED)"
|
||||
@echo "$(1)_SOURCE_NEW = $$($(1)_SOURCE_NEW)"
|
||||
@echo "$(1)_IMAGE = $$($(1)_IMAGE)"
|
||||
@echo "$(1)_IMAGE_TIMESTAMP = $$($(1)_IMAGE_TIMESTAMP)"
|
||||
@echo "$(1)_IMAGE_ARCHIVE = $$($(1)_IMAGE_ARCHIVE)"
|
||||
@echo "$(1)_BASE_IMAGE = $$($(1)_BASE_IMAGE)"
|
||||
@echo
|
||||
|
||||
$(1)-id:
|
||||
@echo $(1)-$$($(1)_SOURCE_ID)
|
||||
|
||||
$(1)-write-cache-key:
|
||||
@mkdir -p $$(dir $$($(1)_CACHE_KEY_FILE)); \
|
||||
cp $$($(1)_LAYER_ID_CONTENTS_FILE) $$($(1)_CACHE_KEY_FILE); \
|
||||
echo "==> Cache key for $(1) written to $$($(1)_CACHE_KEY_FILE)"; \
|
||||
cat $$($(1)_CACHE_KEY_FILE)
|
||||
|
||||
$(1)-image: $$($(1)_IMAGE)
|
||||
@cat $$<
|
||||
|
||||
$(1)-layer-refs: $$($(1)_LAYER_REFS)
|
||||
@echo $$<
|
||||
|
||||
$(1)-save: $$($(1)_IMAGE_ARCHIVE)
|
||||
@echo $$<
|
||||
|
||||
$(1)-load:
|
||||
@\
|
||||
ARCHIVE=$$($(1)_IMAGE_ARCHIVE); \
|
||||
IMAGE=$$($(1)_IMAGE_NAME); \
|
||||
MARKER=$$($(1)_IMAGE); \
|
||||
rm -f $$$$MARKER; \
|
||||
echo "==> Loading $$$$IMAGE image from $$$$ARCHIVE"; \
|
||||
docker load < $$$$ARCHIVE
|
||||
@$$(call $(1)_UPDATE_MARKER_FILE)
|
||||
|
||||
## END PHONY targets
|
||||
|
||||
# Set the BASE_IMAGE build arg to reference the appropriate base image,
|
||||
# unless there is no referenced base image.
|
||||
$(1)_DOCKER_BUILD_ARGS = $$(shell [ -z "$$($(1)_BASE)" ] || echo --build-arg BASE_IMAGE=$$$$(cat $$($(1)_BASE_IMAGE)))
|
||||
|
||||
$(1)_SOURCE_ARCHIVE_WITH_DOCKERFILE := $$($(1)_CACHE)/source-archive.tar
|
||||
|
||||
$$($(1)_DOCKERFILE):
|
||||
@mkdir -p "$$(dir $$(@))"
|
||||
@$$(call QUERY_LOCK,.layers[] | select(.name=="$$($(1)_NAME)").dockerfile) > "$$@"
|
||||
|
||||
# Build the docker image.
|
||||
#
|
||||
# For dirty builds, tar up a source archive from the local filesystem.
|
||||
# We --ignore-failed-read so that deleted files that are not
|
||||
# committed do not cause problems. This should be OK for dirty builds.
|
||||
#
|
||||
# For non-dirty builds, ask Git directly for a source archive.
|
||||
#
|
||||
# We explicitly set the TAR format to ustar because this seems more compatible
|
||||
# with Docker than any other format. In future we should change this to POSIX
|
||||
# once Docker supports that properly, because ustar only supports filenames
|
||||
# < 256 chars which could eventually be an issue.
|
||||
TAR_FORMAT := --format=ustar
|
||||
export DOCKER_BUILDKIT=1
|
||||
$(1)_FULL_DOCKER_BUILD_COMMAND = docker build --ssh=default -t $$($(1)_IMAGE_NAME) $$($(1)_DOCKER_BUILD_ARGS) \
|
||||
-f $$($(1)_DOCKERFILE) - < $$($(1)_SOURCE_ARCHIVE_WITH_DOCKERFILE)
|
||||
|
||||
$$($(1)_IMAGE): $$($(1)_BASE_IMAGE) $$($(1)_DOCKERFILE)
|
||||
@$$(call $(1)_UPDATE_MARKER_FILE)
|
||||
@if [ -f "$$@" ]; then exit 0; fi; \
|
||||
echo "==> Building Docker image $$($(1)_IMAGE_NAME)"; \
|
||||
echo " Layer name : $$($(1)_NAME)"; \
|
||||
echo " Layer source ID : $$($(1)_SOURCE_ID_NICE_NAME)"; \
|
||||
echo " For product revision : $(PRODUCT_REVISION_NICE_NAME)"; \
|
||||
echo " For package source ID : $(PACKAGE_SOURCE_ID)"; \
|
||||
if [ ! -f "$$($(1)_SOURCE_ARCHIVE)" ]; then \
|
||||
if [ "$(ALLOW_DIRTY)" = "YES" ]; then \
|
||||
echo "==> Building source archive from working directory: $$($(1)_SOURCE_ARCHIVE)" 1>&2; \
|
||||
$$($(1)_SOURCE_CMD) | $(TAR) --create $(TAR_FORMAT) --file $$($(1)_SOURCE_ARCHIVE) --ignore-failed-read -T -; \
|
||||
else \
|
||||
echo "==> Building source archive from git: $$($(1)_SOURCE_ARCHIVE)" 1>&2; \
|
||||
git archive --format=tar $(GIT_REF) $$($(1)_SOURCE_GIT) > $$($(1)_SOURCE_ARCHIVE); \
|
||||
fi; \
|
||||
fi; \
|
||||
if [ ! -f "$$($(1)_SOURCE_ARCHIVE_WITH_DOCKERFILE)" ]; then \
|
||||
echo "==> Appending Dockerfile to source archive: $$($(1)_SOURCE_ARCHIVE_WITH_DOCKERFILE)" 1>&2; \
|
||||
cp $$($(1)_SOURCE_ARCHIVE) $$($(1)_SOURCE_ARCHIVE_WITH_DOCKERFILE); \
|
||||
$(TAR) --append $(TAR_FORMAT) $$($(1)_DOCKERFILE) --file $$($(1)_SOURCE_ARCHIVE_WITH_DOCKERFILE); \
|
||||
fi; \
|
||||
echo $$($(1)_FULL_DOCKER_BUILD_COMMAND); \
|
||||
$$($(1)_FULL_DOCKER_BUILD_COMMAND); \
|
||||
$$(call $(1)_UPDATE_MARKER_FILE)
|
||||
|
||||
# Save the docker image as a tar.gz.
|
||||
$$($(1)_IMAGE_ARCHIVE): | $$($(1)_IMAGE)
|
||||
@mkdir -p $$(dir $$@); \
|
||||
IMAGE=$$$$(cat $$($(1)_IMAGE)); \
|
||||
echo "==> Saving $(1) image to $$@"; \
|
||||
docker save $$$$IMAGE \
|
||||
$$$$(docker history -q --no-trunc $$$$IMAGE | grep -v missing) \
|
||||
| gzip > $$@
|
||||
|
||||
$$($(1)_LAYER_REFS):
|
||||
@echo "$$($(1)_IMAGE_NAME)" > $$@
|
||||
@docker history --no-trunc -q $$($(1)_IMAGE_NAME) | grep -Fv '<missing>' >> $$@
|
||||
|
||||
endef
|
||||
|
||||
### END LAYER
|
||||
|
||||
# Include the generated instructions to build each layer.
|
||||
include $(LOCKDIR)/layers/layers.mk
|
||||
|
||||
# Eagerly update the docker image marker files.
|
||||
_ := $(foreach L,$(LAYERS),$(shell $(call $(L)_UPDATE_MARKER_FILE)))
|
||||
|
||||
# DOCKER_LAYER_LIST is used to dump the name of every docker ref in use
|
||||
# by all of the current builder images. By running 'docker save' against
|
||||
# this list, we end up with a tarball that can pre-populate the docker
|
||||
# cache to avoid unnecessary rebuilds.
|
||||
DOCKER_LAYER_LIST := $(CACHE_ROOT)/docker-layer-list
|
||||
|
||||
write-cache-keys: $(addsuffix -write-cache-key,$(LAYERS))
|
||||
@echo "==> All cache keys written."
|
||||
|
||||
build-all-layers: $(addsuffix -image,$(LAYERS))
|
||||
@echo "==> All builder layers built."
|
||||
|
||||
.PHONY: debug
|
||||
debug: $(addsuffix -debug,$(LAYERS))
|
||||
|
||||
@ -1,39 +0,0 @@
|
||||
# ***
|
||||
# WARNING: Do not EDIT or MERGE this file, it is generated by packagespec.
|
||||
# ***
|
||||
|
||||
LAYER_00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f_ID := 00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f
|
||||
LAYER_00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f_TYPE := base
|
||||
LAYER_00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f_BASE_LAYER :=
|
||||
LAYER_00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f_SOURCE_INCLUDE :=
|
||||
LAYER_00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f_SOURCE_EXCLUDE :=
|
||||
LAYER_00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f_CACHE_KEY_FILE := .buildcache/cache-keys/base-4efc6b999f22c2117dd52d796786af51dd4d4d1f
|
||||
LAYER_00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f_ARCHIVE_FILE := .buildcache/archives/00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f.tar.gz
|
||||
$(eval $(call LAYER,$(LAYER_00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f_ID),$(LAYER_00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f_TYPE),$(LAYER_00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f_BASE_LAYER),$(LAYER_00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f_SOURCE_INCLUDE),$(LAYER_00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f_SOURCE_EXCLUDE),$(LAYER_00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f_CACHE_KEY_FILE),$(LAYER_00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f_ARCHIVE_FILE)))
|
||||
|
||||
LAYER_01-ui-00aac246fd625f14356db52ed98a657e40b02a82_ID := 01-ui-00aac246fd625f14356db52ed98a657e40b02a82
|
||||
LAYER_01-ui-00aac246fd625f14356db52ed98a657e40b02a82_TYPE := ui
|
||||
LAYER_01-ui-00aac246fd625f14356db52ed98a657e40b02a82_BASE_LAYER := 00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f
|
||||
LAYER_01-ui-00aac246fd625f14356db52ed98a657e40b02a82_SOURCE_INCLUDE := internal/ui/VERSION
|
||||
LAYER_01-ui-00aac246fd625f14356db52ed98a657e40b02a82_SOURCE_EXCLUDE :=
|
||||
LAYER_01-ui-00aac246fd625f14356db52ed98a657e40b02a82_CACHE_KEY_FILE := .buildcache/cache-keys/ui-00aac246fd625f14356db52ed98a657e40b02a82
|
||||
LAYER_01-ui-00aac246fd625f14356db52ed98a657e40b02a82_ARCHIVE_FILE := .buildcache/archives/01-ui-00aac246fd625f14356db52ed98a657e40b02a82.tar.gz
|
||||
$(eval $(call LAYER,$(LAYER_01-ui-00aac246fd625f14356db52ed98a657e40b02a82_ID),$(LAYER_01-ui-00aac246fd625f14356db52ed98a657e40b02a82_TYPE),$(LAYER_01-ui-00aac246fd625f14356db52ed98a657e40b02a82_BASE_LAYER),$(LAYER_01-ui-00aac246fd625f14356db52ed98a657e40b02a82_SOURCE_INCLUDE),$(LAYER_01-ui-00aac246fd625f14356db52ed98a657e40b02a82_SOURCE_EXCLUDE),$(LAYER_01-ui-00aac246fd625f14356db52ed98a657e40b02a82_CACHE_KEY_FILE),$(LAYER_01-ui-00aac246fd625f14356db52ed98a657e40b02a82_ARCHIVE_FILE)))
|
||||
|
||||
LAYER_02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445_ID := 02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445
|
||||
LAYER_02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445_TYPE := go-modules
|
||||
LAYER_02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445_BASE_LAYER := 01-ui-00aac246fd625f14356db52ed98a657e40b02a82
|
||||
LAYER_02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445_SOURCE_INCLUDE := go.mod go.sum */go.mod */go.sum
|
||||
LAYER_02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445_SOURCE_EXCLUDE :=
|
||||
LAYER_02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445_CACHE_KEY_FILE := .buildcache/cache-keys/go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445
|
||||
LAYER_02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445_ARCHIVE_FILE := .buildcache/archives/02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445.tar.gz
|
||||
$(eval $(call LAYER,$(LAYER_02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445_ID),$(LAYER_02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445_TYPE),$(LAYER_02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445_BASE_LAYER),$(LAYER_02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445_SOURCE_INCLUDE),$(LAYER_02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445_SOURCE_EXCLUDE),$(LAYER_02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445_CACHE_KEY_FILE),$(LAYER_02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445_ARCHIVE_FILE)))
|
||||
|
||||
LAYER_03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d_ID := 03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d
|
||||
LAYER_03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d_TYPE := copy-source
|
||||
LAYER_03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d_BASE_LAYER := 02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445
|
||||
LAYER_03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d_SOURCE_INCLUDE := *.go *.up.sql
|
||||
LAYER_03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d_SOURCE_EXCLUDE :=
|
||||
LAYER_03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d_CACHE_KEY_FILE := .buildcache/cache-keys/copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d
|
||||
LAYER_03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d_ARCHIVE_FILE := .buildcache/archives/03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d.tar.gz
|
||||
$(eval $(call LAYER,$(LAYER_03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d_ID),$(LAYER_03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d_TYPE),$(LAYER_03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d_BASE_LAYER),$(LAYER_03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d_SOURCE_INCLUDE),$(LAYER_03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d_SOURCE_EXCLUDE),$(LAYER_03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d_CACHE_KEY_FILE),$(LAYER_03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d_ARCHIVE_FILE)))
|
||||
@ -1,854 +0,0 @@
|
||||
# ***
|
||||
# WARNING: Do not EDIT or MERGE this file, it is generated by packagespec.
|
||||
# ***
|
||||
lockid: 3192f2391fc0b61f
|
||||
packagespec-version: 0.2.6
|
||||
cache-version: 10
|
||||
packages:
|
||||
- packagespecid: 670845158e5231aa2b5c48603a20853d48f68ef2
|
||||
inputs:
|
||||
BINARY_NAME: boundary
|
||||
BUILD_TAGS: ui
|
||||
CGO_ENABLED: "0"
|
||||
GOARCH: amd64
|
||||
GOOS: darwin
|
||||
PRODUCT_NAME: boundary
|
||||
PRODUCT_VERSION: 0.7.4
|
||||
PRODUCT_VERSION_MMP: 0.7.4
|
||||
PRODUCT_VERSION_PRE: ""
|
||||
meta:
|
||||
BUILD_JOB_NAME: darwin_amd64_package
|
||||
BUNDLE_NAME: boundary_0.7.4
|
||||
builtin:
|
||||
BUILD_LAYERS:
|
||||
- type: copy-source
|
||||
name: 03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d
|
||||
archive: .buildcache/archives/03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d.tar.gz
|
||||
- type: go-modules
|
||||
name: 02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445
|
||||
archive: .buildcache/archives/02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445.tar.gz
|
||||
- type: ui
|
||||
name: 01-ui-00aac246fd625f14356db52ed98a657e40b02a82
|
||||
archive: .buildcache/archives/01-ui-00aac246fd625f14356db52ed98a657e40b02a82.tar.gz
|
||||
- type: base
|
||||
name: 00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f
|
||||
archive: .buildcache/archives/00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f.tar.gz
|
||||
PACKAGE_CACHE_KEY_FILE: .buildcache/cache-keys/package-670845158e5231aa2b5c48603a20853d48f68ef2
|
||||
POST_PROCESSORS: apple-notarize av-scan
|
||||
circleci:
|
||||
BUILDER_CACHE_KEY_PREFIX_LIST:
|
||||
- copy-source_2180_{{checksum ".buildcache/cache-keys/copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d"}}
|
||||
- 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"}}
|
||||
PACKAGE_CACHE_KEY: package-670845158e5231aa2b5c48603a20853d48f68ef2-{{checksum ".buildcache/cache-keys/package-670845158e5231aa2b5c48603a20853d48f68ef2"}}
|
||||
build-command: VERSION_PKG_PATH=github.com/hashicorp/boundary/version; BINARY_SUFFIX=""; if [ "${GOOS}x" == "windowsx" ]; then BINARY_SUFFIX=".exe"; fi; unset GOPATH; ORIG_PATH=$(pwd); for PLUGIN_TYPE in host; do for CURR_PLUGIN in $(ls $ORIG_PATH/plugins/$PLUGIN_TYPE/mains); do cd $ORIG_PATH/plugins/$PLUGIN_TYPE/mains/$CURR_PLUGIN; go build -v -o $ORIG_PATH/plugins/$PLUGIN_TYPE/assets/boundary-plugin-${PLUGIN_TYPE}-${CURR_PLUGIN}${BINARY_SUFFIX} .; cd $ORIG_PATH; done; cd $ORIG_PATH/plugins/$PLUGIN_TYPE/assets; for CURR_PLUGIN in $(ls boundary-plugin*); do gzip -9 $CURR_PLUGIN; done; cd $ORIG_PATH; done; go build -v -tags 'ui' -ldflags "-X $VERSION_PKG_PATH.GitCommit=$PACKAGE_SOURCE_ID -X $VERSION_PKG_PATH.Version=0.7.4 -X $VERSION_PKG_PATH.VersionPrerelease=" -o $OUTPUT_DIR/boundary ./cmd/boundary && cd $OUTPUT_DIR && zip $PACKAGE_ZIP_NAME boundary
|
||||
aliases:
|
||||
- type: local
|
||||
path: boundary_0.7.4_darwin_amd64.zip
|
||||
- type: public-hc-releases
|
||||
path: boundary/boundary_0.7.4/boundary_0.7.4_darwin_amd64.zip
|
||||
- packagespecid: fb26f9037b4f9b89f09d316f49c0db87693b022d
|
||||
inputs:
|
||||
BINARY_NAME: boundary
|
||||
BUILD_TAGS: ui
|
||||
CGO_ENABLED: "0"
|
||||
GOARCH: arm64
|
||||
GOOS: darwin
|
||||
PRODUCT_NAME: boundary
|
||||
PRODUCT_VERSION: 0.7.4
|
||||
PRODUCT_VERSION_MMP: 0.7.4
|
||||
PRODUCT_VERSION_PRE: ""
|
||||
meta:
|
||||
BUILD_JOB_NAME: darwin_arm64_package
|
||||
BUNDLE_NAME: boundary_0.7.4
|
||||
builtin:
|
||||
BUILD_LAYERS:
|
||||
- type: copy-source
|
||||
name: 03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d
|
||||
archive: .buildcache/archives/03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d.tar.gz
|
||||
- type: go-modules
|
||||
name: 02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445
|
||||
archive: .buildcache/archives/02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445.tar.gz
|
||||
- type: ui
|
||||
name: 01-ui-00aac246fd625f14356db52ed98a657e40b02a82
|
||||
archive: .buildcache/archives/01-ui-00aac246fd625f14356db52ed98a657e40b02a82.tar.gz
|
||||
- type: base
|
||||
name: 00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f
|
||||
archive: .buildcache/archives/00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f.tar.gz
|
||||
PACKAGE_CACHE_KEY_FILE: .buildcache/cache-keys/package-fb26f9037b4f9b89f09d316f49c0db87693b022d
|
||||
POST_PROCESSORS: apple-notarize av-scan
|
||||
circleci:
|
||||
BUILDER_CACHE_KEY_PREFIX_LIST:
|
||||
- copy-source_2180_{{checksum ".buildcache/cache-keys/copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d"}}
|
||||
- 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"}}
|
||||
PACKAGE_CACHE_KEY: package-fb26f9037b4f9b89f09d316f49c0db87693b022d-{{checksum ".buildcache/cache-keys/package-fb26f9037b4f9b89f09d316f49c0db87693b022d"}}
|
||||
build-command: VERSION_PKG_PATH=github.com/hashicorp/boundary/version; BINARY_SUFFIX=""; if [ "${GOOS}x" == "windowsx" ]; then BINARY_SUFFIX=".exe"; fi; unset GOPATH; ORIG_PATH=$(pwd); for PLUGIN_TYPE in host; do for CURR_PLUGIN in $(ls $ORIG_PATH/plugins/$PLUGIN_TYPE/mains); do cd $ORIG_PATH/plugins/$PLUGIN_TYPE/mains/$CURR_PLUGIN; go build -v -o $ORIG_PATH/plugins/$PLUGIN_TYPE/assets/boundary-plugin-${PLUGIN_TYPE}-${CURR_PLUGIN}${BINARY_SUFFIX} .; cd $ORIG_PATH; done; cd $ORIG_PATH/plugins/$PLUGIN_TYPE/assets; for CURR_PLUGIN in $(ls boundary-plugin*); do gzip -9 $CURR_PLUGIN; done; cd $ORIG_PATH; done; go build -v -tags 'ui' -ldflags "-X $VERSION_PKG_PATH.GitCommit=$PACKAGE_SOURCE_ID -X $VERSION_PKG_PATH.Version=0.7.4 -X $VERSION_PKG_PATH.VersionPrerelease=" -o $OUTPUT_DIR/boundary ./cmd/boundary && cd $OUTPUT_DIR && zip $PACKAGE_ZIP_NAME boundary
|
||||
aliases:
|
||||
- type: local
|
||||
path: boundary_0.7.4_darwin_arm64.zip
|
||||
- type: public-hc-releases
|
||||
path: boundary/boundary_0.7.4/boundary_0.7.4_darwin_arm64.zip
|
||||
- packagespecid: 23be03371735b06dbd1a733f70df38c32b6b3988
|
||||
inputs:
|
||||
BINARY_NAME: boundary
|
||||
BUILD_TAGS: ui
|
||||
CGO_ENABLED: "0"
|
||||
GOARCH: "386"
|
||||
GOOS: freebsd
|
||||
PRODUCT_NAME: boundary
|
||||
PRODUCT_VERSION: 0.7.4
|
||||
PRODUCT_VERSION_MMP: 0.7.4
|
||||
PRODUCT_VERSION_PRE: ""
|
||||
meta:
|
||||
BUILD_JOB_NAME: freebsd_386_package
|
||||
BUNDLE_NAME: boundary_0.7.4
|
||||
builtin:
|
||||
BUILD_LAYERS:
|
||||
- type: copy-source
|
||||
name: 03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d
|
||||
archive: .buildcache/archives/03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d.tar.gz
|
||||
- type: go-modules
|
||||
name: 02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445
|
||||
archive: .buildcache/archives/02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445.tar.gz
|
||||
- type: ui
|
||||
name: 01-ui-00aac246fd625f14356db52ed98a657e40b02a82
|
||||
archive: .buildcache/archives/01-ui-00aac246fd625f14356db52ed98a657e40b02a82.tar.gz
|
||||
- type: base
|
||||
name: 00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f
|
||||
archive: .buildcache/archives/00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f.tar.gz
|
||||
PACKAGE_CACHE_KEY_FILE: .buildcache/cache-keys/package-23be03371735b06dbd1a733f70df38c32b6b3988
|
||||
POST_PROCESSORS: av-scan
|
||||
circleci:
|
||||
BUILDER_CACHE_KEY_PREFIX_LIST:
|
||||
- copy-source_2180_{{checksum ".buildcache/cache-keys/copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d"}}
|
||||
- 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"}}
|
||||
PACKAGE_CACHE_KEY: package-23be03371735b06dbd1a733f70df38c32b6b3988-{{checksum ".buildcache/cache-keys/package-23be03371735b06dbd1a733f70df38c32b6b3988"}}
|
||||
build-command: VERSION_PKG_PATH=github.com/hashicorp/boundary/version; BINARY_SUFFIX=""; if [ "${GOOS}x" == "windowsx" ]; then BINARY_SUFFIX=".exe"; fi; unset GOPATH; ORIG_PATH=$(pwd); for PLUGIN_TYPE in host; do for CURR_PLUGIN in $(ls $ORIG_PATH/plugins/$PLUGIN_TYPE/mains); do cd $ORIG_PATH/plugins/$PLUGIN_TYPE/mains/$CURR_PLUGIN; go build -v -o $ORIG_PATH/plugins/$PLUGIN_TYPE/assets/boundary-plugin-${PLUGIN_TYPE}-${CURR_PLUGIN}${BINARY_SUFFIX} .; cd $ORIG_PATH; done; cd $ORIG_PATH/plugins/$PLUGIN_TYPE/assets; for CURR_PLUGIN in $(ls boundary-plugin*); do gzip -9 $CURR_PLUGIN; done; cd $ORIG_PATH; done; go build -v -tags 'ui' -ldflags "-X $VERSION_PKG_PATH.GitCommit=$PACKAGE_SOURCE_ID -X $VERSION_PKG_PATH.Version=0.7.4 -X $VERSION_PKG_PATH.VersionPrerelease=" -o $OUTPUT_DIR/boundary ./cmd/boundary && cd $OUTPUT_DIR && zip $PACKAGE_ZIP_NAME boundary
|
||||
aliases:
|
||||
- type: local
|
||||
path: boundary_0.7.4_freebsd_386.zip
|
||||
- type: public-hc-releases
|
||||
path: boundary/boundary_0.7.4/boundary_0.7.4_freebsd_386.zip
|
||||
- packagespecid: 88972f670dbb74817cbd87143dc6da3fe0cf09a4
|
||||
inputs:
|
||||
BINARY_NAME: boundary
|
||||
BUILD_TAGS: ui
|
||||
CGO_ENABLED: "0"
|
||||
GOARCH: amd64
|
||||
GOOS: freebsd
|
||||
PRODUCT_NAME: boundary
|
||||
PRODUCT_VERSION: 0.7.4
|
||||
PRODUCT_VERSION_MMP: 0.7.4
|
||||
PRODUCT_VERSION_PRE: ""
|
||||
meta:
|
||||
BUILD_JOB_NAME: freebsd_amd64_package
|
||||
BUNDLE_NAME: boundary_0.7.4
|
||||
builtin:
|
||||
BUILD_LAYERS:
|
||||
- type: copy-source
|
||||
name: 03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d
|
||||
archive: .buildcache/archives/03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d.tar.gz
|
||||
- type: go-modules
|
||||
name: 02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445
|
||||
archive: .buildcache/archives/02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445.tar.gz
|
||||
- type: ui
|
||||
name: 01-ui-00aac246fd625f14356db52ed98a657e40b02a82
|
||||
archive: .buildcache/archives/01-ui-00aac246fd625f14356db52ed98a657e40b02a82.tar.gz
|
||||
- type: base
|
||||
name: 00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f
|
||||
archive: .buildcache/archives/00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f.tar.gz
|
||||
PACKAGE_CACHE_KEY_FILE: .buildcache/cache-keys/package-88972f670dbb74817cbd87143dc6da3fe0cf09a4
|
||||
POST_PROCESSORS: av-scan
|
||||
circleci:
|
||||
BUILDER_CACHE_KEY_PREFIX_LIST:
|
||||
- copy-source_2180_{{checksum ".buildcache/cache-keys/copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d"}}
|
||||
- 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"}}
|
||||
PACKAGE_CACHE_KEY: package-88972f670dbb74817cbd87143dc6da3fe0cf09a4-{{checksum ".buildcache/cache-keys/package-88972f670dbb74817cbd87143dc6da3fe0cf09a4"}}
|
||||
build-command: VERSION_PKG_PATH=github.com/hashicorp/boundary/version; BINARY_SUFFIX=""; if [ "${GOOS}x" == "windowsx" ]; then BINARY_SUFFIX=".exe"; fi; unset GOPATH; ORIG_PATH=$(pwd); for PLUGIN_TYPE in host; do for CURR_PLUGIN in $(ls $ORIG_PATH/plugins/$PLUGIN_TYPE/mains); do cd $ORIG_PATH/plugins/$PLUGIN_TYPE/mains/$CURR_PLUGIN; go build -v -o $ORIG_PATH/plugins/$PLUGIN_TYPE/assets/boundary-plugin-${PLUGIN_TYPE}-${CURR_PLUGIN}${BINARY_SUFFIX} .; cd $ORIG_PATH; done; cd $ORIG_PATH/plugins/$PLUGIN_TYPE/assets; for CURR_PLUGIN in $(ls boundary-plugin*); do gzip -9 $CURR_PLUGIN; done; cd $ORIG_PATH; done; go build -v -tags 'ui' -ldflags "-X $VERSION_PKG_PATH.GitCommit=$PACKAGE_SOURCE_ID -X $VERSION_PKG_PATH.Version=0.7.4 -X $VERSION_PKG_PATH.VersionPrerelease=" -o $OUTPUT_DIR/boundary ./cmd/boundary && cd $OUTPUT_DIR && zip $PACKAGE_ZIP_NAME boundary
|
||||
aliases:
|
||||
- type: local
|
||||
path: boundary_0.7.4_freebsd_amd64.zip
|
||||
- type: public-hc-releases
|
||||
path: boundary/boundary_0.7.4/boundary_0.7.4_freebsd_amd64.zip
|
||||
- packagespecid: 7f15ab74610641e4bd377e450ae65889e3a8d969
|
||||
inputs:
|
||||
BINARY_NAME: boundary
|
||||
BUILD_TAGS: ui
|
||||
CGO_ENABLED: "0"
|
||||
GOARCH: arm
|
||||
GOOS: freebsd
|
||||
PRODUCT_NAME: boundary
|
||||
PRODUCT_VERSION: 0.7.4
|
||||
PRODUCT_VERSION_MMP: 0.7.4
|
||||
PRODUCT_VERSION_PRE: ""
|
||||
meta:
|
||||
BUILD_JOB_NAME: freebsd_arm_package
|
||||
BUNDLE_NAME: boundary_0.7.4
|
||||
builtin:
|
||||
BUILD_LAYERS:
|
||||
- type: copy-source
|
||||
name: 03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d
|
||||
archive: .buildcache/archives/03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d.tar.gz
|
||||
- type: go-modules
|
||||
name: 02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445
|
||||
archive: .buildcache/archives/02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445.tar.gz
|
||||
- type: ui
|
||||
name: 01-ui-00aac246fd625f14356db52ed98a657e40b02a82
|
||||
archive: .buildcache/archives/01-ui-00aac246fd625f14356db52ed98a657e40b02a82.tar.gz
|
||||
- type: base
|
||||
name: 00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f
|
||||
archive: .buildcache/archives/00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f.tar.gz
|
||||
PACKAGE_CACHE_KEY_FILE: .buildcache/cache-keys/package-7f15ab74610641e4bd377e450ae65889e3a8d969
|
||||
POST_PROCESSORS: av-scan
|
||||
circleci:
|
||||
BUILDER_CACHE_KEY_PREFIX_LIST:
|
||||
- copy-source_2180_{{checksum ".buildcache/cache-keys/copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d"}}
|
||||
- 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"}}
|
||||
PACKAGE_CACHE_KEY: package-7f15ab74610641e4bd377e450ae65889e3a8d969-{{checksum ".buildcache/cache-keys/package-7f15ab74610641e4bd377e450ae65889e3a8d969"}}
|
||||
build-command: VERSION_PKG_PATH=github.com/hashicorp/boundary/version; BINARY_SUFFIX=""; if [ "${GOOS}x" == "windowsx" ]; then BINARY_SUFFIX=".exe"; fi; unset GOPATH; ORIG_PATH=$(pwd); for PLUGIN_TYPE in host; do for CURR_PLUGIN in $(ls $ORIG_PATH/plugins/$PLUGIN_TYPE/mains); do cd $ORIG_PATH/plugins/$PLUGIN_TYPE/mains/$CURR_PLUGIN; go build -v -o $ORIG_PATH/plugins/$PLUGIN_TYPE/assets/boundary-plugin-${PLUGIN_TYPE}-${CURR_PLUGIN}${BINARY_SUFFIX} .; cd $ORIG_PATH; done; cd $ORIG_PATH/plugins/$PLUGIN_TYPE/assets; for CURR_PLUGIN in $(ls boundary-plugin*); do gzip -9 $CURR_PLUGIN; done; cd $ORIG_PATH; done; go build -v -tags 'ui' -ldflags "-X $VERSION_PKG_PATH.GitCommit=$PACKAGE_SOURCE_ID -X $VERSION_PKG_PATH.Version=0.7.4 -X $VERSION_PKG_PATH.VersionPrerelease=" -o $OUTPUT_DIR/boundary ./cmd/boundary && cd $OUTPUT_DIR && zip $PACKAGE_ZIP_NAME boundary
|
||||
aliases:
|
||||
- type: local
|
||||
path: boundary_0.7.4_freebsd_arm.zip
|
||||
- type: public-hc-releases
|
||||
path: boundary/boundary_0.7.4/boundary_0.7.4_freebsd_arm.zip
|
||||
- packagespecid: d2ffa38033819b30c6b8657add046e00f4631a14
|
||||
inputs:
|
||||
BINARY_NAME: boundary
|
||||
BUILD_TAGS: ui
|
||||
CGO_ENABLED: "0"
|
||||
GOARCH: "386"
|
||||
GOOS: linux
|
||||
PRODUCT_NAME: boundary
|
||||
PRODUCT_VERSION: 0.7.4
|
||||
PRODUCT_VERSION_MMP: 0.7.4
|
||||
PRODUCT_VERSION_PRE: ""
|
||||
meta:
|
||||
BUILD_JOB_NAME: linux_386_package
|
||||
BUNDLE_NAME: boundary_0.7.4
|
||||
builtin:
|
||||
BUILD_LAYERS:
|
||||
- type: copy-source
|
||||
name: 03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d
|
||||
archive: .buildcache/archives/03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d.tar.gz
|
||||
- type: go-modules
|
||||
name: 02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445
|
||||
archive: .buildcache/archives/02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445.tar.gz
|
||||
- type: ui
|
||||
name: 01-ui-00aac246fd625f14356db52ed98a657e40b02a82
|
||||
archive: .buildcache/archives/01-ui-00aac246fd625f14356db52ed98a657e40b02a82.tar.gz
|
||||
- type: base
|
||||
name: 00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f
|
||||
archive: .buildcache/archives/00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f.tar.gz
|
||||
PACKAGE_CACHE_KEY_FILE: .buildcache/cache-keys/package-d2ffa38033819b30c6b8657add046e00f4631a14
|
||||
POST_PROCESSORS: av-scan
|
||||
circleci:
|
||||
BUILDER_CACHE_KEY_PREFIX_LIST:
|
||||
- copy-source_2180_{{checksum ".buildcache/cache-keys/copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d"}}
|
||||
- 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"}}
|
||||
PACKAGE_CACHE_KEY: package-d2ffa38033819b30c6b8657add046e00f4631a14-{{checksum ".buildcache/cache-keys/package-d2ffa38033819b30c6b8657add046e00f4631a14"}}
|
||||
build-command: VERSION_PKG_PATH=github.com/hashicorp/boundary/version; BINARY_SUFFIX=""; if [ "${GOOS}x" == "windowsx" ]; then BINARY_SUFFIX=".exe"; fi; unset GOPATH; ORIG_PATH=$(pwd); for PLUGIN_TYPE in host; do for CURR_PLUGIN in $(ls $ORIG_PATH/plugins/$PLUGIN_TYPE/mains); do cd $ORIG_PATH/plugins/$PLUGIN_TYPE/mains/$CURR_PLUGIN; go build -v -o $ORIG_PATH/plugins/$PLUGIN_TYPE/assets/boundary-plugin-${PLUGIN_TYPE}-${CURR_PLUGIN}${BINARY_SUFFIX} .; cd $ORIG_PATH; done; cd $ORIG_PATH/plugins/$PLUGIN_TYPE/assets; for CURR_PLUGIN in $(ls boundary-plugin*); do gzip -9 $CURR_PLUGIN; done; cd $ORIG_PATH; done; go build -v -tags 'ui' -ldflags "-X $VERSION_PKG_PATH.GitCommit=$PACKAGE_SOURCE_ID -X $VERSION_PKG_PATH.Version=0.7.4 -X $VERSION_PKG_PATH.VersionPrerelease=" -o $OUTPUT_DIR/boundary ./cmd/boundary && cd $OUTPUT_DIR && zip $PACKAGE_ZIP_NAME boundary
|
||||
aliases:
|
||||
- type: local
|
||||
path: boundary_0.7.4_linux_386.zip
|
||||
- type: public-hc-releases
|
||||
path: boundary/boundary_0.7.4/boundary_0.7.4_linux_386.zip
|
||||
- packagespecid: 2d94fc6b9b9e25190a72e6334afb3d36a03d19a8
|
||||
inputs:
|
||||
BINARY_NAME: boundary
|
||||
BUILD_TAGS: ui
|
||||
CGO_ENABLED: "0"
|
||||
GOARCH: amd64
|
||||
GOOS: linux
|
||||
PRODUCT_NAME: boundary
|
||||
PRODUCT_VERSION: 0.7.4
|
||||
PRODUCT_VERSION_MMP: 0.7.4
|
||||
PRODUCT_VERSION_PRE: ""
|
||||
meta:
|
||||
BUILD_JOB_NAME: linux_amd64_package
|
||||
BUNDLE_NAME: boundary_0.7.4
|
||||
builtin:
|
||||
BUILD_LAYERS:
|
||||
- type: copy-source
|
||||
name: 03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d
|
||||
archive: .buildcache/archives/03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d.tar.gz
|
||||
- type: go-modules
|
||||
name: 02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445
|
||||
archive: .buildcache/archives/02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445.tar.gz
|
||||
- type: ui
|
||||
name: 01-ui-00aac246fd625f14356db52ed98a657e40b02a82
|
||||
archive: .buildcache/archives/01-ui-00aac246fd625f14356db52ed98a657e40b02a82.tar.gz
|
||||
- type: base
|
||||
name: 00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f
|
||||
archive: .buildcache/archives/00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f.tar.gz
|
||||
PACKAGE_CACHE_KEY_FILE: .buildcache/cache-keys/package-2d94fc6b9b9e25190a72e6334afb3d36a03d19a8
|
||||
POST_PROCESSORS: av-scan
|
||||
circleci:
|
||||
BUILDER_CACHE_KEY_PREFIX_LIST:
|
||||
- copy-source_2180_{{checksum ".buildcache/cache-keys/copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d"}}
|
||||
- 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"}}
|
||||
PACKAGE_CACHE_KEY: package-2d94fc6b9b9e25190a72e6334afb3d36a03d19a8-{{checksum ".buildcache/cache-keys/package-2d94fc6b9b9e25190a72e6334afb3d36a03d19a8"}}
|
||||
build-command: VERSION_PKG_PATH=github.com/hashicorp/boundary/version; BINARY_SUFFIX=""; if [ "${GOOS}x" == "windowsx" ]; then BINARY_SUFFIX=".exe"; fi; unset GOPATH; ORIG_PATH=$(pwd); for PLUGIN_TYPE in host; do for CURR_PLUGIN in $(ls $ORIG_PATH/plugins/$PLUGIN_TYPE/mains); do cd $ORIG_PATH/plugins/$PLUGIN_TYPE/mains/$CURR_PLUGIN; go build -v -o $ORIG_PATH/plugins/$PLUGIN_TYPE/assets/boundary-plugin-${PLUGIN_TYPE}-${CURR_PLUGIN}${BINARY_SUFFIX} .; cd $ORIG_PATH; done; cd $ORIG_PATH/plugins/$PLUGIN_TYPE/assets; for CURR_PLUGIN in $(ls boundary-plugin*); do gzip -9 $CURR_PLUGIN; done; cd $ORIG_PATH; done; go build -v -tags 'ui' -ldflags "-X $VERSION_PKG_PATH.GitCommit=$PACKAGE_SOURCE_ID -X $VERSION_PKG_PATH.Version=0.7.4 -X $VERSION_PKG_PATH.VersionPrerelease=" -o $OUTPUT_DIR/boundary ./cmd/boundary && cd $OUTPUT_DIR && zip $PACKAGE_ZIP_NAME boundary
|
||||
aliases:
|
||||
- type: local
|
||||
path: boundary_0.7.4_linux_amd64.zip
|
||||
- type: public-hc-releases
|
||||
path: boundary/boundary_0.7.4/boundary_0.7.4_linux_amd64.zip
|
||||
- packagespecid: 5270b71f640c6dcd61a271e988a2081bf5bfbb3e
|
||||
inputs:
|
||||
BINARY_NAME: boundary
|
||||
BUILD_TAGS: ui
|
||||
CGO_ENABLED: "0"
|
||||
GOARCH: arm
|
||||
GOOS: linux
|
||||
PRODUCT_NAME: boundary
|
||||
PRODUCT_VERSION: 0.7.4
|
||||
PRODUCT_VERSION_MMP: 0.7.4
|
||||
PRODUCT_VERSION_PRE: ""
|
||||
meta:
|
||||
BUILD_JOB_NAME: linux_arm_package
|
||||
BUNDLE_NAME: boundary_0.7.4
|
||||
builtin:
|
||||
BUILD_LAYERS:
|
||||
- type: copy-source
|
||||
name: 03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d
|
||||
archive: .buildcache/archives/03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d.tar.gz
|
||||
- type: go-modules
|
||||
name: 02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445
|
||||
archive: .buildcache/archives/02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445.tar.gz
|
||||
- type: ui
|
||||
name: 01-ui-00aac246fd625f14356db52ed98a657e40b02a82
|
||||
archive: .buildcache/archives/01-ui-00aac246fd625f14356db52ed98a657e40b02a82.tar.gz
|
||||
- type: base
|
||||
name: 00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f
|
||||
archive: .buildcache/archives/00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f.tar.gz
|
||||
PACKAGE_CACHE_KEY_FILE: .buildcache/cache-keys/package-5270b71f640c6dcd61a271e988a2081bf5bfbb3e
|
||||
POST_PROCESSORS: av-scan
|
||||
circleci:
|
||||
BUILDER_CACHE_KEY_PREFIX_LIST:
|
||||
- copy-source_2180_{{checksum ".buildcache/cache-keys/copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d"}}
|
||||
- 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"}}
|
||||
PACKAGE_CACHE_KEY: package-5270b71f640c6dcd61a271e988a2081bf5bfbb3e-{{checksum ".buildcache/cache-keys/package-5270b71f640c6dcd61a271e988a2081bf5bfbb3e"}}
|
||||
build-command: VERSION_PKG_PATH=github.com/hashicorp/boundary/version; BINARY_SUFFIX=""; if [ "${GOOS}x" == "windowsx" ]; then BINARY_SUFFIX=".exe"; fi; unset GOPATH; ORIG_PATH=$(pwd); for PLUGIN_TYPE in host; do for CURR_PLUGIN in $(ls $ORIG_PATH/plugins/$PLUGIN_TYPE/mains); do cd $ORIG_PATH/plugins/$PLUGIN_TYPE/mains/$CURR_PLUGIN; go build -v -o $ORIG_PATH/plugins/$PLUGIN_TYPE/assets/boundary-plugin-${PLUGIN_TYPE}-${CURR_PLUGIN}${BINARY_SUFFIX} .; cd $ORIG_PATH; done; cd $ORIG_PATH/plugins/$PLUGIN_TYPE/assets; for CURR_PLUGIN in $(ls boundary-plugin*); do gzip -9 $CURR_PLUGIN; done; cd $ORIG_PATH; done; go build -v -tags 'ui' -ldflags "-X $VERSION_PKG_PATH.GitCommit=$PACKAGE_SOURCE_ID -X $VERSION_PKG_PATH.Version=0.7.4 -X $VERSION_PKG_PATH.VersionPrerelease=" -o $OUTPUT_DIR/boundary ./cmd/boundary && cd $OUTPUT_DIR && zip $PACKAGE_ZIP_NAME boundary
|
||||
aliases:
|
||||
- type: local
|
||||
path: boundary_0.7.4_linux_arm.zip
|
||||
- type: public-hc-releases
|
||||
path: boundary/boundary_0.7.4/boundary_0.7.4_linux_arm.zip
|
||||
- packagespecid: 5fcc03d5f76f38b0ac8b3eeb5eec6e0dda9c6c70
|
||||
inputs:
|
||||
BINARY_NAME: boundary
|
||||
BUILD_TAGS: ui
|
||||
CGO_ENABLED: "0"
|
||||
GOARCH: arm64
|
||||
GOOS: linux
|
||||
PRODUCT_NAME: boundary
|
||||
PRODUCT_VERSION: 0.7.4
|
||||
PRODUCT_VERSION_MMP: 0.7.4
|
||||
PRODUCT_VERSION_PRE: ""
|
||||
meta:
|
||||
BUILD_JOB_NAME: linux_arm64_package
|
||||
BUNDLE_NAME: boundary_0.7.4
|
||||
builtin:
|
||||
BUILD_LAYERS:
|
||||
- type: copy-source
|
||||
name: 03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d
|
||||
archive: .buildcache/archives/03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d.tar.gz
|
||||
- type: go-modules
|
||||
name: 02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445
|
||||
archive: .buildcache/archives/02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445.tar.gz
|
||||
- type: ui
|
||||
name: 01-ui-00aac246fd625f14356db52ed98a657e40b02a82
|
||||
archive: .buildcache/archives/01-ui-00aac246fd625f14356db52ed98a657e40b02a82.tar.gz
|
||||
- type: base
|
||||
name: 00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f
|
||||
archive: .buildcache/archives/00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f.tar.gz
|
||||
PACKAGE_CACHE_KEY_FILE: .buildcache/cache-keys/package-5fcc03d5f76f38b0ac8b3eeb5eec6e0dda9c6c70
|
||||
POST_PROCESSORS: av-scan
|
||||
circleci:
|
||||
BUILDER_CACHE_KEY_PREFIX_LIST:
|
||||
- copy-source_2180_{{checksum ".buildcache/cache-keys/copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d"}}
|
||||
- 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"}}
|
||||
PACKAGE_CACHE_KEY: package-5fcc03d5f76f38b0ac8b3eeb5eec6e0dda9c6c70-{{checksum ".buildcache/cache-keys/package-5fcc03d5f76f38b0ac8b3eeb5eec6e0dda9c6c70"}}
|
||||
build-command: VERSION_PKG_PATH=github.com/hashicorp/boundary/version; BINARY_SUFFIX=""; if [ "${GOOS}x" == "windowsx" ]; then BINARY_SUFFIX=".exe"; fi; unset GOPATH; ORIG_PATH=$(pwd); for PLUGIN_TYPE in host; do for CURR_PLUGIN in $(ls $ORIG_PATH/plugins/$PLUGIN_TYPE/mains); do cd $ORIG_PATH/plugins/$PLUGIN_TYPE/mains/$CURR_PLUGIN; go build -v -o $ORIG_PATH/plugins/$PLUGIN_TYPE/assets/boundary-plugin-${PLUGIN_TYPE}-${CURR_PLUGIN}${BINARY_SUFFIX} .; cd $ORIG_PATH; done; cd $ORIG_PATH/plugins/$PLUGIN_TYPE/assets; for CURR_PLUGIN in $(ls boundary-plugin*); do gzip -9 $CURR_PLUGIN; done; cd $ORIG_PATH; done; go build -v -tags 'ui' -ldflags "-X $VERSION_PKG_PATH.GitCommit=$PACKAGE_SOURCE_ID -X $VERSION_PKG_PATH.Version=0.7.4 -X $VERSION_PKG_PATH.VersionPrerelease=" -o $OUTPUT_DIR/boundary ./cmd/boundary && cd $OUTPUT_DIR && zip $PACKAGE_ZIP_NAME boundary
|
||||
aliases:
|
||||
- type: local
|
||||
path: boundary_0.7.4_linux_arm64.zip
|
||||
- type: public-hc-releases
|
||||
path: boundary/boundary_0.7.4/boundary_0.7.4_linux_arm64.zip
|
||||
- packagespecid: 06451f1395595bf541733bc0fa43b5f8d4c1f871
|
||||
inputs:
|
||||
BINARY_NAME: boundary
|
||||
BUILD_TAGS: ui
|
||||
CGO_ENABLED: "0"
|
||||
GOARCH: "386"
|
||||
GOOS: netbsd
|
||||
PRODUCT_NAME: boundary
|
||||
PRODUCT_VERSION: 0.7.4
|
||||
PRODUCT_VERSION_MMP: 0.7.4
|
||||
PRODUCT_VERSION_PRE: ""
|
||||
meta:
|
||||
BUILD_JOB_NAME: netbsd_386_package
|
||||
BUNDLE_NAME: boundary_0.7.4
|
||||
builtin:
|
||||
BUILD_LAYERS:
|
||||
- type: copy-source
|
||||
name: 03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d
|
||||
archive: .buildcache/archives/03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d.tar.gz
|
||||
- type: go-modules
|
||||
name: 02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445
|
||||
archive: .buildcache/archives/02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445.tar.gz
|
||||
- type: ui
|
||||
name: 01-ui-00aac246fd625f14356db52ed98a657e40b02a82
|
||||
archive: .buildcache/archives/01-ui-00aac246fd625f14356db52ed98a657e40b02a82.tar.gz
|
||||
- type: base
|
||||
name: 00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f
|
||||
archive: .buildcache/archives/00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f.tar.gz
|
||||
PACKAGE_CACHE_KEY_FILE: .buildcache/cache-keys/package-06451f1395595bf541733bc0fa43b5f8d4c1f871
|
||||
POST_PROCESSORS: av-scan
|
||||
circleci:
|
||||
BUILDER_CACHE_KEY_PREFIX_LIST:
|
||||
- copy-source_2180_{{checksum ".buildcache/cache-keys/copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d"}}
|
||||
- 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"}}
|
||||
PACKAGE_CACHE_KEY: package-06451f1395595bf541733bc0fa43b5f8d4c1f871-{{checksum ".buildcache/cache-keys/package-06451f1395595bf541733bc0fa43b5f8d4c1f871"}}
|
||||
build-command: VERSION_PKG_PATH=github.com/hashicorp/boundary/version; BINARY_SUFFIX=""; if [ "${GOOS}x" == "windowsx" ]; then BINARY_SUFFIX=".exe"; fi; unset GOPATH; ORIG_PATH=$(pwd); for PLUGIN_TYPE in host; do for CURR_PLUGIN in $(ls $ORIG_PATH/plugins/$PLUGIN_TYPE/mains); do cd $ORIG_PATH/plugins/$PLUGIN_TYPE/mains/$CURR_PLUGIN; go build -v -o $ORIG_PATH/plugins/$PLUGIN_TYPE/assets/boundary-plugin-${PLUGIN_TYPE}-${CURR_PLUGIN}${BINARY_SUFFIX} .; cd $ORIG_PATH; done; cd $ORIG_PATH/plugins/$PLUGIN_TYPE/assets; for CURR_PLUGIN in $(ls boundary-plugin*); do gzip -9 $CURR_PLUGIN; done; cd $ORIG_PATH; done; go build -v -tags 'ui' -ldflags "-X $VERSION_PKG_PATH.GitCommit=$PACKAGE_SOURCE_ID -X $VERSION_PKG_PATH.Version=0.7.4 -X $VERSION_PKG_PATH.VersionPrerelease=" -o $OUTPUT_DIR/boundary ./cmd/boundary && cd $OUTPUT_DIR && zip $PACKAGE_ZIP_NAME boundary
|
||||
aliases:
|
||||
- type: local
|
||||
path: boundary_0.7.4_netbsd_386.zip
|
||||
- type: public-hc-releases
|
||||
path: boundary/boundary_0.7.4/boundary_0.7.4_netbsd_386.zip
|
||||
- packagespecid: 54bddba68a649c667f80b520f21ef9a9b7ef3698
|
||||
inputs:
|
||||
BINARY_NAME: boundary
|
||||
BUILD_TAGS: ui
|
||||
CGO_ENABLED: "0"
|
||||
GOARCH: amd64
|
||||
GOOS: netbsd
|
||||
PRODUCT_NAME: boundary
|
||||
PRODUCT_VERSION: 0.7.4
|
||||
PRODUCT_VERSION_MMP: 0.7.4
|
||||
PRODUCT_VERSION_PRE: ""
|
||||
meta:
|
||||
BUILD_JOB_NAME: netbsd_amd64_package
|
||||
BUNDLE_NAME: boundary_0.7.4
|
||||
builtin:
|
||||
BUILD_LAYERS:
|
||||
- type: copy-source
|
||||
name: 03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d
|
||||
archive: .buildcache/archives/03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d.tar.gz
|
||||
- type: go-modules
|
||||
name: 02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445
|
||||
archive: .buildcache/archives/02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445.tar.gz
|
||||
- type: ui
|
||||
name: 01-ui-00aac246fd625f14356db52ed98a657e40b02a82
|
||||
archive: .buildcache/archives/01-ui-00aac246fd625f14356db52ed98a657e40b02a82.tar.gz
|
||||
- type: base
|
||||
name: 00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f
|
||||
archive: .buildcache/archives/00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f.tar.gz
|
||||
PACKAGE_CACHE_KEY_FILE: .buildcache/cache-keys/package-54bddba68a649c667f80b520f21ef9a9b7ef3698
|
||||
POST_PROCESSORS: av-scan
|
||||
circleci:
|
||||
BUILDER_CACHE_KEY_PREFIX_LIST:
|
||||
- copy-source_2180_{{checksum ".buildcache/cache-keys/copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d"}}
|
||||
- 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"}}
|
||||
PACKAGE_CACHE_KEY: package-54bddba68a649c667f80b520f21ef9a9b7ef3698-{{checksum ".buildcache/cache-keys/package-54bddba68a649c667f80b520f21ef9a9b7ef3698"}}
|
||||
build-command: VERSION_PKG_PATH=github.com/hashicorp/boundary/version; BINARY_SUFFIX=""; if [ "${GOOS}x" == "windowsx" ]; then BINARY_SUFFIX=".exe"; fi; unset GOPATH; ORIG_PATH=$(pwd); for PLUGIN_TYPE in host; do for CURR_PLUGIN in $(ls $ORIG_PATH/plugins/$PLUGIN_TYPE/mains); do cd $ORIG_PATH/plugins/$PLUGIN_TYPE/mains/$CURR_PLUGIN; go build -v -o $ORIG_PATH/plugins/$PLUGIN_TYPE/assets/boundary-plugin-${PLUGIN_TYPE}-${CURR_PLUGIN}${BINARY_SUFFIX} .; cd $ORIG_PATH; done; cd $ORIG_PATH/plugins/$PLUGIN_TYPE/assets; for CURR_PLUGIN in $(ls boundary-plugin*); do gzip -9 $CURR_PLUGIN; done; cd $ORIG_PATH; done; go build -v -tags 'ui' -ldflags "-X $VERSION_PKG_PATH.GitCommit=$PACKAGE_SOURCE_ID -X $VERSION_PKG_PATH.Version=0.7.4 -X $VERSION_PKG_PATH.VersionPrerelease=" -o $OUTPUT_DIR/boundary ./cmd/boundary && cd $OUTPUT_DIR && zip $PACKAGE_ZIP_NAME boundary
|
||||
aliases:
|
||||
- type: local
|
||||
path: boundary_0.7.4_netbsd_amd64.zip
|
||||
- type: public-hc-releases
|
||||
path: boundary/boundary_0.7.4/boundary_0.7.4_netbsd_amd64.zip
|
||||
- packagespecid: afa42f0d1945248381022b8fec2a00aba89845bc
|
||||
inputs:
|
||||
BINARY_NAME: boundary
|
||||
BUILD_TAGS: ui
|
||||
CGO_ENABLED: "0"
|
||||
GOARCH: "386"
|
||||
GOOS: openbsd
|
||||
PRODUCT_NAME: boundary
|
||||
PRODUCT_VERSION: 0.7.4
|
||||
PRODUCT_VERSION_MMP: 0.7.4
|
||||
PRODUCT_VERSION_PRE: ""
|
||||
meta:
|
||||
BUILD_JOB_NAME: openbsd_386_package
|
||||
BUNDLE_NAME: boundary_0.7.4
|
||||
builtin:
|
||||
BUILD_LAYERS:
|
||||
- type: copy-source
|
||||
name: 03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d
|
||||
archive: .buildcache/archives/03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d.tar.gz
|
||||
- type: go-modules
|
||||
name: 02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445
|
||||
archive: .buildcache/archives/02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445.tar.gz
|
||||
- type: ui
|
||||
name: 01-ui-00aac246fd625f14356db52ed98a657e40b02a82
|
||||
archive: .buildcache/archives/01-ui-00aac246fd625f14356db52ed98a657e40b02a82.tar.gz
|
||||
- type: base
|
||||
name: 00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f
|
||||
archive: .buildcache/archives/00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f.tar.gz
|
||||
PACKAGE_CACHE_KEY_FILE: .buildcache/cache-keys/package-afa42f0d1945248381022b8fec2a00aba89845bc
|
||||
POST_PROCESSORS: av-scan
|
||||
circleci:
|
||||
BUILDER_CACHE_KEY_PREFIX_LIST:
|
||||
- copy-source_2180_{{checksum ".buildcache/cache-keys/copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d"}}
|
||||
- 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"}}
|
||||
PACKAGE_CACHE_KEY: package-afa42f0d1945248381022b8fec2a00aba89845bc-{{checksum ".buildcache/cache-keys/package-afa42f0d1945248381022b8fec2a00aba89845bc"}}
|
||||
build-command: VERSION_PKG_PATH=github.com/hashicorp/boundary/version; BINARY_SUFFIX=""; if [ "${GOOS}x" == "windowsx" ]; then BINARY_SUFFIX=".exe"; fi; unset GOPATH; ORIG_PATH=$(pwd); for PLUGIN_TYPE in host; do for CURR_PLUGIN in $(ls $ORIG_PATH/plugins/$PLUGIN_TYPE/mains); do cd $ORIG_PATH/plugins/$PLUGIN_TYPE/mains/$CURR_PLUGIN; go build -v -o $ORIG_PATH/plugins/$PLUGIN_TYPE/assets/boundary-plugin-${PLUGIN_TYPE}-${CURR_PLUGIN}${BINARY_SUFFIX} .; cd $ORIG_PATH; done; cd $ORIG_PATH/plugins/$PLUGIN_TYPE/assets; for CURR_PLUGIN in $(ls boundary-plugin*); do gzip -9 $CURR_PLUGIN; done; cd $ORIG_PATH; done; go build -v -tags 'ui' -ldflags "-X $VERSION_PKG_PATH.GitCommit=$PACKAGE_SOURCE_ID -X $VERSION_PKG_PATH.Version=0.7.4 -X $VERSION_PKG_PATH.VersionPrerelease=" -o $OUTPUT_DIR/boundary ./cmd/boundary && cd $OUTPUT_DIR && zip $PACKAGE_ZIP_NAME boundary
|
||||
aliases:
|
||||
- type: local
|
||||
path: boundary_0.7.4_openbsd_386.zip
|
||||
- type: public-hc-releases
|
||||
path: boundary/boundary_0.7.4/boundary_0.7.4_openbsd_386.zip
|
||||
- packagespecid: eff2b1d9db1cff4f0bf41855c2e85fd5e97b59b1
|
||||
inputs:
|
||||
BINARY_NAME: boundary
|
||||
BUILD_TAGS: ui
|
||||
CGO_ENABLED: "0"
|
||||
GOARCH: amd64
|
||||
GOOS: openbsd
|
||||
PRODUCT_NAME: boundary
|
||||
PRODUCT_VERSION: 0.7.4
|
||||
PRODUCT_VERSION_MMP: 0.7.4
|
||||
PRODUCT_VERSION_PRE: ""
|
||||
meta:
|
||||
BUILD_JOB_NAME: openbsd_amd64_package
|
||||
BUNDLE_NAME: boundary_0.7.4
|
||||
builtin:
|
||||
BUILD_LAYERS:
|
||||
- type: copy-source
|
||||
name: 03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d
|
||||
archive: .buildcache/archives/03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d.tar.gz
|
||||
- type: go-modules
|
||||
name: 02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445
|
||||
archive: .buildcache/archives/02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445.tar.gz
|
||||
- type: ui
|
||||
name: 01-ui-00aac246fd625f14356db52ed98a657e40b02a82
|
||||
archive: .buildcache/archives/01-ui-00aac246fd625f14356db52ed98a657e40b02a82.tar.gz
|
||||
- type: base
|
||||
name: 00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f
|
||||
archive: .buildcache/archives/00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f.tar.gz
|
||||
PACKAGE_CACHE_KEY_FILE: .buildcache/cache-keys/package-eff2b1d9db1cff4f0bf41855c2e85fd5e97b59b1
|
||||
POST_PROCESSORS: av-scan
|
||||
circleci:
|
||||
BUILDER_CACHE_KEY_PREFIX_LIST:
|
||||
- copy-source_2180_{{checksum ".buildcache/cache-keys/copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d"}}
|
||||
- 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"}}
|
||||
PACKAGE_CACHE_KEY: package-eff2b1d9db1cff4f0bf41855c2e85fd5e97b59b1-{{checksum ".buildcache/cache-keys/package-eff2b1d9db1cff4f0bf41855c2e85fd5e97b59b1"}}
|
||||
build-command: VERSION_PKG_PATH=github.com/hashicorp/boundary/version; BINARY_SUFFIX=""; if [ "${GOOS}x" == "windowsx" ]; then BINARY_SUFFIX=".exe"; fi; unset GOPATH; ORIG_PATH=$(pwd); for PLUGIN_TYPE in host; do for CURR_PLUGIN in $(ls $ORIG_PATH/plugins/$PLUGIN_TYPE/mains); do cd $ORIG_PATH/plugins/$PLUGIN_TYPE/mains/$CURR_PLUGIN; go build -v -o $ORIG_PATH/plugins/$PLUGIN_TYPE/assets/boundary-plugin-${PLUGIN_TYPE}-${CURR_PLUGIN}${BINARY_SUFFIX} .; cd $ORIG_PATH; done; cd $ORIG_PATH/plugins/$PLUGIN_TYPE/assets; for CURR_PLUGIN in $(ls boundary-plugin*); do gzip -9 $CURR_PLUGIN; done; cd $ORIG_PATH; done; go build -v -tags 'ui' -ldflags "-X $VERSION_PKG_PATH.GitCommit=$PACKAGE_SOURCE_ID -X $VERSION_PKG_PATH.Version=0.7.4 -X $VERSION_PKG_PATH.VersionPrerelease=" -o $OUTPUT_DIR/boundary ./cmd/boundary && cd $OUTPUT_DIR && zip $PACKAGE_ZIP_NAME boundary
|
||||
aliases:
|
||||
- type: local
|
||||
path: boundary_0.7.4_openbsd_amd64.zip
|
||||
- type: public-hc-releases
|
||||
path: boundary/boundary_0.7.4/boundary_0.7.4_openbsd_amd64.zip
|
||||
- packagespecid: 51e5a2cf2270e920dfcb0f04cb0029d6199c1d1f
|
||||
inputs:
|
||||
BINARY_NAME: boundary
|
||||
BUILD_TAGS: ui
|
||||
CGO_ENABLED: "0"
|
||||
GOARCH: amd64
|
||||
GOOS: solaris
|
||||
PRODUCT_NAME: boundary
|
||||
PRODUCT_VERSION: 0.7.4
|
||||
PRODUCT_VERSION_MMP: 0.7.4
|
||||
PRODUCT_VERSION_PRE: ""
|
||||
meta:
|
||||
BUILD_JOB_NAME: solaris_amd64_package
|
||||
BUNDLE_NAME: boundary_0.7.4
|
||||
builtin:
|
||||
BUILD_LAYERS:
|
||||
- type: copy-source
|
||||
name: 03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d
|
||||
archive: .buildcache/archives/03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d.tar.gz
|
||||
- type: go-modules
|
||||
name: 02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445
|
||||
archive: .buildcache/archives/02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445.tar.gz
|
||||
- type: ui
|
||||
name: 01-ui-00aac246fd625f14356db52ed98a657e40b02a82
|
||||
archive: .buildcache/archives/01-ui-00aac246fd625f14356db52ed98a657e40b02a82.tar.gz
|
||||
- type: base
|
||||
name: 00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f
|
||||
archive: .buildcache/archives/00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f.tar.gz
|
||||
PACKAGE_CACHE_KEY_FILE: .buildcache/cache-keys/package-51e5a2cf2270e920dfcb0f04cb0029d6199c1d1f
|
||||
POST_PROCESSORS: av-scan
|
||||
circleci:
|
||||
BUILDER_CACHE_KEY_PREFIX_LIST:
|
||||
- copy-source_2180_{{checksum ".buildcache/cache-keys/copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d"}}
|
||||
- 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"}}
|
||||
PACKAGE_CACHE_KEY: package-51e5a2cf2270e920dfcb0f04cb0029d6199c1d1f-{{checksum ".buildcache/cache-keys/package-51e5a2cf2270e920dfcb0f04cb0029d6199c1d1f"}}
|
||||
build-command: VERSION_PKG_PATH=github.com/hashicorp/boundary/version; BINARY_SUFFIX=""; if [ "${GOOS}x" == "windowsx" ]; then BINARY_SUFFIX=".exe"; fi; unset GOPATH; ORIG_PATH=$(pwd); for PLUGIN_TYPE in host; do for CURR_PLUGIN in $(ls $ORIG_PATH/plugins/$PLUGIN_TYPE/mains); do cd $ORIG_PATH/plugins/$PLUGIN_TYPE/mains/$CURR_PLUGIN; go build -v -o $ORIG_PATH/plugins/$PLUGIN_TYPE/assets/boundary-plugin-${PLUGIN_TYPE}-${CURR_PLUGIN}${BINARY_SUFFIX} .; cd $ORIG_PATH; done; cd $ORIG_PATH/plugins/$PLUGIN_TYPE/assets; for CURR_PLUGIN in $(ls boundary-plugin*); do gzip -9 $CURR_PLUGIN; done; cd $ORIG_PATH; done; go build -v -tags 'ui' -ldflags "-X $VERSION_PKG_PATH.GitCommit=$PACKAGE_SOURCE_ID -X $VERSION_PKG_PATH.Version=0.7.4 -X $VERSION_PKG_PATH.VersionPrerelease=" -o $OUTPUT_DIR/boundary ./cmd/boundary && cd $OUTPUT_DIR && zip $PACKAGE_ZIP_NAME boundary
|
||||
aliases:
|
||||
- type: local
|
||||
path: boundary_0.7.4_solaris_amd64.zip
|
||||
- type: public-hc-releases
|
||||
path: boundary/boundary_0.7.4/boundary_0.7.4_solaris_amd64.zip
|
||||
- packagespecid: 5c9d7d2650823a71d79844cc79ad18993c591691
|
||||
inputs:
|
||||
BINARY_NAME: boundary.exe
|
||||
BUILD_TAGS: ui
|
||||
CGO_ENABLED: "0"
|
||||
GOARCH: "386"
|
||||
GOOS: windows
|
||||
PRODUCT_NAME: boundary
|
||||
PRODUCT_VERSION: 0.7.4
|
||||
PRODUCT_VERSION_MMP: 0.7.4
|
||||
PRODUCT_VERSION_PRE: ""
|
||||
meta:
|
||||
BUILD_JOB_NAME: windows_386_package
|
||||
BUNDLE_NAME: boundary_0.7.4
|
||||
builtin:
|
||||
BUILD_LAYERS:
|
||||
- type: copy-source
|
||||
name: 03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d
|
||||
archive: .buildcache/archives/03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d.tar.gz
|
||||
- type: go-modules
|
||||
name: 02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445
|
||||
archive: .buildcache/archives/02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445.tar.gz
|
||||
- type: ui
|
||||
name: 01-ui-00aac246fd625f14356db52ed98a657e40b02a82
|
||||
archive: .buildcache/archives/01-ui-00aac246fd625f14356db52ed98a657e40b02a82.tar.gz
|
||||
- type: base
|
||||
name: 00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f
|
||||
archive: .buildcache/archives/00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f.tar.gz
|
||||
PACKAGE_CACHE_KEY_FILE: .buildcache/cache-keys/package-5c9d7d2650823a71d79844cc79ad18993c591691
|
||||
POST_PROCESSORS: microsoft-notarize av-scan
|
||||
circleci:
|
||||
BUILDER_CACHE_KEY_PREFIX_LIST:
|
||||
- copy-source_2180_{{checksum ".buildcache/cache-keys/copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d"}}
|
||||
- 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"}}
|
||||
PACKAGE_CACHE_KEY: package-5c9d7d2650823a71d79844cc79ad18993c591691-{{checksum ".buildcache/cache-keys/package-5c9d7d2650823a71d79844cc79ad18993c591691"}}
|
||||
build-command: VERSION_PKG_PATH=github.com/hashicorp/boundary/version; BINARY_SUFFIX=""; if [ "${GOOS}x" == "windowsx" ]; then BINARY_SUFFIX=".exe"; fi; unset GOPATH; ORIG_PATH=$(pwd); for PLUGIN_TYPE in host; do for CURR_PLUGIN in $(ls $ORIG_PATH/plugins/$PLUGIN_TYPE/mains); do cd $ORIG_PATH/plugins/$PLUGIN_TYPE/mains/$CURR_PLUGIN; go build -v -o $ORIG_PATH/plugins/$PLUGIN_TYPE/assets/boundary-plugin-${PLUGIN_TYPE}-${CURR_PLUGIN}${BINARY_SUFFIX} .; cd $ORIG_PATH; done; cd $ORIG_PATH/plugins/$PLUGIN_TYPE/assets; for CURR_PLUGIN in $(ls boundary-plugin*); do gzip -9 $CURR_PLUGIN; done; cd $ORIG_PATH; done; go build -v -tags 'ui' -ldflags "-X $VERSION_PKG_PATH.GitCommit=$PACKAGE_SOURCE_ID -X $VERSION_PKG_PATH.Version=0.7.4 -X $VERSION_PKG_PATH.VersionPrerelease=" -o $OUTPUT_DIR/boundary.exe ./cmd/boundary && cd $OUTPUT_DIR && zip $PACKAGE_ZIP_NAME boundary.exe
|
||||
aliases:
|
||||
- type: local
|
||||
path: boundary_0.7.4_windows_386.zip
|
||||
- type: public-hc-releases
|
||||
path: boundary/boundary_0.7.4/boundary_0.7.4_windows_386.zip
|
||||
- packagespecid: e397af2a56134e2c431d1f1b58260699c331e020
|
||||
inputs:
|
||||
BINARY_NAME: boundary.exe
|
||||
BUILD_TAGS: ui
|
||||
CGO_ENABLED: "0"
|
||||
GOARCH: amd64
|
||||
GOOS: windows
|
||||
PRODUCT_NAME: boundary
|
||||
PRODUCT_VERSION: 0.7.4
|
||||
PRODUCT_VERSION_MMP: 0.7.4
|
||||
PRODUCT_VERSION_PRE: ""
|
||||
meta:
|
||||
BUILD_JOB_NAME: windows_amd64_package
|
||||
BUNDLE_NAME: boundary_0.7.4
|
||||
builtin:
|
||||
BUILD_LAYERS:
|
||||
- type: copy-source
|
||||
name: 03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d
|
||||
archive: .buildcache/archives/03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d.tar.gz
|
||||
- type: go-modules
|
||||
name: 02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445
|
||||
archive: .buildcache/archives/02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445.tar.gz
|
||||
- type: ui
|
||||
name: 01-ui-00aac246fd625f14356db52ed98a657e40b02a82
|
||||
archive: .buildcache/archives/01-ui-00aac246fd625f14356db52ed98a657e40b02a82.tar.gz
|
||||
- type: base
|
||||
name: 00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f
|
||||
archive: .buildcache/archives/00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f.tar.gz
|
||||
PACKAGE_CACHE_KEY_FILE: .buildcache/cache-keys/package-e397af2a56134e2c431d1f1b58260699c331e020
|
||||
POST_PROCESSORS: microsoft-notarize av-scan
|
||||
circleci:
|
||||
BUILDER_CACHE_KEY_PREFIX_LIST:
|
||||
- copy-source_2180_{{checksum ".buildcache/cache-keys/copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d"}}
|
||||
- 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"}}
|
||||
PACKAGE_CACHE_KEY: package-e397af2a56134e2c431d1f1b58260699c331e020-{{checksum ".buildcache/cache-keys/package-e397af2a56134e2c431d1f1b58260699c331e020"}}
|
||||
build-command: VERSION_PKG_PATH=github.com/hashicorp/boundary/version; BINARY_SUFFIX=""; if [ "${GOOS}x" == "windowsx" ]; then BINARY_SUFFIX=".exe"; fi; unset GOPATH; ORIG_PATH=$(pwd); for PLUGIN_TYPE in host; do for CURR_PLUGIN in $(ls $ORIG_PATH/plugins/$PLUGIN_TYPE/mains); do cd $ORIG_PATH/plugins/$PLUGIN_TYPE/mains/$CURR_PLUGIN; go build -v -o $ORIG_PATH/plugins/$PLUGIN_TYPE/assets/boundary-plugin-${PLUGIN_TYPE}-${CURR_PLUGIN}${BINARY_SUFFIX} .; cd $ORIG_PATH; done; cd $ORIG_PATH/plugins/$PLUGIN_TYPE/assets; for CURR_PLUGIN in $(ls boundary-plugin*); do gzip -9 $CURR_PLUGIN; done; cd $ORIG_PATH; done; go build -v -tags 'ui' -ldflags "-X $VERSION_PKG_PATH.GitCommit=$PACKAGE_SOURCE_ID -X $VERSION_PKG_PATH.Version=0.7.4 -X $VERSION_PKG_PATH.VersionPrerelease=" -o $OUTPUT_DIR/boundary.exe ./cmd/boundary && cd $OUTPUT_DIR && zip $PACKAGE_ZIP_NAME boundary.exe
|
||||
aliases:
|
||||
- type: local
|
||||
path: boundary_0.7.4_windows_amd64.zip
|
||||
- type: public-hc-releases
|
||||
path: boundary/boundary_0.7.4/boundary_0.7.4_windows_amd64.zip
|
||||
base-image: docker.mirror.hashicorp.services/golang@sha256:d860e175278037ee2429fecb1150bf10635ff4488c5a6faf695b169bf2c0868f
|
||||
layers:
|
||||
- depth: 0
|
||||
final: false
|
||||
type: base
|
||||
id: 4efc6b999f22c2117dd52d796786af51dd4d4d1f
|
||||
name: 00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f
|
||||
parentname: ""
|
||||
parenttype: ""
|
||||
parentid: ""
|
||||
cachekeyfile: .buildcache/cache-keys/base-4efc6b999f22c2117dd52d796786af51dd4d4d1f
|
||||
sourceinclude: ""
|
||||
sourceexclude: ""
|
||||
archivefile: .buildcache/archives/00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f.tar.gz
|
||||
dockerfile: |
|
||||
# syntax=docker.mirror.hashicorp.services/docker/dockerfile:1.1.7-experimental
|
||||
FROM docker.mirror.hashicorp.services/golang@sha256:d860e175278037ee2429fecb1150bf10635ff4488c5a6faf695b169bf2c0868f
|
||||
COPY . ./
|
||||
ENV \
|
||||
GOPATH= \
|
||||
GOBIN=/usr/local/bin \
|
||||
GO111MODULE=on \
|
||||
CGO_ENABLED=0
|
||||
RUN \
|
||||
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg \
|
||||
| apt-key add - \
|
||||
&& curl -sS https://deb.nodesource.com/gpgkey/nodesource.gpg.key \
|
||||
| apt-key add - \
|
||||
&& echo "deb https://deb.nodesource.com/node_14.x buster main" | tee /etc/apt/sources.list.d/nodesource.list \
|
||||
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
|
||||
&& apt-get update \
|
||||
&& apt-get install -yq yarn zip nodejs \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
meta:
|
||||
builtin:
|
||||
LAYER_LIST:
|
||||
- type: base
|
||||
name: 00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f
|
||||
archive: .buildcache/archives/00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f.tar.gz
|
||||
circleci:
|
||||
CACHE_KEY_PREFIX_LIST:
|
||||
- base_4efc_{{checksum ".buildcache/cache-keys/base-4efc6b999f22c2117dd52d796786af51dd4d4d1f"}}
|
||||
childcount: 1
|
||||
- depth: 1
|
||||
final: false
|
||||
type: ui
|
||||
id: 00aac246fd625f14356db52ed98a657e40b02a82
|
||||
name: 01-ui-00aac246fd625f14356db52ed98a657e40b02a82
|
||||
parentname: 00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f
|
||||
parenttype: base
|
||||
parentid: 4efc6b999f22c2117dd52d796786af51dd4d4d1f
|
||||
cachekeyfile: .buildcache/cache-keys/ui-00aac246fd625f14356db52ed98a657e40b02a82
|
||||
sourceinclude: internal/ui/VERSION
|
||||
sourceexclude: ""
|
||||
archivefile: .buildcache/archives/01-ui-00aac246fd625f14356db52ed98a657e40b02a82.tar.gz
|
||||
dockerfile: |
|
||||
# syntax=docker.mirror.hashicorp.services/docker/dockerfile:1.1.7-experimental
|
||||
ARG BASE_IMAGE
|
||||
FROM $BASE_IMAGE
|
||||
COPY . ./
|
||||
RUN \
|
||||
SHA="$(head -n1 internal/ui/VERSION | cut -d ' ' -f1)" \
|
||||
&& DIR=internal/ui/.tmp/boundary-ui \
|
||||
&& mkdir -p "$(dirname "$DIR")" \
|
||||
&& git clone https://github.com/hashicorp/boundary-ui "$DIR" \
|
||||
&& ( cd "$DIR" \
|
||||
&& git fetch origin "$SHA" \
|
||||
&& git checkout "$SHA" \
|
||||
&& yarn install \
|
||||
&& yarn build:ui:admin; )
|
||||
meta:
|
||||
builtin:
|
||||
LAYER_LIST:
|
||||
- type: ui
|
||||
name: 01-ui-00aac246fd625f14356db52ed98a657e40b02a82
|
||||
archive: .buildcache/archives/01-ui-00aac246fd625f14356db52ed98a657e40b02a82.tar.gz
|
||||
- type: base
|
||||
name: 00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f
|
||||
archive: .buildcache/archives/00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f.tar.gz
|
||||
circleci:
|
||||
CACHE_KEY_PREFIX_LIST:
|
||||
- ui_00aa_{{checksum ".buildcache/cache-keys/ui-00aac246fd625f14356db52ed98a657e40b02a82"}}
|
||||
- base_4efc_{{checksum ".buildcache/cache-keys/base-4efc6b999f22c2117dd52d796786af51dd4d4d1f"}}
|
||||
childcount: 1
|
||||
- depth: 2
|
||||
final: false
|
||||
type: go-modules
|
||||
id: 3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445
|
||||
name: 02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445
|
||||
parentname: 01-ui-00aac246fd625f14356db52ed98a657e40b02a82
|
||||
parenttype: ui
|
||||
parentid: 00aac246fd625f14356db52ed98a657e40b02a82
|
||||
cachekeyfile: .buildcache/cache-keys/go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445
|
||||
sourceinclude: go.mod go.sum */go.mod */go.sum
|
||||
sourceexclude: ""
|
||||
archivefile: .buildcache/archives/02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445.tar.gz
|
||||
dockerfile: |
|
||||
# syntax=docker.mirror.hashicorp.services/docker/dockerfile:1.1.7-experimental
|
||||
ARG BASE_IMAGE
|
||||
FROM $BASE_IMAGE
|
||||
COPY . ./
|
||||
RUN go mod download
|
||||
meta:
|
||||
builtin:
|
||||
LAYER_LIST:
|
||||
- type: go-modules
|
||||
name: 02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445
|
||||
archive: .buildcache/archives/02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445.tar.gz
|
||||
- type: ui
|
||||
name: 01-ui-00aac246fd625f14356db52ed98a657e40b02a82
|
||||
archive: .buildcache/archives/01-ui-00aac246fd625f14356db52ed98a657e40b02a82.tar.gz
|
||||
- type: base
|
||||
name: 00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f
|
||||
archive: .buildcache/archives/00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f.tar.gz
|
||||
circleci:
|
||||
CACHE_KEY_PREFIX_LIST:
|
||||
- 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"}}
|
||||
childcount: 1
|
||||
- depth: 3
|
||||
final: true
|
||||
type: copy-source
|
||||
id: 218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d
|
||||
name: 03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d
|
||||
parentname: 02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445
|
||||
parenttype: go-modules
|
||||
parentid: 3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445
|
||||
cachekeyfile: .buildcache/cache-keys/copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d
|
||||
sourceinclude: '*.go *.up.sql'
|
||||
sourceexclude: ""
|
||||
archivefile: .buildcache/archives/03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d.tar.gz
|
||||
dockerfile: |
|
||||
# syntax=docker.mirror.hashicorp.services/docker/dockerfile:1.1.7-experimental
|
||||
ARG BASE_IMAGE
|
||||
FROM $BASE_IMAGE
|
||||
COPY . ./
|
||||
meta:
|
||||
builtin:
|
||||
LAYER_LIST:
|
||||
- type: copy-source
|
||||
name: 03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d
|
||||
archive: .buildcache/archives/03-copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d.tar.gz
|
||||
- type: go-modules
|
||||
name: 02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445
|
||||
archive: .buildcache/archives/02-go-modules-3b7f0b7915342371f9c6fbcb2eb65e75b9fc7445.tar.gz
|
||||
- type: ui
|
||||
name: 01-ui-00aac246fd625f14356db52ed98a657e40b02a82
|
||||
archive: .buildcache/archives/01-ui-00aac246fd625f14356db52ed98a657e40b02a82.tar.gz
|
||||
- type: base
|
||||
name: 00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f
|
||||
archive: .buildcache/archives/00-base-4efc6b999f22c2117dd52d796786af51dd4d4d1f.tar.gz
|
||||
circleci:
|
||||
CACHE_KEY_PREFIX_LIST:
|
||||
- copy-source_2180_{{checksum ".buildcache/cache-keys/copy-source-218031bf58e9e3b8f7f4f78be9a1bdf3caee4d0d"}}
|
||||
- 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"}}
|
||||
childcount: 0
|
||||
@ -1,120 +0,0 @@
|
||||
---
|
||||
config:
|
||||
product-repo: https://github.com/hashicorp/boundary.git
|
||||
release-repo: https://github.com/hashicorp/boundary-release.git
|
||||
product-id: github.com/hashicorp/boundary
|
||||
circleci-project-slug: gh/hashicorp/boundary
|
||||
circleci-host: circleci.com
|
||||
on-publish: create-github-release
|
||||
|
||||
inputs:
|
||||
defaults:
|
||||
PRODUCT_NAME: boundary
|
||||
PRODUCT_VERSION: 0.7.4
|
||||
BUILD_TAGS: ui
|
||||
CGO_ENABLED: 0
|
||||
|
||||
templates:
|
||||
BINARY_NAME: '{{.PRODUCT_NAME}}{{if eq .GOOS "windows"}}.exe{{end}}'
|
||||
PRODUCT_VERSION_MMP: '{{with .PRODUCT_VERSION | strings.SplitN "-" 2}}{{index . 0}}{{end}}'
|
||||
PRODUCT_VERSION_PRE: '{{with .PRODUCT_VERSION | strings.SplitN "-" 2}}{{if gt (len .) 1}}{{index . 1}}{{else}}{{end}}{{end}}'
|
||||
|
||||
packages:
|
||||
- inputs: { GOOS: darwin, GOARCH: amd64 }
|
||||
- inputs: { GOOS: darwin, GOARCH: arm64 }
|
||||
- inputs: { GOOS: freebsd, GOARCH: 386 }
|
||||
- inputs: { GOOS: freebsd, GOARCH: amd64 }
|
||||
- inputs: { GOOS: freebsd, GOARCH: arm }
|
||||
- inputs: { GOOS: linux, GOARCH: 386 }
|
||||
- inputs: { GOOS: linux, GOARCH: amd64 }
|
||||
- inputs: { GOOS: linux, GOARCH: arm }
|
||||
- inputs: { GOOS: linux, GOARCH: arm64 }
|
||||
- inputs: { GOOS: netbsd, GOARCH: 386 }
|
||||
- inputs: { GOOS: netbsd, GOARCH: amd64 }
|
||||
- inputs: { GOOS: openbsd, GOARCH: 386 }
|
||||
- inputs: { GOOS: openbsd, GOARCH: amd64 }
|
||||
- inputs: { GOOS: solaris, GOARCH: amd64 }
|
||||
- inputs: { GOOS: windows, GOARCH: 386 }
|
||||
- inputs: { GOOS: windows, GOARCH: amd64 }
|
||||
|
||||
meta:
|
||||
templates:
|
||||
BUILD_JOB_NAME: >-
|
||||
{{.GOOS}}_{{.GOARCH}}_package
|
||||
BUNDLE_NAME: "boundary_{{.PRODUCT_VERSION}}"
|
||||
|
||||
package-aliases:
|
||||
- type: local
|
||||
template: >-
|
||||
{{.BUNDLE_NAME}}_{{.GOOS}}_{{.GOARCH}}.zip
|
||||
- type: public-hc-releases
|
||||
template: >-
|
||||
boundary/{{.BUNDLE_NAME}}/{{.BUNDLE_NAME}}_{{.GOOS}}_{{.GOARCH}}.zip
|
||||
|
||||
# golang:1.17.5-bullseye
|
||||
base-image: "docker.mirror.hashicorp.services/golang@sha256:d860e175278037ee2429fecb1150bf10635ff4488c5a6faf695b169bf2c0868f"
|
||||
layers:
|
||||
- name: base
|
||||
dockerfile: |
|
||||
ENV \
|
||||
GOPATH= \
|
||||
GOBIN=/usr/local/bin \
|
||||
GO111MODULE=on \
|
||||
CGO_ENABLED=0
|
||||
RUN \
|
||||
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg \
|
||||
| apt-key add - \
|
||||
&& curl -sS https://deb.nodesource.com/gpgkey/nodesource.gpg.key \
|
||||
| apt-key add - \
|
||||
&& echo "deb https://deb.nodesource.com/node_14.x buster main" | tee /etc/apt/sources.list.d/nodesource.list \
|
||||
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
|
||||
&& apt-get update \
|
||||
&& apt-get install -yq yarn zip nodejs \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
- name: ui
|
||||
source-include: internal/ui/VERSION
|
||||
dockerfile: |
|
||||
RUN \
|
||||
SHA="$(head -n1 internal/ui/VERSION | cut -d ' ' -f1)" \
|
||||
&& DIR=internal/ui/.tmp/boundary-ui \
|
||||
&& mkdir -p "$(dirname "$DIR")" \
|
||||
&& git clone https://github.com/hashicorp/boundary-ui "$DIR" \
|
||||
&& ( cd "$DIR" \
|
||||
&& git fetch origin "$SHA" \
|
||||
&& git checkout "$SHA" \
|
||||
&& yarn install \
|
||||
&& yarn build:ui:admin; )
|
||||
|
||||
- name: go-modules
|
||||
source-include: "go.mod go.sum */go.mod */go.sum"
|
||||
dockerfile: |
|
||||
RUN go mod download
|
||||
|
||||
- name: copy-source
|
||||
source-include: "*.go *.up.sql"
|
||||
|
||||
build-command: VERSION_PKG_PATH=github.com/hashicorp/boundary/version;
|
||||
BINARY_SUFFIX="";
|
||||
if [ "${GOOS}x" == "windowsx" ]; then BINARY_SUFFIX=".exe"; fi;
|
||||
unset GOPATH;
|
||||
ORIG_PATH=$(pwd);
|
||||
for PLUGIN_TYPE in host; do
|
||||
for CURR_PLUGIN in $(ls $ORIG_PATH/plugins/$PLUGIN_TYPE/mains); do
|
||||
cd $ORIG_PATH/plugins/$PLUGIN_TYPE/mains/$CURR_PLUGIN;
|
||||
go build -v -o $ORIG_PATH/plugins/$PLUGIN_TYPE/assets/boundary-plugin-${PLUGIN_TYPE}-${CURR_PLUGIN}${BINARY_SUFFIX} .;
|
||||
cd $ORIG_PATH;
|
||||
done;
|
||||
cd $ORIG_PATH/plugins/$PLUGIN_TYPE/assets;
|
||||
for CURR_PLUGIN in $(ls boundary-plugin*); do
|
||||
gzip -9 $CURR_PLUGIN;
|
||||
done;
|
||||
cd $ORIG_PATH;
|
||||
done;
|
||||
go build -v -tags '{{.BUILD_TAGS}}'
|
||||
-ldflags "-X $VERSION_PKG_PATH.GitCommit=$PACKAGE_SOURCE_ID
|
||||
-X $VERSION_PKG_PATH.Version={{.PRODUCT_VERSION_MMP}}
|
||||
-X $VERSION_PKG_PATH.VersionPrerelease={{.PRODUCT_VERSION_PRE}}"
|
||||
-o $OUTPUT_DIR/{{.BINARY_NAME}}
|
||||
./cmd/boundary
|
||||
&& cd $OUTPUT_DIR && zip $PACKAGE_ZIP_NAME {{.BINARY_NAME}}
|
||||
@ -1,78 +0,0 @@
|
||||
# ***
|
||||
# WARNING: Do not EDIT or MERGE this file, it is generated by packagespec.
|
||||
# ***
|
||||
# packagespec.mk should be included at the end of your main Makefile,
|
||||
# it provides hooks into packagespec targets, so you can run them
|
||||
# from the root of your product repository.
|
||||
#
|
||||
# All packagespec-generated make targets assume they are invoked by
|
||||
# targets in this file, which provides the necessary context for those
|
||||
# other targets. Therefore, this file is not just for conveninence but
|
||||
# is currently necessary to the correct functioning of Packagespec.
|
||||
|
||||
# Since this file is included in other Makefiles, which may or may not want
|
||||
# to use bash with these options, we explicitly set the shell for specific
|
||||
# targets, in this file, rather than setting the global SHELL variable.
|
||||
PACKAGESPEC_SHELL := /usr/bin/env bash -euo pipefail -c
|
||||
|
||||
# The RUN macro is used in place of the shell builtin in this file, so that
|
||||
# we can use the PACKAGESPEC_SHELL rather than the default from the Makefile
|
||||
# that includes this one.
|
||||
RUN = $(shell $(PACKAGESPEC_SHELL) '$1')
|
||||
|
||||
# This can be overridden by the calling Makefile to write config to a different path.
|
||||
PACKAGESPEC_CIRCLECI_CONFIG ?= .circleci/config.yml
|
||||
PACKAGESPEC_HOOK_POST_CI_CONFIG ?= echo > /dev/null
|
||||
|
||||
SPEC_FILE_PATTERN := packages*.yml
|
||||
# SPEC is the human-managed description of which packages we are able to build.
|
||||
SPEC := $(call RUN,find . -mindepth 1 -maxdepth 1 -name '$(SPEC_FILE_PATTERN)')
|
||||
ifneq ($(words $(SPEC)),1)
|
||||
$(error Found $(words $(SPEC)) $(SPEC_FILE_PATTERN) files, need exactly 1: $(SPEC))
|
||||
endif
|
||||
SPEC_FILENAME := $(notdir $(SPEC))
|
||||
SPEC_MODIFIER := $(SPEC_FILENAME:packages%.yml=%)
|
||||
# LOCKDIR contains the lockfile and layer files.
|
||||
LOCKDIR := packages$(SPEC_MODIFIER).lock
|
||||
LOCKFILE := $(LOCKDIR)/pkgs.yml
|
||||
|
||||
export PACKAGE_SPEC_ID LAYER_SPEC_ID PRODUCT_REVISION PRODUCT_VERSION
|
||||
|
||||
# PASSTHROUGH_TARGETS are convenience aliases for targets defined in $(LOCKDIR)/Makefile
|
||||
PASSTHROUGH_TARGETS := \
|
||||
build package-contents copy-package-contents build-all \
|
||||
aliases meta package package-meta package-meta-all \
|
||||
build-ci watch-ci \
|
||||
stage-config stage custom-build custom-build-config\
|
||||
bundle \
|
||||
orchestrator stop-orchestrator \
|
||||
list-custom-builds \
|
||||
list-staged-builds \
|
||||
list-promoted-builds \
|
||||
publish-config publish \
|
||||
workflow
|
||||
|
||||
.PHONY: $(PASSTHROUGH_TARGETS)
|
||||
|
||||
LOCAL_TARGETS := packages packagespec-circleci-config $(PACKAGESPEC_CIRCLECI_CONFIG)
|
||||
|
||||
# Set the shell for all packagespec targets.
|
||||
$(PASSTHROUGH_TARGETS) $(LOCAL_TARGETS): SHELL := $(PACKAGESPEC_SHELL)
|
||||
|
||||
$(PASSTHROUGH_TARGETS):
|
||||
@PRODUCT_REPO_ROOT="$(call RUN,git rev-parse --show-toplevel)" $(MAKE) -C $(LOCKDIR) $@
|
||||
|
||||
# packages regenerates build and CI config using packagespec. This is only for
|
||||
# internal HashiCorp use, as it has dependencies not available externally.
|
||||
.PHONY: packages
|
||||
packages:
|
||||
@command -v packagespec > /dev/null 2>&1 || { \
|
||||
echo "Please install packagespec."; \
|
||||
echo "Note: packagespec is only available to HashiCorp employees at present."; \
|
||||
exit 1; \
|
||||
}
|
||||
@packagespec lock -circleciconfig="$(PACKAGESPEC_CIRCLECI_CONFIG)"
|
||||
@$(MAKE) packagespec-circleci-config
|
||||
|
||||
packagespec-circleci-config:
|
||||
@$(PACKAGESPEC_HOOK_POST_CI_CONFIG)
|
||||
@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# This script builds the required plugins.
|
||||
set -e
|
||||
|
||||
ORIG_PATH=$(pwd);
|
||||
echo "==> Building Host Plugins..."
|
||||
for PLUGIN_TYPE in host; do
|
||||
rm -f $ORIG_PATH/plugins/$PLUGIN_TYPE/assets/boundary-plugin-${PLUGIN_TYPE}*
|
||||
for CURR_PLUGIN in $(ls $ORIG_PATH/plugins/$PLUGIN_TYPE/mains); do
|
||||
cd $ORIG_PATH/plugins/$PLUGIN_TYPE/mains/$CURR_PLUGIN;
|
||||
go build -v -o $ORIG_PATH/plugins/$PLUGIN_TYPE/assets/boundary-plugin-${PLUGIN_TYPE}-${CURR_PLUGIN} .;
|
||||
cd $ORIG_PATH;
|
||||
done;
|
||||
cd $ORIG_PATH/plugins/$PLUGIN_TYPE/assets;
|
||||
for CURR_PLUGIN in $(ls boundary-plugin*); do
|
||||
gzip -f -9 $CURR_PLUGIN;
|
||||
done;
|
||||
cd $ORIG_PATH;
|
||||
done;
|
||||
Loading…
Reference in new issue