Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chainguard Integration #4018

Merged
merged 72 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from 53 commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
3348812
build kots with apko+melange in presubmit
imjasonh Jun 26, 2023
c2ccd2a
add language about non-production-readiness
imjasonh Jun 28, 2023
c3c93bc
include all currently supported kubectl versions
imjasonh Jun 29, 2023
e26ba4e
initial try
sgalsaleh Aug 25, 2023
6d35b86
second try
sgalsaleh Aug 25, 2023
a8e05bb
3rd try
sgalsaleh Aug 25, 2023
9a56cb8
fix syntax error
sgalsaleh Aug 25, 2023
446fe15
updates
sgalsaleh Aug 25, 2023
de9c359
/usr/local/bin
sgalsaleh Aug 25, 2023
f8f6f3c
fix symlinks
sgalsaleh Aug 25, 2023
4508852
propagate git tag to melange and apko + always cleanup c11y clusters
sgalsaleh Aug 26, 2023
9c0338c
fix templating
sgalsaleh Aug 28, 2023
357967d
more fixes
sgalsaleh Aug 28, 2023
e6e2b88
fix melange target dir env var
sgalsaleh Aug 28, 2023
dd095d6
one more try
sgalsaleh Aug 28, 2023
34f2f3a
no-op, trigger tests again
sgalsaleh Oct 6, 2023
3fbdee1
fix lint isses
sgalsaleh Oct 6, 2023
81d8063
use melange caching
sgalsaleh Nov 21, 2023
48a72e9
generate signing key
sgalsaleh Nov 21, 2023
33df7c1
fix flag name
sgalsaleh Nov 21, 2023
2112fa4
test without cache again
sgalsaleh Nov 21, 2023
9deff02
test caching support
sgalsaleh Nov 21, 2023
d3775c4
fix action
sgalsaleh Nov 21, 2023
33f3b75
support go mod cache
sgalsaleh Nov 21, 2023
434e537
one more test
sgalsaleh Nov 21, 2023
aa8acd2
one more test
sgalsaleh Nov 21, 2023
c855c45
one more test
sgalsaleh Nov 21, 2023
7e0c5d4
one more test
sgalsaleh Nov 21, 2023
e54b50d
test again without cache
sgalsaleh Nov 21, 2023
8c7346c
use melange+apko to build kotsadm image on merge/release
sgalsaleh Nov 21, 2023
c9362c4
refactor
sgalsaleh Nov 21, 2023
657a418
add kubectl-1.28
sgalsaleh Nov 22, 2023
d0b37f3
fix symlinks
sgalsaleh Nov 22, 2023
1a9186a
fix envsubset
sgalsaleh Nov 25, 2023
b24a7f0
test regression tests
sgalsaleh Nov 27, 2023
222dc63
docker login before
sgalsaleh Nov 27, 2023
124a5fd
username and password for apko
sgalsaleh Nov 27, 2023
ec504db
hack to build kotsadm image and trigger tests
sgalsaleh Nov 27, 2023
7f61576
one more try
sgalsaleh Nov 27, 2023
d005ce7
one more try
sgalsaleh Nov 27, 2023
8c3a76b
use creds to push to dockerhub
sgalsaleh Nov 27, 2023
17c2d82
copy from docker
sgalsaleh Nov 27, 2023
134dcc0
include older kubectl versions
sgalsaleh Nov 28, 2023
ef344c4
updates
sgalsaleh Nov 28, 2023
bf55a46
pass secrets as inputs
sgalsaleh Nov 28, 2023
57d6fb7
fix syntax issue
sgalsaleh Nov 28, 2023
f698ef1
shell: bash
sgalsaleh Nov 28, 2023
46014df
gcsfuse under /tmp
sgalsaleh Nov 29, 2023
49753c4
install gcsfuse
sgalsaleh Nov 29, 2023
88797ec
one more try
sgalsaleh Nov 29, 2023
09965ee
fix getting publish key
sgalsaleh Nov 29, 2023
bfb865e
one more try
sgalsaleh Nov 29, 2023
087de23
test without gcsfuse
sgalsaleh Nov 29, 2023
e3b90a4
add enterprise keyring
sgalsaleh Nov 29, 2023
e480d47
add key to melange not apko
sgalsaleh Nov 29, 2023
78ff36a
symlink key
sgalsaleh Nov 29, 2023
b228bfa
one more test
sgalsaleh Nov 29, 2023
ded5276
one more try
sgalsaleh Nov 29, 2023
7e0c93f
add read permission
sgalsaleh Nov 29, 2023
04e4498
can't change readonly filesystem files
sgalsaleh Nov 29, 2023
95c1f3e
chown runner user
sgalsaleh Nov 29, 2023
71077d4
one more try
sgalsaleh Nov 29, 2023
b2e3942
print user id/group
sgalsaleh Nov 29, 2023
c1a4224
one more test
sgalsaleh Nov 29, 2023
e09cf09
one more
sgalsaleh Nov 29, 2023
0e0e29e
don't use gcsfuse
sgalsaleh Nov 29, 2023
1217869
one more
sgalsaleh Nov 29, 2023
8b3922c
update
sgalsaleh Nov 29, 2023
8fe6b46
one more time
sgalsaleh Nov 29, 2023
1ef2fff
add *
sgalsaleh Nov 30, 2023
4d88f3d
add chainguard-enterprise.rsa.pub to melange keyring
sgalsaleh Nov 30, 2023
a1bd1f4
don't run regression tests on the pr
sgalsaleh Nov 30, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 97 additions & 0 deletions .github/actions/build-push-kotsadm-image/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: 'Build and push kotsadm image'
description: 'Composite action for building and pushing kotsadm image'
inputs:
chainguard-gcp-wif-pool:
description: 'GCP workload identity pool for Chainguard'
required: true

