-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsnapcraft.yaml
85 lines (80 loc) · 2.94 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: juju
version: 2.8.6
summary: juju client
description: Through the use of charms, juju provides you with shareable, re-usable, and repeatable expressions of devops best practices.
confinement: classic
grade: devel
base: core18
apps:
juju:
environment:
# Make sure we access snap binaries first (i.e. juju-metadata lp:1759013)
PATH: "$SNAP/bin:$SNAP/usr/bin:/snap/bin:$PATH"
command: bin/juju
fetch-oci:
daemon: oneshot
command: wrappers/fetch-oci
parts:
wrappers:
plugin: dump
source: snap/local
juju:
# TODO(hpidcock): move to upstream go plugin when it has the features we need.
plugin: juju-go
go-channel: 1.14/stable
# The source can be your local tree or github
# source: https://github.com/juju/juju.git
# If you pull a remote, set source-depth to 1 to make the fetch shorter
# source-depth: 1
# source: file:///full/file/path
# By default, reuse existing tree
source: .
# TODO(wallyworld) - uncomment source-type once LP:1860526 is fixed.
#source-type: git
# You can grab a specific tag, commit, or branch
# source-tag: juju-2.0.2
# source-commit: a83896d913d7e43c960e441c1e41612116d92d46
# source-branch: develop
# apply patches before building
go-packages:
- github.com/juju/juju/cmd/juju
# If you are releasing a build with public streams, you don't need to build the agent
# Instead, you should use the released agent
- github.com/juju/juju/cmd/jujuc
- github.com/juju/juju/cmd/jujud
- github.com/juju/juju/cmd/plugins/juju-metadata
# go-external-strings is not supported by the standard go plugin.
# these strings are filled in by CI.
go-external-strings:
github.com/juju/juju/version.GitCommit: ""
github.com/juju/juju/version.GitTreeState: ""
github.com/juju/juju/version.build: ""
# go-static is not supported by the standard go plugin.
go-static: true
# go-strip is not supported by the standard go plugin.
go-strip: true
override-build: |
snapcraftctl build
mkdir -p $SNAPCRAFT_PART_INSTALL/bash_completions
cp -a etc/bash_completion.d/juju* $SNAPCRAFT_PART_INSTALL/bash_completions/.
# If you are releasing a build with public streams, copy in the agent directly
# If needed, grab the agent from streams
# curl http://streams.canonical.com/juju/tools/agent/$SNAPCRAFT_PROJECT_VERSION/juju-$SNAPCRAFT_PROJECT_VERSION-ubuntu-amd64.tgz | tar xz -C $SNAPCRAFT_PART_INSTALL/bin/
jujud=$SNAPCRAFT_PART_INSTALL/bin/jujud
version=$(jujud version)
hash=$(sha256sum $jujud | cut -d " " -f 1)
cat > jujud-versions.yaml <<EOF
versions:
- version: $version
sha256: $hash
EOF
cp -a jujud-versions.yaml $SNAPCRAFT_PART_INSTALL/bin
hooks:
connect-plug-peers: {}
disconnect-plug-peers: {}
post-refresh: {}
plugs:
peers:
interface: content
content: microk8s
target: $SNAP_COMMON/.peers