Skip to content

Commit

Permalink
Split strict, classic CI
Browse files Browse the repository at this point in the history
  • Loading branch information
sed-i committed Nov 19, 2024
1 parent 01ef627 commit 4965e85
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 5 deletions.
35 changes: 31 additions & 4 deletions .github/workflows/release-snap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ env:
LAUNCHPAD_TOKEN: ${{ secrets.LAUNCHPAD_TOKEN }}

jobs:
build:
build-strict:
name: Build snap (strict)
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand All @@ -40,9 +41,6 @@ jobs:
git config --global user.email "[email protected]"
git config --global user.name "Github Actions"
- name: yq - portable yaml processor
uses: mikefarah/yq@v4

- name: Build Snap (remote)
run: snapcraft remote-build --launchpad-accept-public-upload

Expand All @@ -52,6 +50,35 @@ jobs:
- name: Upload and Publish arm64 Snap
run: snapcraft upload --release edge grafana-agent_*_arm64.snap

build-classic:
name: Build snap (classic)
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
# snapcraft remote-build requires a full clone
fetch-depth: 0

- name: Setup LXD
uses: canonical/[email protected]
with:
channel: latest/stable

- name: Install dependencies
run: |
sudo snap install --classic --channel edge snapcraft
# Setup Launchpad credentials
mkdir -p ~/.local/share/snapcraft
echo -e "$LAUNCHPAD_TOKEN" >> ~/.local/share/snapcraft/launchpad-credentials
mkdir -p ~/.local/share/snapcraft/provider/launchpad
echo -e "$LAUNCHPAD_TOKEN" >> ~/.local/share/snapcraft/provider/launchpad/credentials
git config --global user.email "[email protected]"
git config --global user.name "Github Actions"
- name: yq - portable yaml processor
uses: mikefarah/yq@v4

- name: Convert to Classic Snap
run: ./make-classic.sh

Expand Down
2 changes: 1 addition & 1 deletion snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ license: Apache-2.0
contact: [email protected]
issues: https://github.com/canonical/grafana-agent-snap/issues
source-code: https://github.com/canonical/grafana-agent-snap
website: https://grafana.com
website: https://grafana.com/oss/agent/
description: "Grafana Agent is a telemetry collector for sending metrics, \nlogs, and trace data to the opinionated Grafana observability stack.\n"
base: core22
grade: stable
Expand Down

0 comments on commit 4965e85

Please sign in to comment.