chainguard-gcp-sa:
description: 'GCP service account for Chainguard'
required: true

chainguard-gcp-project-id:
description: 'GCP project ID for Chainguard'
required: true

image-name:
description: 'Full destination kotsadm image name'
required: true

git-tag:
description: 'Git tag'
required: true

registry-username:
description: 'Username to login to registry'
default: ''
required: false

registry-password:
description: 'Password to login to registry'
default: ''
required: false

runs:
using: "composite"
steps:
# - uses: google-github-actions/auth@35b0e87d162680511bf346c299f71c9c5c379033 # v1.1.1
# with:
# workload_identity_provider: ${{ inputs.chainguard-gcp-wif-pool }}
# service_account: ${{ inputs.chainguard-gcp-sa }}

# - uses: google-github-actions/setup-gcloud@e30db14379863a8c79331b04a9969f4c1e225e0b # v1.1.1
# with:
# project_id: ${{ inputs.chainguard-gcp-project-id }}

# - name: setup packages gcsfuse
# env:
# BUCKET: replicated-apk-registry
# shell: bash
# run: |
# # Install gcsfuse
# export GCSFUSE_REPO=gcsfuse-`lsb_release -c -s`
# echo "deb [signed-by=/usr/share/keyrings/cloud.google.asc] https://packages.cloud.google.com/apt $GCSFUSE_REPO main" | sudo tee /etc/apt/sources.list.d/gcsfuse.list
# curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo tee /usr/share/keyrings/cloud.google.asc
# sudo apt-get update -y
# sudo apt-get install gcsfuse -y

# # Set up a gcsfuse RO mount to the bucket containing private packages. This is a cheap and
# # cheerful way to get access to objects we need, without having to fetch all of them.
# mkdir -p /tmp/gcsfuse/apk-repo
# gcsfuse -o ro --implicit-dirs --only-dir os ${BUCKET} /tmp/gcsfuse/apk-repo

# # Symlink the gcsfuse mount to ./packages/$arch/*.apk
# mkdir -p ./packages/x86_64
# ln -s /tmp/gcsfuse/apk-repo/x86_64/*.apk ./packages/x86_64/

# # Make a copy of the APKINDEX.* since we'll need to write to it on package builds
# cp /tmp/gcsfuse/apk-repo/x86_64/APKINDEX.* ./packages/x86_64/

# ls -lR ./packages/

- name: template melange and apko configs
shell: bash
run: |
export GIT_TAG=${{ inputs.git-tag }}
envsubst '${GIT_TAG}' < deploy/melange.yaml.tmpl > deploy/melange.yaml
envsubst '${GIT_TAG}' < deploy/apko.yaml.tmpl > deploy/apko.yaml

- id: cache-dir
shell: bash
run: echo "cache_dir=$(go env GOMODCACHE)" >> "$GITHUB_OUTPUT"

- uses: chainguard-dev/actions/melange-build@main
with:
config: deploy/melange.yaml
archs: x86_64
sign-with-temporary-key: true
cache-dir: ${{ steps.cache-dir.outputs.cache_dir }}

- uses: chainguard-images/actions/apko-publish@main
with:
config: deploy/apko.yaml
archs: x86_64
tag: ${{ inputs.image-name }}
vcs-url: true
generic-user: ${{ inputs.registry-username }}
generic-pass: ${{ inputs.registry-password }}
Loading
Loading