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

feat: enable chisel #4441

Merged
merged 2 commits into from
Nov 8, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -187,3 +187,12 @@ parts:
# The new implementation still requires this.
ln -sf ../usr/bin/python3.10 $SNAPCRAFT_PART_INSTALL/bin/python3
after: [snapcraft-libs, libgit2]

chisel:
plugin: go
source: https://github.com/canonical/chisel.git
source-commit: bd27f8700cd7d2a6b4e0df6b10c3761c83a70485
build-snaps:
- go/1.18/stable
organize:
bin/chisel: libexec/snapcraft/chisel
19 changes: 19 additions & 0 deletions tests/spread/core22/chisel-base/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: core2x
type: base
build-base: core22
summary: base using chisel from core22 assets
description: |
Test creating a base using a stable release of chisel
version: 0+git
confinement: strict

parts:
base:
plugin: nil
stage-packages:
- base-files_etc
- base-files_bin
- base-files_lib
- base-files_tmp
- base-files_var
- base-files_home
17 changes: 17 additions & 0 deletions tests/spread/core22/chisel-base/task.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
summary: Build a simple snap

environment:
SNAPCRAFT_BUILD_ENVIRONMENT: ""

restore: |
snapcraft clean
rm -f ./*.snap

execute: |
snapcraft pack
snap install core2x_*.snap --dangerous

# verify that the chisel packages made it to the base
[ -d /snap/core2x/current/bin ] || exit 1
[ -d /snap/core2x/current/lib ] || exit 1
[ -d /snap/core2x/current/var ] || exit 1