-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build kotsadm-migrations and use rqlite 7.21.4
- Loading branch information
Showing
15 changed files
with
159 additions
and
60 deletions.
There are no files selected for viewing
62 changes: 62 additions & 0 deletions
62
.github/actions/build-push-kotsadm-migrations-image/action.yml
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,62 @@ | ||
name: 'Build and push kotsadm-migrations image' | ||
description: 'Composite action for building and pushing kotsadm-migrations image' | ||
inputs: | ||
image-name: | ||
description: 'Full destination kotsadm-migrations 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: | ||
- name: load environment variables from .image.env | ||
uses: falti/dotenv-action@v1 | ||
id: dotenv | ||
with: | ||
path: .image.env | ||
|
||
- uses: shrink/actions-docker-extract@v3 | ||
with: | ||
image: schemahero/schemahero:${{ steps.dotenv.outputs.SCHEMAHERO_TAG }} | ||
path: /schemahero | ||
destination: migrations | ||
|
||
- name: template melange and apko configs | ||
shell: bash | ||
run: | | ||
export GIT_TAG=${{ inputs.git-tag }} | ||
envsubst '${GIT_TAG}' < migrations/deploy/melange.yaml.tmpl > migrations/deploy/melange.yaml | ||
envsubst '${GIT_TAG}' < migrations/deploy/apko.yaml.tmpl > migrations/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: migrations/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: migrations/deploy/apko.yaml | ||
archs: x86_64 | ||
tag: ${{ inputs.image-name }} | ||
vcs-url: true | ||
generic-user: ${{ inputs.registry-username }} | ||
generic-pass: ${{ inputs.registry-password }} |
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
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
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
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
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
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
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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Generated file, do not modify. This file is generated from a text file containing a list of images. The | ||
# most recent tag is interpolated from the source repository and used to generate a fully qualified image | ||
# name. | ||
RQLITE_TAG='8.0.1' | ||
RQLITE_TAG='7.21.4' |
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 |
---|---|---|
|
@@ -5,5 +5,5 @@ package image | |
// image name. | ||
|
||
const ( | ||
Rqlite = "kotsadm/rqlite:8.0.1" | ||
Rqlite = "kotsadm/rqlite:7.21.4" | ||
) |
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
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 |
---|---|---|
@@ -1,15 +1,6 @@ | ||
SHELL:=/bin/bash | ||
PROJECT_NAME ?= kotsadm-migrations | ||
SCHEMAHERO_TAG ?= 0.17.0 | ||
|
||
.PHONY: schema-alpha | ||
schema-alpha: IMAGE = kotsadm/${PROJECT_NAME}:alpha | ||
schema-alpha: build_schema | ||
|
||
.PHONY: schema-release | ||
schema-release: IMAGE = kotsadm/${PROJECT_NAME}:${GIT_TAG} | ||
schema-release: build_schema | ||
|
||
build_schema: | ||
docker build --pull --build-arg SCHEMAHERO_TAG=${SCHEMAHERO_TAG} -f deploy/Dockerfile -t ${IMAGE} . | ||
docker push ${IMAGE} |
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,36 @@ | ||
contents: | ||
repositories: | ||
- https://packages.wolfi.dev/os | ||
- ./packages/ | ||
keyring: | ||
- https://packages.wolfi.dev/os/wolfi-signing.rsa.pub | ||
- ./melange.rsa.pub | ||
packages: | ||
- kotsadm-migrations-head # This is expected to be built locally by `melange`. | ||
- bash | ||
- busybox | ||
- curl | ||
- git | ||
- wolfi-baselayout | ||
|
||
accounts: | ||
groups: | ||
- groupname: schemahero | ||
gid: 1001 | ||
users: | ||
- username: schemahero | ||
uid: 1001 | ||
gid: 1001 | ||
run-as: schemahero | ||
|
||
environment: | ||
VERSION: ${GIT_TAG} | ||
|
||
entrypoint: | ||
command: /schemahero | ||
|
||
cmd: apply | ||
|
||
archs: | ||
- x86_64 | ||
- aarch64 |
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,32 @@ | ||
package: | ||
name: kotsadm-migrations-head | ||
version: ${GIT_TAG} | ||
epoch: 0 | ||
description: kotsadm-migrations package | ||
copyright: | ||
- license: Apache-2.0 | ||
|
||
environment: | ||
contents: | ||
repositories: | ||
- https://packages.wolfi.dev/os | ||
keyring: | ||
- https://packages.wolfi.dev/os/wolfi-signing.rsa.pub | ||
packages: | ||
- ca-certificates-bundle | ||
- busybox | ||
- git | ||
- go | ||
environment: | ||
GOMODCACHE: '/var/cache/melange' | ||
|
||
pipeline: | ||
- runs: | | ||
set -x | ||
export DESTDIR="${{targets.destdir}}" | ||
mkdir -p "${DESTDIR}" | ||
|
||
mv migrations/tables "${DESTDIR}/tables" | ||
|
||
# expected to have already been extracted from the schemahero image | ||
mv migrations/schemahero "${DESTDIR}/schemahero" |
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