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

Build & release arm64 #24

Merged
merged 2 commits into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
26 changes: 0 additions & 26 deletions .github/workflows/build.yaml

This file was deleted.

27 changes: 27 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright 2024 Canonical Ltd.
# See LICENSE file for licensing details.
name: Tests

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
pull_request:

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install tox
run: pipx install tox
- name: Run linters
run: tox run -e lint

build:
name: Build rock
uses: canonical/data-platform-workflows/.github/workflows/[email protected]
22 changes: 0 additions & 22 deletions .github/workflows/lint.yaml

This file was deleted.

49 changes: 0 additions & 49 deletions .github/workflows/publish.yaml

This file was deleted.

61 changes: 61 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Copyright 2024 Canonical Ltd.
# See LICENSE file for licensing details.
name: Release to GitHub Container Registry

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
push:
branches:
- 14-22.04

jobs:
build:
name: Build rock
uses: canonical/data-platform-workflows/.github/workflows/[email protected]

release:
name: Release rock
needs:
- build
uses: canonical/data-platform-workflows/.github/workflows/[email protected]
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
32 changes: 0 additions & 32 deletions .github/workflows/sbom.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/sync_issue_to_jira.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
sync:
name: Sync GitHub issue to Jira
uses: canonical/data-platform-workflows/.github/workflows/sync_issue_to_jira.yaml@v2
uses: canonical/data-platform-workflows/.github/workflows/sync_issue_to_jira.yaml@v12
with:
jira-base-url: https://warthogs.atlassian.net
jira-project-key: DPE
Expand Down
1 change: 1 addition & 0 deletions rockcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ description: |
license: Apache-2.0
platforms:
amd64:
arm64:

parts:
postgresql-snap:
Expand Down