-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Use reusable workflows * arm64 * Remove override-stage Current `override-stage` has no effect on final rock I inspected the rock we're currently building (i.e. ghcr.io/canonical/charmed-mysql:8.0.37-22.04_edge), and it looks like it doesn't contain `/var/lib/mysql` ``` root@foo-0:/# find / -name mysql /home/mysql /usr/lib/x86_64-linux-gnu/perl5/5.34/DBD/mysql /usr/lib/x86_64-linux-gnu/perl5/5.34/auto/DBD/mysql /usr/lib/mysql /usr/share/mysql /usr/bin/mysql /var/log/mysql /etc/init.d/mysql /etc/mysql root@foo-0:/# mysqld --initialize-insecure -u mysql root@foo-0:/# find / -name mysql /home/mysql /usr/lib/x86_64-linux-gnu/perl5/5.34/DBD/mysql /usr/lib/x86_64-linux-gnu/perl5/5.34/auto/DBD/mysql /usr/lib/mysql /usr/share/mysql /usr/bin/mysql /var/log/mysql /var/lib/mysql /var/lib/mysql/mysql /etc/init.d/mysql /etc/mysql ``` so I think the entire `override-stage` in our rock is doing nothing
- Loading branch information
1 parent
e9de063
commit dca632c
Showing
11 changed files
with
99 additions
and
301 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 @@ | ||
# Copyright 2024 Canonical Ltd. | ||
# See LICENSE file for licensing details. | ||
name: Release to GHCR | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
on: | ||
push: | ||
branches: | ||
- 8.0-22.04 | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
name: Build rock | ||
uses: canonical/data-platform-workflows/.github/workflows/build_rock.yaml@v16 | ||
|
||
release: | ||
name: Release rock | ||
needs: | ||
- build | ||
uses: canonical/data-platform-workflows/.github/workflows/release_rock.yaml@v16 | ||
with: | ||
artifact-prefix: ${{ needs.build.outputs.artifact-prefix }} | ||
permissions: | ||
packages: write # Needed to publish to GitHub Container Registry | ||
|
||
sbom: | ||
name: Generate Software Bill of Materials | ||
needs: | ||
- build | ||
# Run after release so that rock cannot be (maliciously) modified between build & release | ||
- release | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- name: Install Syft | ||
run: curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin | ||
- name: Download rock package(s) | ||
uses: actions/download-artifact@v4 | ||
with: | ||
pattern: ${{ needs.build.outputs.artifact-prefix }}-* | ||
merge-multiple: true | ||
- name: Generate SBOM(s) | ||
shell: python | ||
run: | | ||
import pathlib | ||
import subprocess | ||
for rock_file in pathlib.Path(".").glob("*.rock"): | ||
subprocess.run( | ||
["syft", rock_file.name, "--output", f"spdx-json={rock_file.name}.spdx.json"], | ||
check=True, | ||
) | ||
- name: Upload SBOM(s) | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: sbom-${{ needs.build.outputs.artifact-prefix }} | ||
path: '*.spdx.json' | ||
if-no-files-found: error |
This file was deleted.
Oops, something went wrong.
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,15 +1,16 @@ | ||
name: charmed-mysql # the name of your ROCK | ||
base: [email protected] # the base environment for this ROCK | ||
version: '8.0.37' # just for humans. Semantic versioning is recommended | ||
summary: Charmed MySQL ROCK OCI # 79 char long summary | ||
name: charmed-mysql | ||
base: [email protected] | ||
version: '8.0.37' | ||
summary: Charmed MySQL ROCK OCI | ||
description: | | ||
MySQL built from the official MySQL package | ||
from the MySQL repository and installs | ||
mysql-shell. For more information on ROCKs, visit | ||
the https://github.com/canonical/rockcraft. | ||
license: Apache-2.0 # your application's SPDX license | ||
platforms: # The platforms this ROCK should be built on and run on | ||
license: Apache-2.0 | ||
platforms: | ||
amd64: | ||
arm64: | ||
|
||
parts: | ||
charmed-mysql: | ||
|
@@ -32,30 +33,6 @@ parts: | |
- python3-yaml | ||
stage-snaps: | ||
- charmed-mysql/8.0/edge | ||
override-stage: | | ||
LIB_DIR=$CRAFT_STAGE/usr/lib/x86_64-linux-gnu | ||
craftctl default | ||
mkdir -p $CRAFT_STAGE/var/lib/mysql | ||
ln -sf $LIB_DIR/libnuma.so.1 \ | ||
/usr/lib/x86_64-linux-gnu/libnuma.so.1 | ||
ln -sf $LIB_DIR/libaio.so.1 \ | ||
/usr/lib/x86_64-linux-gnu/libaio.so.1 | ||
ln -sf $LIB_DIR/libicuuc.so.70 \ | ||
/usr/lib/x86_64-linux-gnu/libicuuc.so.70 | ||
ln -sf $LIB_DIR/libicui18n.so.70 \ | ||
/usr/lib/x86_64-linux-gnu/libicui18n.so.70 | ||
ln -sf $LIB_DIR/libevent_core-2.1.so.7 \ | ||
/usr/lib/x86_64-linux-gnu/libevent_core-2.1.so.7 | ||
ln -sf $LIB_DIR/libevent_pthreads-2.1.so.7 \ | ||
/usr/lib/x86_64-linux-gnu/libevent_pthreads-2.1.so.7 | ||
ln -sf $LIB_DIR/libprotobuf-lite.so.23 \ | ||
/usr/lib/x86_64-linux-gnu/libprotobuf-lite.so.23 | ||
ln -sf $LIB_DIR/libicudata.so.70 \ | ||
/usr/lib/x86_64-linux-gnu/libicudata.so.70 | ||
rm -rf /var/lib/mysql/ | ||
mysqld --initialize | ||
cp -r /var/lib/mysql $CRAFT_STAGE/var/lib | ||
chown 584788:584788 $CRAFT_STAGE/var/lib/mysql | ||
override-prime: | | ||
craftctl default | ||
mv -f $CRAFT_PRIME/etc/mysql/mysql.cnf $CRAFT_PRIME/etc/mysql/my.cnf | ||
|
Oops, something went wrong.