-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathsnapcraft.yaml
70 lines (58 loc) · 1.84 KB
/
snapcraft.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: jhack
# our upper bound is juju's base, which at the time of writing is core24
base: core24
adopt-info: jhack
summary: Cli tool packed with juju hacks.
description: |
An opinionated collection of scripts and utilities to make
charming charming again. Many of the scripts in jhack interact with the juju snap and
communicate with its client by issuing `juju` cli calls.
This snap requires write access to ~/.local/share/juju via an interface named
dot-local-share-juju, so that the juju client configuration can be used to talk to the
user's clouds, controllers and models. Also, on machine models, you will need to connect the
`ssh-keys` plug so that jhack can run `juju ssh` on your behalf.
grade: stable
confinement: strict
parts:
jhack:
plugin: python
source: .
override-build: |
snapcraftctl build
VERSION="$(grep -Po 'version = "\K[^"]*' ./pyproject.toml)"
snapcraftctl set-version $VERSION
stage-snaps:
- juju/3.3/beta
apps:
jhack:
command: bin/jhack
plugs:
- network
- network-bind
# do we need to add the custom plugs here as well?
- dot-local-share-juju
- dot-config-jhack
- shared-memory
- home-read
- ssh-read
plugs:
# read-write access to .local/share/juju (JUJU_DATA)
dot-local-share-juju:
interface: personal-files
write:
- $HOME/.local/share/juju
# read-write access to jhack configuration file
dot-config-jhack:
interface: personal-files
write:
- $HOME/.config/jhack
# required to use multiprocessing semaphores
shared-memory:
private: true
# read access to $HOME. Required for sync and other commands that manipulate
# your local code projects.
home-read:
interface: home
# access ssh keys to make them available to the embedded juju snap
ssh-read:
interface: ssh-keys