mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-19 22:50:34 -04:00
add build-gcp-guest-agent-ko
This commit is contained in:
parent
f99f01321a
commit
d001df596a
7 changed files with 78 additions and 19 deletions
5
.github/workflows/build-apko-image.yml
vendored
5
.github/workflows/build-apko-image.yml
vendored
|
@ -2,11 +2,6 @@ name: Build and upload all apko container images
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- "release/**"
|
|
||||||
- "feat/reproducible-builds-ko"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-apko-image:
|
build-apko-image:
|
||||||
|
|
|
@ -2,9 +2,6 @@ name: Build and upload constellation node operator image (KO)
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- feat/reproducible-builds-ko
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-constellation-node-operator:
|
build-constellation-node-operator:
|
||||||
|
|
62
.github/workflows/build-gcp-guest-agent-ko.yml
vendored
Normal file
62
.github/workflows/build-gcp-guest-agent-ko.yml
vendored
Normal file
|
@ -0,0 +1,62 @@
|
||||||
|
name: Build and Upload GCP guest-agent container (KO)
|
||||||
|
env:
|
||||||
|
REGISTRY: ghcr.io
|
||||||
|
KO_DATA_PATH: /etc/default/
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- "release/**"
|
||||||
|
- "feat/reproducible-builds-ko"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-gcp-guest-agent:
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: ./constellation
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
version: ["20220927.00"]
|
||||||
|
include:
|
||||||
|
- version: "20220927.00"
|
||||||
|
latest: true
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3.1.0
|
||||||
|
with:
|
||||||
|
repository: "GoogleCloudPlatform/guest-agent"
|
||||||
|
ref: refs/tags/${{ matrix.version }}
|
||||||
|
path: "guest-agent"
|
||||||
|
|
||||||
|
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3.1.0
|
||||||
|
with:
|
||||||
|
ref: ${{ github.head_ref }}
|
||||||
|
path: "constellation"
|
||||||
|
|
||||||
|
|
||||||
|
- name: Prepare hardcoded configuration file
|
||||||
|
working-directory: ${{ github.workspace }}
|
||||||
|
run: |
|
||||||
|
# https://ko.build/features/static-assets/
|
||||||
|
# cwd = /home/runner/work/constellation/constellation
|
||||||
|
koData="./guest-agent/kodata"
|
||||||
|
mkdir -p $koData
|
||||||
|
cp ./constellation/3rdparty/gcp-guest-agent/instance_configs.cfg $koData
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
- name: Build and upload join service container image
|
||||||
|
id: build-and-upload
|
||||||
|
# assumes that we are currently in the root of the repo
|
||||||
|
uses: ./constellation/.github/actions/build_micro_service_ko
|
||||||
|
with:
|
||||||
|
name: gcp-guest-agent
|
||||||
|
koTarget: ./guest-agent/google-guest-agent/
|
||||||
|
githubToken: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
cosignPublicKey: ${{ startsWith(github.ref, 'refs/heads/release/v') && secrets.COSIGN_PUBLIC_KEY || secrets.COSIGN_DEV_PUBLIC_KEY }}
|
||||||
|
cosignPrivateKey: ${{ startsWith(github.ref, 'refs/heads/release/v') && secrets.COSIGN_PRIVATE_KEY || secrets.COSIGN_DEV_PRIVATE_KEY }}
|
||||||
|
cosignPassword: ${{ startsWith(github.ref, 'refs/heads/release/v') && secrets.COSIGN_PASSWORD || secrets.COSIGN_DEV_PASSWORD }}
|
|
@ -4,7 +4,6 @@ env:
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-join-service-ko:
|
build-join-service-ko:
|
||||||
|
|
1
.github/workflows/build-kms-image-ko.yml
vendored
1
.github/workflows/build-kms-image-ko.yml
vendored
|
@ -4,7 +4,6 @@ env:
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-kms-server:
|
build-kms-server:
|
||||||
|
|
|
@ -2,15 +2,6 @@ name: Build and upload verification-service image (KO)
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- "release/**"
|
|
||||||
- "feat/reproducible-builds-ko"
|
|
||||||
#paths:
|
|
||||||
# - "verify/**"
|
|
||||||
# - "internal/attestation/**"
|
|
||||||
# - "internal/constants/**"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-verification-service:
|
build-verification-service:
|
||||||
|
|
16
.ko.yaml
16
.ko.yaml
|
@ -45,3 +45,19 @@ builds:
|
||||||
- -s -w -buildid=''
|
- -s -w -buildid=''
|
||||||
- -X github.com/edgelesssys/constellation/v2/internal/constants.VersionInfo=${PROJECT_VERSION}
|
- -X github.com/edgelesssys/constellation/v2/internal/constants.VersionInfo=${PROJECT_VERSION}
|
||||||
- -extldflags "-static"
|
- -extldflags "-static"
|
||||||
|
|
||||||
|
- id: gcp-guest-agent
|
||||||
|
dir: .
|
||||||
|
main: ./3rdparty/gcp-guest-agent/
|
||||||
|
env:
|
||||||
|
- CGO_ENABLED=0
|
||||||
|
- GOOS=linux
|
||||||
|
- GOARCH=amd64
|
||||||
|
flags:
|
||||||
|
- -trimpath
|
||||||
|
- -buildvcs=false
|
||||||
|
- -a
|
||||||
|
ldflags:
|
||||||
|
- -s -w -buildid=''
|
||||||
|
- -X github.com/edgelesssys/constellation/v2/internal/constants.VersionInfo=${PROJECT_VERSION}
|
||||||
|
- -extldflags "-static"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue