E2E: Build OSS CLI by default

This commit is contained in:
Nils Hanke 2022-09-13 14:27:38 +02:00 committed by Nils Hanke
parent 5f98e699e4
commit 472ba642b7
2 changed files with 14 additions and 1 deletions

View File

@ -12,6 +12,10 @@ inputs:
description: "Build CLI for this architecture. [amd64, arm64]" description: "Build CLI for this architecture. [amd64, arm64]"
required: true required: true
default: "amd64" default: "amd64"
enterpriseCLI:
description: "Build CLI with enterprise flag."
required: false
default: "false"
cosignPublicKey: cosignPublicKey:
description: "Cosign public key" description: "Cosign public key"
required: false required: false
@ -53,7 +57,12 @@ runs:
echo "::group::Build CLI" echo "::group::Build CLI"
mkdir -p build mkdir -p build
cd build cd build
cmake -DCLI_BUILD_TAGS:STRING=enterprise .. if [ ${{ inputs.enterpriseCLI }} == 'true' ]
then
cmake -DCLI_BUILD_TAGS:STRING=enterprise ..
else
cmake ..
fi
GOOS=${{ inputs.targetOS }} GOARCH=${{ inputs.targetArch }} make -j`nproc` cli GOOS=${{ inputs.targetOS }} GOARCH=${{ inputs.targetArch }} make -j`nproc` cli
cp constellation constellation-${{ inputs.targetOS }}-${{ inputs.targetArch }} cp constellation constellation-${{ inputs.targetOS }}-${{ inputs.targetArch }}
echo "$(pwd)" >> $GITHUB_PATH echo "$(pwd)" >> $GITHUB_PATH

View File

@ -16,6 +16,7 @@ jobs:
with: with:
targetOS: linux targetOS: linux
targetArch: amd64 targetArch: amd64
enterpriseCLI: true
cosignPublicKey: ${{ secrets.COSIGN_PUBLIC_KEY }} cosignPublicKey: ${{ secrets.COSIGN_PUBLIC_KEY }}
cosignPrivateKey: ${{ secrets.COSIGN_PRIVATE_KEY }} cosignPrivateKey: ${{ secrets.COSIGN_PRIVATE_KEY }}
cosignPassword: ${{ secrets.COSIGN_PASSWORD }} cosignPassword: ${{ secrets.COSIGN_PASSWORD }}
@ -25,6 +26,7 @@ jobs:
with: with:
targetOS: linux targetOS: linux
targetArch: arm64 targetArch: arm64
enterpriseCLI: true
cosignPublicKey: ${{ secrets.COSIGN_PUBLIC_KEY }} cosignPublicKey: ${{ secrets.COSIGN_PUBLIC_KEY }}
cosignPrivateKey: ${{ secrets.COSIGN_PRIVATE_KEY }} cosignPrivateKey: ${{ secrets.COSIGN_PRIVATE_KEY }}
cosignPassword: ${{ secrets.COSIGN_PASSWORD }} cosignPassword: ${{ secrets.COSIGN_PASSWORD }}
@ -34,6 +36,7 @@ jobs:
with: with:
targetOS: darwin targetOS: darwin
targetArch: amd64 targetArch: amd64
enterpriseCLI: true
cosignPublicKey: ${{ secrets.COSIGN_PUBLIC_KEY }} cosignPublicKey: ${{ secrets.COSIGN_PUBLIC_KEY }}
cosignPrivateKey: ${{ secrets.COSIGN_PRIVATE_KEY }} cosignPrivateKey: ${{ secrets.COSIGN_PRIVATE_KEY }}
cosignPassword: ${{ secrets.COSIGN_PASSWORD }} cosignPassword: ${{ secrets.COSIGN_PASSWORD }}
@ -43,6 +46,7 @@ jobs:
with: with:
targetOS: darwin targetOS: darwin
targetArch: arm64 targetArch: arm64
enterpriseCLI: true
cosignPublicKey: ${{ secrets.COSIGN_PUBLIC_KEY }} cosignPublicKey: ${{ secrets.COSIGN_PUBLIC_KEY }}
cosignPrivateKey: ${{ secrets.COSIGN_PRIVATE_KEY }} cosignPrivateKey: ${{ secrets.COSIGN_PRIVATE_KEY }}
cosignPassword: ${{ secrets.COSIGN_PASSWORD }} cosignPassword: ${{ secrets.COSIGN_PASSWORD }}