Skip to content

Commit

Permalink
backport of commit c6692aa
Browse files Browse the repository at this point in the history
  • Loading branch information
edorion authored Jul 5, 2023
1 parent 23d5009 commit 93341e2
Show file tree
Hide file tree
Showing 2,468 changed files with 15,107 additions and 105,385 deletions.
18 changes: 0 additions & 18 deletions .copywrite.hcl

This file was deleted.

4 changes: 0 additions & 4 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,3 @@
f69fbf22552deac9ec81503d629fb70919acabdb
# Rewrote interface{} -> any
89a0b4f9d7f34bae59bbf4b32b2c156ab28875f4
# Added license headers
3c29308673a9fb64c68ca27e15b4c9017a2d597e
# Upgraded buf which updated protobuf files
982c9c263c5d7f9822cdae4d8fe38cac8e1ff98f
76 changes: 0 additions & 76 deletions .github/scripts/schema-diff-hide-gh-comments.sh

This file was deleted.

4 changes: 2 additions & 2 deletions .github/scripts/set-test-package-matrix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
set -euo pipefail

# set matrix var to list of unique packages containing tests
matrix="$(go list -json="ImportPath,TestGoFiles,XTestGoFiles" ./... | jq --compact-output '. | select(.TestGoFiles != null or .XTestGoFiles != null) | .ImportPath' | jq --slurp --compact-output '.')"
matrix="$(go list -json="ImportPath,TestGoFiles" ./... | jq --compact-output '. | select(.TestGoFiles != null) | .ImportPath' | jq --slurp --compact-output '.')"

echo "matrix=${matrix}" | tee -a "${GITHUB_OUTPUT}"
echo "matrix=${matrix}" | tee -a "${GITHUB_OUTPUT}"
4 changes: 2 additions & 2 deletions .github/workflows/actionlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jobs:
actionlint:
runs-on: ${{ fromJSON(vars.RUNNER) }}
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Check workflow files
uses: docker://docker.mirror.hashicorp.services/rhysd/actionlint@sha256:3f24bf9d72ca67af6f9f8f3cc63b0e24621b57bf421cecfc452c3312e32b68cc # 1.6.24
uses: docker://docker.mirror.hashicorp.services/rhysd/actionlint@sha256:02ccb6d91e4cb4a7b21eb99d5274d257e81ae667688d730e89d7ea0d6d35db91
with:
args: -color -ignore SC2129 -ignore "'property \"download-path\" is not defined in object type'"
82 changes: 35 additions & 47 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
name: build

on:
push:
branches:
- '**'
tags-ignore:
- '**'
workflow_call:
workflow_dispatch:
- workflow_dispatch
- push
- workflow_call

env:
PKG_NAME: "boundary"
Expand All @@ -24,10 +20,10 @@ jobs:
base-product-version: $${{ steps.set-product-version.outputs.base-product-version }}
prerelease-product-version: ${{ steps.set-product-version.outputs.prerelease-product-version }}
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Set Product version
id: set-product-version
uses: hashicorp/actions-set-product-version@v1 # TSCCR: loading action configs: failed to query HEAD reference: failed to get advertised references: authorization failed
uses: hashicorp/actions-set-product-version@v1

product-metadata:
needs: set-product-version
Expand All @@ -37,7 +33,7 @@ jobs:
product-edition: ${{ steps.get-product-edition.outputs.product-edition }}
go-version: ${{ steps.get-go-version.outputs.go-version }}
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Determine Go version
id: get-go-version
# We use .go-version as our source of truth for current Go
Expand All @@ -46,17 +42,16 @@ jobs:
echo "Building with Go $(cat .go-version)"
echo "go-version=$(cat .go-version)" >> "$GITHUB_OUTPUT"
- name: Set up Go
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
with:
go-version: "${{ steps.get-go-version.outputs.go-version }}"
cache: false
- name: Determine Go cache paths
id: go-cache-paths
run: |
echo "go-build=$(go env GOCACHE)" >> "$GITHUB_OUTPUT"
echo "go-mod=$(go env GOMODCACHE)" >> "$GITHUB_OUTPUT"
- name: Set up Go modules cache
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 # v3.2.6
with:
path: |
${{ steps.go-cache-paths.outputs.go-build }}
Expand Down Expand Up @@ -84,7 +79,7 @@ jobs:
runs-on: ${{ fromJSON(vars.BUILDER_LINUX) }}
steps:
- name: 'Checkout directory'
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- run: |
echo "Product Version - ${{ needs.set-product-version.outputs.product-version }}"
echo "Product Prerelease - ${{ needs.set-product-version.outputs.prerelease-product-version }}"
Expand All @@ -98,14 +93,14 @@ jobs:
filepath: ${{ steps.generate-metadata-file.outputs.filepath }}
steps:
- name: 'Checkout directory'
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Generate metadata file
id: generate-metadata-file
uses: hashicorp/actions-generate-metadata@v1 # TSCCR: loading action configs: failed to query HEAD reference: failed to get advertised references: authorization failed
uses: hashicorp/actions-generate-metadata@v1
with:
repository: boundary
version: ${{ needs.set-product-version.outputs.product-version }}
product: ${{ env.PKG_NAME }}

- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: metadata.json
Expand Down Expand Up @@ -135,19 +130,18 @@ jobs:
GOPRIVATE: "github.com/hashicorp"
GO111MODULE: on
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Set up go
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
with:
go-version: ${{ matrix.go }}
cache: false
- name: Determine Go cache paths
id: go-cache-paths
run: |
echo "go-build=$(go env GOCACHE)" >> "$GITHUB_OUTPUT"
echo "go-mod=$(go env GOMODCACHE)" >> "$GITHUB_OUTPUT"
- name: Set up Go modules cache
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 # v3.2.6
with:
path: |
${{ steps.go-cache-paths.outputs.go-build }}
Expand All @@ -161,7 +155,7 @@ jobs:
id: set-sha
run: echo "sha=$(head -n1 internal/ui/VERSION | cut -d ' ' -f1)" >> "$GITHUB_OUTPUT"
- name: Download UI artifact
uses: dawidd6/action-download-artifact@246dbf436b23d7c49e21a7ab8204ca9ecd1fe615 # v2.27.0
uses: dawidd6/action-download-artifact@5e780fc7bbd0cac69fc73271ed86edf5dcb72d67 # v2.26.0
with:
workflow: build-admin-ui.yaml
commit: ${{ steps.set-sha.outputs.sha }}
Expand All @@ -173,7 +167,7 @@ jobs:
CGO_ENABLED: "0"
PRERELEASE_PRODUCT_VERSION: ${{ needs.set-product-version.outputs.prerelease-product-version }}
METADATA_PRODUCT_VERSION: ${{ needs.product-metadata.outputs.product-edition }}
uses: hashicorp/actions-go-build@v0.1.9 # TSCCR: loading action configs: failed to query HEAD reference: failed to get advertised references: authorization failed
uses: hashicorp/actions-go-build@v0.1.7
with:
product_name: ${{ env.PKG_NAME }}
product_version: ${{ needs.set-product-version. outputs.product-version }}
Expand Down Expand Up @@ -207,21 +201,20 @@ jobs:
GO111MODULE: on

steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Set up Git
run: git config --global url."https://${{ secrets.ELEVATED_GITHUB_TOKEN }}:@github.com".insteadOf "https://github.com"
- name: Set up Go
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
with:
go-version: ${{ matrix.go }}
cache: false
- name: Determine Go cache paths
id: go-cache-paths
run: |
echo "go-build=$(go env GOCACHE)" >> "$GITHUB_OUTPUT"
echo "go-mod=$(go env GOMODCACHE)" >> "$GITHUB_OUTPUT"
- name: Set up Go modules cache
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 # v3.2.6
with:
path: |
${{ steps.go-cache-paths.outputs.go-build }}
Expand All @@ -233,7 +226,7 @@ jobs:
id: set-sha
run: echo "sha=$(head -n1 internal/ui/VERSION | cut -d ' ' -f1)" >> "$GITHUB_OUTPUT"
- name: Download UI artifact
uses: dawidd6/action-download-artifact@246dbf436b23d7c49e21a7ab8204ca9ecd1fe615 # v2.27.0
uses: dawidd6/action-download-artifact@5e780fc7bbd0cac69fc73271ed86edf5dcb72d67 # v2.26.0
with:
workflow: build-admin-ui.yaml
commit: ${{ steps.set-sha.outputs.sha }}
Expand All @@ -245,7 +238,7 @@ jobs:
CGO_ENABLED: "0"
PRERELEASE_PRODUCT_VERSION: ${{ needs.set-product-version.outputs.prerelease-product-version }}
METADATA_PRODUCT_VERSION: ${{ needs.product-metadata.outputs.product-edition }}
uses: hashicorp/actions-go-build@v0.1.9 # TSCCR: loading action configs: failed to query HEAD reference: failed to get advertised references: authorization failed
uses: hashicorp/actions-go-build@v0.1.7
with:
product_name: ${{ env.PKG_NAME }}
product_version: ${{ needs.set-product-version. outputs.product-version }}
Expand All @@ -260,7 +253,7 @@ jobs:
name: ${{ env.PKG_NAME }}_${{ needs.set-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip
path: out/${{ env.PKG_NAME }}_${{ needs.set-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip
- name: Package
uses: hashicorp/actions-packaging-linux@v1 # TSCCR: loading action configs: failed to query HEAD reference: failed to get advertised references: authorization failed
uses: hashicorp/actions-packaging-linux@v1
with:
name: ${{ github.event.repository.name }}
description: "HashiCorp Boundary - Identity-based access management for dynamic infrastructure"
Expand Down Expand Up @@ -308,19 +301,18 @@ jobs:
GO111MODULE: on

steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Set up go
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
with:
go-version: ${{ matrix.go }}
cache: false
- name: Determine Go cache paths
id: go-cache-paths
run: |
echo "go-build=$(go env GOCACHE)" >> "$GITHUB_OUTPUT"
echo "go-mod=$(go env GOMODCACHE)" >> "$GITHUB_OUTPUT"
- name: Set up Go modules cache
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 # v3.2.6
with:
path: |
${{ steps.go-cache-paths.outputs.go-build }}
Expand All @@ -332,7 +324,7 @@ jobs:
id: set-sha
run: echo "sha=$(head -n1 internal/ui/VERSION | cut -d ' ' -f1)" >> "$GITHUB_OUTPUT"
- name: Download UI artifact
uses: dawidd6/action-download-artifact@246dbf436b23d7c49e21a7ab8204ca9ecd1fe615 # v2.27.0
uses: dawidd6/action-download-artifact@5e780fc7bbd0cac69fc73271ed86edf5dcb72d67 # v2.26.0
with:
workflow: build-admin-ui.yaml
commit: ${{ steps.set-sha.outputs.sha }}
Expand All @@ -344,10 +336,10 @@ jobs:
CGO_ENABLED: "0"
PRERELEASE_PRODUCT_VERSION: ${{ needs.set-product-version.outputs.prerelease-product-version }}
METADATA_PRODUCT_VERSION: ${{ needs.product-metadata.outputs.product-edition }}
uses: hashicorp/actions-go-build@v0.1.9 # TSCCR: loading action configs: failed to query HEAD reference: failed to get advertised references: authorization failed
uses: hashicorp/actions-go-build@v0.1.7
with:
product_name: ${{ env.PKG_NAME }}
product_version: ${{ needs.set-product-version. outputs.product-version }}
product_version: ${{ needs.set-product-version.outputs.product-version }}
go_version: ${{ matrix.go }}
os: ${{ matrix.goos }}
arch: ${{ matrix.goarch }}
Expand All @@ -369,16 +361,14 @@ jobs:
strategy:
matrix:
arch: ["arm", "arm64", "386", "amd64"]
outputs:
name: docker.io/hashicorppreview/${{ env.repo }}:${{ env.minor-version }}-dev-${{ github.sha }}
env:
repo: ${{ github.event.repository.name }}
version: ${{ needs.set-product-version.outputs.product-version }}
minor-version: ${{ needs.product-metadata.outputs.product-minor-version }}
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Docker Build (Action)
uses: hashicorp/actions-docker-build@v1 # TSCCR: loading action configs: failed to query HEAD reference: failed to get advertised references: authorization failed
uses: hashicorp/actions-docker-build@v1
with:
version: ${{ env.version }}
target: default
Expand All @@ -399,22 +389,20 @@ jobs:
# Github Actions secrets, it only makes sense to run this workflow when those
# secrets are available. Any pull requests from forks will not trigger the
# workflow.
if: github.event.pull_request.head.repo.fork != 'true'
if: "! github.event.pull_request.head.repo.fork"
needs:
- set-product-version
- product-metadata
- build-linux
- build-docker
uses: ./.github/workflows/enos-run.yml
with:
artifact-name: "boundary_${{ needs.set-product-version.outputs.product-version }}_linux_amd64.zip"
go-version: ${{ needs.product-metadata.outputs.go-version }}
edition: ${{ needs.product-metadata.outputs.product-edition }}
docker-image-name: ${{ needs.build-docker.outputs.name }}
docker-image-file: "boundary_default_linux_amd64_${{ needs.set-product-version.outputs.product-version }}_${{ github.sha }}.docker.dev.tar"
secrets: inherit
bats:
uses: ./.github/workflows/test-cli-ui_oss.yml
if: github.event.pull_request.head.repo.fork != 'true'
uses: ./.github/workflows/test-cli-ui.yml
if: "! github.event.pull_request.head.repo.fork"
needs:
- set-product-version
- build-linux
Expand Down
Loading

0 comments on commit 93341e2

Please sign in to comment.