Skip to content

Commit

Permalink
Classic snap. With help from @simskij (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
dstathis authored Aug 6, 2024
1 parent 8d645ba commit 8eed050
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/release-snap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,14 @@ jobs:
# 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: Build Snap (remote)
run: snapcraft remote-build --launchpad-accept-public-upload

Expand All @@ -46,3 +51,15 @@ jobs:

- name: Upload and Publish arm64 Snap
run: snapcraft upload --release edge grafana-agent_*_arm64.snap

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

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

- name: Upload and Publish Classic amd64 Snap
run: snapcraft upload --release 0.40-classic/edge grafana-agent_*_amd64.snap

- name: Upload and Publish Classic arm64 Snap
run: snapcraft upload --release 0.40-classic/edge grafana-agent_*_arm64.snap
8 changes: 8 additions & 0 deletions make-classic.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh

sed -i 's/base: core22/base: core20/g' snap/snapcraft.yaml
sed -i 's/confinement: strict/confinement: classic/g' snap/snapcraft.yaml
sed -i 's/CRAFT_PART_INSTALL/SNAPCRAFT_PART_INSTALL/g' snap/snapcraft.yaml
sed -i '/libbpfcc/d' snap/snapcraft.yaml
sed -i '/bpfcc-tools/d' snap/snapcraft.yaml
yq -i 'del(.apps.grafana-agent.plugs) | del(.plugs)' snap/snapcraft.yaml

0 comments on commit 8eed050

Please sign in to comment.