-
Notifications
You must be signed in to change notification settings - Fork 93
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
chainguard Integration #4018
Changes from 55 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 c2ccd2a
add language about non-production-readiness
imjasonh c3c93bc
include all currently supported kubectl versions
imjasonh e26ba4e
initial try
sgalsaleh 6d35b86
second try
sgalsaleh a8e05bb
3rd try
sgalsaleh 9a56cb8
fix syntax error
sgalsaleh 446fe15
updates
sgalsaleh de9c359
/usr/local/bin
sgalsaleh f8f6f3c
fix symlinks
sgalsaleh 4508852
propagate git tag to melange and apko + always cleanup c11y clusters
sgalsaleh 9c0338c
fix templating
sgalsaleh 357967d
more fixes
sgalsaleh e6e2b88
fix melange target dir env var
sgalsaleh dd095d6
one more try
sgalsaleh 34f2f3a
no-op, trigger tests again
sgalsaleh 3fbdee1
fix lint isses
sgalsaleh 81d8063
use melange caching
sgalsaleh 48a72e9
generate signing key
sgalsaleh 33df7c1
fix flag name
sgalsaleh 2112fa4
test without cache again
sgalsaleh 9deff02
test caching support
sgalsaleh d3775c4
fix action
sgalsaleh 33f3b75
support go mod cache
sgalsaleh 434e537
one more test
sgalsaleh aa8acd2
one more test
sgalsaleh c855c45
one more test
sgalsaleh 7e0c5d4
one more test
sgalsaleh e54b50d
test again without cache
sgalsaleh 8c7346c
use melange+apko to build kotsadm image on merge/release
sgalsaleh c9362c4
refactor
sgalsaleh 657a418
add kubectl-1.28
sgalsaleh d0b37f3
fix symlinks
sgalsaleh 1a9186a
fix envsubset
sgalsaleh b24a7f0
test regression tests
sgalsaleh 222dc63
docker login before
sgalsaleh 124a5fd
username and password for apko
sgalsaleh ec504db
hack to build kotsadm image and trigger tests
sgalsaleh 7f61576
one more try
sgalsaleh d005ce7
one more try
sgalsaleh 8c3a76b
use creds to push to dockerhub
sgalsaleh 17c2d82
copy from docker
sgalsaleh 134dcc0
include older kubectl versions
sgalsaleh ef344c4
updates
sgalsaleh bf55a46
pass secrets as inputs
sgalsaleh 57d6fb7
fix syntax issue
sgalsaleh f698ef1
shell: bash
sgalsaleh 46014df
gcsfuse under /tmp
sgalsaleh 49753c4
install gcsfuse
sgalsaleh 88797ec
one more try
sgalsaleh 09965ee
fix getting publish key
sgalsaleh bfb865e
one more try
sgalsaleh 087de23
test without gcsfuse
sgalsaleh e3b90a4
add enterprise keyring
sgalsaleh e480d47
add key to melange not apko
sgalsaleh 78ff36a
symlink key
sgalsaleh b228bfa
one more test
sgalsaleh ded5276
one more try
sgalsaleh 7e0c93f
add read permission
sgalsaleh 04e4498
can't change readonly filesystem files
sgalsaleh 95c1f3e
chown runner user
sgalsaleh 71077d4
one more try
sgalsaleh b2e3942
print user id/group
sgalsaleh c1a4224
one more test
sgalsaleh e09cf09
one more
sgalsaleh 0e0e29e
don't use gcsfuse
sgalsaleh 1217869
one more
sgalsaleh 8b3922c
update
sgalsaleh 8fe6b46
one more time
sgalsaleh 1ef2fff
add *
sgalsaleh 4d88f3d
add chainguard-enterprise.rsa.pub to melange keyring
sgalsaleh a1bd1f4
don't run regression tests on the pr
sgalsaleh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also need to symlink the key into
./packages/
. We should be able to see this in thels -lR
below if this is successful.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Getting this error now (i only added the key to the melange config, not apko):