$ cat snapcraft.yaml
name: prometheus
version: 1.6.1
grade: stable
summary: The Prometheus monitoring system and time series database
description: |
Prometheus is a systems and service monitoring system. It collects metrics from configured targets at given intervals, evaluates rule expressions, displays the results, and can trigger alerts if some condition is observed to be true.
confinement: strict
apps:
prometheus:
command: 'bin/prometheus.wrapper'
plugs: [network-bind, network, content]
daemon: simple
promtool:
command: 'bin/promtool'
storagetool:
command: 'bin/storagetool'
plugs:
content:
content: promreg
target: $SNAP_DATA/promreg
parts:
prometheus:
plugin: go
source: https://github.com/prometheus/prometheus.git
source-tag: v1.6.1
go-importpath: github.com/prometheus/prometheus
example-config:
plugin: dump
source: https://github.com/prometheus/prometheus.git
source-tag: v1.6.1
source-type: git
organize:
documentation/examples/prometheus.yml: etc/prometheus/prometheus.yml.example
stage:
- etc/prometheus/prometheus.yml.example
prime:
- etc/prometheus/prometheus.yml.example
snap-wrappers:
plugin: dump
source: .
organize:
snap_config_wrapper: bin/prometheus.wrapper
daemon_arguments: etc/prometheus/daemon_arguments.example
stage:
- bin/prometheus.wrapper
- etc/prometheus/daemon_arguments.example
prime:
- bin/prometheus.wrapper
- etc/prometheus/daemon_arguments.example
$ snapcraft
Preparing to pull prometheus
Pulling prometheus
Cloning into '/home/jacek/build/prometheus-snap/parts/prometheus/src'...
remote: Counting objects: 26217, done.
remote: Compressing objects: 100% (75/75), done.
remote: Total 26217 (delta 14), reused 0 (delta 0), pack-reused 26137
Receiving objects: 100% (26217/26217), 20.84 MiB | 2.36 MiB/s, done.
Resolving deltas: 100% (14274/14274), done.
Checking connectivity... done.
Note: checking out '4666df502c0e239ed4aa1d80abbbfb54f61b23c3'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
go get -t -d ./github.com/prometheus/prometheus/...
package context: unrecognized import path "context" (import path does not begin with hostname)
Command '['/bin/sh', '/tmp/tmpx7s1mf6j', 'go', 'get', '-t', '-d', './github.com/prometheus/prometheus/...']' returned non-zero exit status 1