Skip to content

Instantly share code, notes, and snippets.

@afiune
Last active July 10, 2017 14:14
Show Gist options
  • Save afiune/b8776476eba15a83a23a902bfb38dfdf to your computer and use it in GitHub Desktop.
Save afiune/b8776476eba15a83a23a902bfb38dfdf to your computer and use it in GitHub Desktop.
habitat-go-scaffolding-test
➜ mkdir -p go-relay/habitat
➜ cd go-relay
➜ vi habitat/plan.sh
pkg_name=go-relay
pkg_origin=afiune
pkg_version="0.1.0"
pkg_scaffolding=afiune/scaffolding-go
pkg_source="http://github.com/operable/go-relay"
scaffolding_go_build_deps=(
github.com/kardianos/govendor
)
➜ hab studio enter
hab-studio: Creating Studio at /hab/studios/src (default)
hab-studio: Importing afiune secret origin key
» Importing origin key from standard input
★ Imported secret origin key afiune-20170705232551.
hab-studio: Entering Studio at /hab/studios/src (default)
hab-studio: Exported: HAB_ORIGIN=afiune
hab-studio: Exported: no_proxy=*.local, 169.254/16
--> Launching the Habitat Supervisor in the background...
Running: hab sup run
* Use 'hab svc start' & 'hab svc stop' to start and stop services
* Use 'sup-log' to tail the Supervisor's output (Ctrl+c to stop)
* Use 'sup-term' to terminate the Supervisor
* To pass custom arguments to run the Supervisor, export
'HAB_STUDIO_SUP' with the arguments before running
'hab studio enter'.
--> To prevent a Supervisor from running automatically in your
Studio, export 'HAB_STUDIO_SUP=false' before running
'hab studio enter'.
[1][default:/src:0]# build
: Loading /src/plan.sh
go-relay: Plan loaded
go-relay: Validating plan metadata
go-relay: hab-plan-build setup
go-relay: Using HAB_BIN=/hab/pkgs/core/hab/0.24.1/20170522083228/bin/hab for installs, signing, and hashing
go-relay: Resolving scaffolding dependencies
» Installing afiune/scaffolding-go
↓ Downloading afiune/scaffolding-go/0.1.0/20170707192800
3.53 KB / 3.53 KB / [====================================================================================================================================================================================================================================================================] 100.00 % 7.51 MB/s
↓ Downloading afiune-20170705232551 public origin key
77 B / 77 B | [==========================================================================================================================================================================================================================================================================] 100.00 % 1.76 MB/s
☑ Cached afiune-20170705232551 public origin key
→ Using core/acl/2.2.52/20170513213108
→ Using core/attr/2.4.47/20170513213059
→ Using core/binutils/2.25.1/20170513201927
→ Using core/bzip2/1.0.6/20170513212938
→ Using core/cacerts/2017.01.18/20170513215104
→ Using core/coreutils/8.25/20170513213226
↓ Downloading core/curl/7.51.0/20170513235716
483.58 KB / 483.58 KB | [==============================================================================================================================================================================================================================================================] 100.00 % 909.83 KB/s
↓ Downloading core/db/5.3.28/20170513213734
18.39 MB / 18.39 MB | [==================================================================================================================================================================================================================================================================] 100.00 % 6.84 MB/s
↓ Downloading core/expat/2.1.0/20170513213726
86.70 KB / 86.70 KB - [=================================================================================================================================================================================================================================================================] 100.00 % 14.40 MB/s
→ Using core/gcc-libs/5.2.0/20170513212920
↓ Downloading core/gcc/5.2.0/20170513202244
38.07 MB / 38.07 MB / [=================================================================================================================================================================================================================================================================] 100.00 % 13.22 MB/s
↓ Downloading core/gdbm/1.11/20170513213716
126.78 KB / 126.78 KB \ [===============================================================================================================================================================================================================================================================] 100.00 % 17.13 MB/s
↓ Downloading core/gettext/0.19.6/20170513214354
2.38 MB / 2.38 MB / [====================================================================================================================================================================================================================================================================] 100.00 % 2.80 MB/s
↓ Downloading core/git/2.10.0/20170514000532
3.38 MB / 3.38 MB - [====================================================================================================================================================================================================================================================================] 100.00 % 6.30 MB/s
→ Using core/glibc/2.22/20170513201042
→ Using core/gmp/6.1.0/20170513202112
↓ Downloading core/go/1.8/20170514001124
32.63 MB / 32.63 MB \ [=================================================================================================================================================================================================================================================================] 100.00 % 13.80 MB/s
↓ Downloading core/iana-etc/2.30/20170513213934
175.59 KB / 175.59 KB - [===============================================================================================================================================================================================================================================================] 100.00 % 17.33 MB/s
→ Using core/less/481/20170513213936
→ Using core/libcap/2.24/20170513213120
↓ Downloading core/libmpc/1.0.3/20170513202228
69.42 KB / 69.42 KB | [=================================================================================================================================================================================================================================================================] 100.00 % 16.92 MB/s
→ Using core/linux-headers/4.3/20170513200956
→ Using core/make/4.2.1/20170513214620
→ Using core/mpfr/3.1.4/20170513202156
→ Using core/ncurses/6.0/20170513213009
↓ Downloading core/openssh/7.2p2/20170514000451
615.98 KB / 615.98 KB - [===============================================================================================================================================================================================================================================================] 100.00 % 14.69 MB/s
→ Using core/openssl/1.0.2j/20170513215106
→ Using core/pcre/8.38/20170513213423
↓ Downloading core/perl/5.22.1/20170513213942
10.36 MB / 10.36 MB - [=================================================================================================================================================================================================================================================================] 100.00 % 14.66 MB/s
→ Using core/xz/5.2.2/20170513214327
→ Using core/zlib/1.2.8/20170513201911
✓ Installed core/curl/7.51.0/20170513235716
✓ Installed core/db/5.3.28/20170513213734
✓ Installed core/expat/2.1.0/20170513213726
✓ Installed core/gcc/5.2.0/20170513202244
✓ Installed core/gdbm/1.11/20170513213716
✓ Installed core/gettext/0.19.6/20170513214354
✓ Installed core/git/2.10.0/20170514000532
✓ Installed core/go/1.8/20170514001124
✓ Installed core/iana-etc/2.30/20170513213934
✓ Installed core/libmpc/1.0.3/20170513202228
✓ Installed core/openssh/7.2p2/20170514000451
✓ Installed core/perl/5.22.1/20170513213942
✓ Installed afiune/scaffolding-go/0.1.0/20170707192800
★ Install of afiune/scaffolding-go/0.1.0/20170707192800 complete with 13 new packages installed.
go-relay: Resolved scaffolding dependency 'afiune/scaffolding-go' to /hab/pkgs/afiune/scaffolding-go/0.1.0/20170707192800
go-relay: Loading Scaffolding /hab/pkgs/afiune/scaffolding-go/0.1.0/20170707192800/lib/scaffolding.sh
go-relay: Resolving build dependencies
» Installing afiune/scaffolding-go
→ Using afiune/scaffolding-go/0.1.0/20170707192800
★ Install of afiune/scaffolding-go/0.1.0/20170707192800 complete with 0 new packages installed.
go-relay: Resolved build dependency 'afiune/scaffolding-go' to /hab/pkgs/afiune/scaffolding-go/0.1.0/20170707192800
» Installing core/go/1.8/20170514001124
→ Using core/go/1.8/20170514001124
★ Install of core/go/1.8/20170514001124 complete with 0 new packages installed.
go-relay: Resolved build dependency 'core/go/1.8/20170514001124' to /hab/pkgs/core/go/1.8/20170514001124
» Installing core/git/2.10.0/20170514000532
→ Using core/git/2.10.0/20170514000532
★ Install of core/git/2.10.0/20170514000532 complete with 0 new packages installed.
go-relay: Resolved build dependency 'core/git/2.10.0/20170514000532' to /hab/pkgs/core/git/2.10.0/20170514000532
» Installing core/gcc/5.2.0/20170513202244
→ Using core/gcc/5.2.0/20170513202244
★ Install of core/gcc/5.2.0/20170513202244 complete with 0 new packages installed.
go-relay: Resolved build dependency 'core/gcc/5.2.0/20170513202244' to /hab/pkgs/core/gcc/5.2.0/20170513202244
» Installing core/make/4.2.1/20170513214620
→ Using core/make/4.2.1/20170513214620
★ Install of core/make/4.2.1/20170513214620 complete with 0 new packages installed.
go-relay: Resolved build dependency 'core/make/4.2.1/20170513214620' to /hab/pkgs/core/make/4.2.1/20170513214620
go-relay: Resolving run dependencies
go-relay: Setting PATH=/hab/pkgs/core/go/1.8/20170514001124/bin:/hab/pkgs/core/git/2.10.0/20170514000532/bin:/hab/pkgs/core/gcc/5.2.0/20170513202244/bin:/hab/pkgs/core/make/4.2.1/20170513214620/bin:/hab/pkgs/core/acl/2.2.52/20170513213108/bin:/hab/pkgs/core/attr/2.4.47/20170513213059/bin:/hab/pkgs/core/binutils/2.25.1/20170513201927/bin:/hab/pkgs/core/bzip2/1.0.6/20170513212938/bin:/hab/pkgs/core/coreutils/8.25/20170513213226/bin:/hab/pkgs/core/curl/7.51.0/20170513235716/bin:/hab/pkgs/core/db/5.3.28/20170513213734/bin:/hab/pkgs/core/expat/2.1.0/20170513213726/bin:/hab/pkgs/core/gdbm/1.11/20170513213716/bin:/hab/pkgs/core/gettext/0.19.6/20170513214354/bin:/hab/pkgs/core/glibc/2.22/20170513201042/bin:/hab/pkgs/core/less/481/20170513213936/bin:/hab/pkgs/core/libcap/2.24/20170513213120/bin:/hab/pkgs/core/ncurses/6.0/20170513213009/bin:/hab/pkgs/core/openssh/7.2p2/20170514000451/bin:/hab/pkgs/core/openssh/7.2p2/20170514000451/sbin:/hab/pkgs/core/openssh/7.2p2/20170514000451/libexec:/hab/pkgs/core/openssl/1.0.2j/20170513215106/bin:/hab/pkgs/core/pcre/8.38/20170513213423/bin:/hab/pkgs/core/perl/5.22.1/20170513213942/bin:/hab/pkgs/core/xz/5.2.2/20170513214327/bin:/hab/pkgs/core/hab-plan-build/0.24.1/20170522084013/bin:/hab/pkgs/core/bash/4.3.42/20170513213519/bin:/hab/pkgs/core/binutils/2.25.1/20170513201927/bin:/hab/pkgs/core/bzip2/1.0.6/20170513212938/bin:/hab/pkgs/core/coreutils/8.25/20170513213226/bin:/hab/pkgs/core/file/5.24/20170513201915/bin:/hab/pkgs/core/findutils/4.4.2/20170513214305/bin:/hab/pkgs/core/gawk/4.1.3/20170513213646/bin:/hab/pkgs/core/grep/2.22/20170513213444/bin:/hab/pkgs/core/gzip/1.6/20170513214605/bin:/hab/pkgs/core/hab/0.24.1/20170522083228/bin:/hab/pkgs/core/rq/0.9.2/20170513215401/bin:/hab/pkgs/core/sed/4.2.2/20170513213123/bin:/hab/pkgs/core/tar/1.29/20170513213607/bin:/hab/pkgs/core/unzip/6.0/20170513215357/bin:/hab/pkgs/core/wget/1.18/20170513215322/bin:/hab/pkgs/core/xz/5.2.2/20170513214327/bin:/hab/pkgs/core/acl/2.2.52/20170513213108/bin:/hab/pkgs/core/attr/2.4.47/20170513213059/bin:/hab/pkgs/core/glibc/2.22/20170513201042/bin:/hab/pkgs/core/less/481/20170513213936/bin:/hab/pkgs/core/libcap/2.24/20170513213120/bin:/hab/pkgs/core/libidn/1.32/20170513215043/bin:/hab/pkgs/core/ncurses/6.0/20170513213009/bin:/hab/pkgs/core/openssl/1.0.2j/20170513215106/bin:/hab/pkgs/core/pcre/8.38/20170513213423/bin
mkdir: created directory '/hab/cache/src'
go-relay: Downloading Go build dependencies
go-relay: Clean the cache
go-relay: Setting build environment
go-relay: Setting PREFIX=/hab/pkgs/afiune/go-relay/0.1.0/20170710141052
go-relay: Setting LD_RUN_PATH=
go-relay: Setting CFLAGS=-I/hab/pkgs/core/gcc/5.2.0/20170513202244/include -I/hab/pkgs/core/make/4.2.1/20170513214620/include
go-relay: Setting CXXFLAGS=-I/hab/pkgs/core/gcc/5.2.0/20170513202244/include -I/hab/pkgs/core/make/4.2.1/20170513214620/include
go-relay: Setting CPPFLAGS=-I/hab/pkgs/core/gcc/5.2.0/20170513202244/include -I/hab/pkgs/core/make/4.2.1/20170513214620/include
go-relay: Setting LDFLAGS=-L/hab/pkgs/core/git/2.10.0/20170514000532/lib -L/hab/pkgs/core/gcc/5.2.0/20170513202244/lib
go-relay: Setting PKG_CONFIG_PATH=
go-relay: Preparing to build
go-relay: Building
govendor test +local -cover
? github.com/operable/go-relay [no test files]
? github.com/operable/go-relay/relay [no test files]
ok github.com/operable/go-relay/relay/bundle 0.007s coverage: 71.1% of statements
? github.com/operable/go-relay/relay/bus [no test files]
ok github.com/operable/go-relay/relay/config 0.007s coverage: 55.0% of statements
? github.com/operable/go-relay/relay/engines [no test files]
ok github.com/operable/go-relay/relay/messages 0.006s coverage: 0.0% of statements
? github.com/operable/go-relay/relay/util [no test files]
ok github.com/operable/go-relay/relay/worker 0.010s coverage: 38.9% of statements
rm -f `find . -name "*flymake*.go"`
CGO_ENABLED=0 govendor build -ldflags "-X main.buildstamp=20170710141058 -X main.buildhash=858b8ff442ca0de2c91e4413e4fbd0720a16eb6e -X main.buildtag=master -X main.commanddrivertag=0.13" -o _build/relay
go-relay: Installing
mkdir: created directory '/hab/pkgs/afiune/go-relay/0.1.0/20170710141052'
go-relay: Writing configuration
go-relay: Writing service management scripts
go-relay: Stripping unneeded symbols from binaries and libraries
go-relay: Creating manifest
go-relay: Building package metadata
go-relay: Generating blake2b hashes of all files in the package
go-relay: Generating signed metadata FILES
» Signing go-relay_blake2bsums
☛ Signing go-relay_blake2bsums with afiune-20170705232551 to create /hab/pkgs/afiune/go-relay/0.1.0/20170710141052/FILES
★ Signed artifact /hab/pkgs/afiune/go-relay/0.1.0/20170710141052/FILES.
go-relay: Generating package artifact
/hab/pkgs/core/tar/1.29/20170513213607/bin/tar: Removing leading `/' from member names
/hab/cache/artifacts/.afiune-go-relay-0.1.0-20170710141052-x86_64-linux.tar (1/1)
100 % 2929.8 KiB / 13.5 MiB = 0.212 879 KiB/s 0:15
» Signing /hab/cache/artifacts/.afiune-go-relay-0.1.0-20170710141052-x86_64-linux.tar.xz
☛ Signing /hab/cache/artifacts/.afiune-go-relay-0.1.0-20170710141052-x86_64-linux.tar.xz with afiune-20170705232551 to create /hab/cache/artifacts/afiune-go-relay-0.1.0-20170710141052-x86_64-linux.hart
★ Signed artifact /hab/cache/artifacts/afiune-go-relay-0.1.0-20170710141052-x86_64-linux.hart.
'/hab/cache/artifacts/afiune-go-relay-0.1.0-20170710141052-x86_64-linux.hart' -> '/src/results/afiune-go-relay-0.1.0-20170710141052-x86_64-linux.hart'
go-relay: hab-plan-build cleanup
go-relay:
go-relay: Source Path: /hab/cache/src/go-relay-0.1.0
go-relay: Installed Path: /hab/pkgs/afiune/go-relay/0.1.0/20170710141052
go-relay: Artifact: /src/results/afiune-go-relay-0.1.0-20170710141052-x86_64-linux.hart
go-relay: Build Report: /src/results/last_build.env
go-relay: SHA256 Checksum: 48830a30ec2821a1e7050e7301ef5899feddd44db753eb44c44291ee2452daed
go-relay: Blake2b Checksum: 84920cdc304f9c3908ab7597a221602e912c43c71383d876bbe6c06b11be38f8
go-relay:
go-relay: I love it when a plan.sh comes together.
go-relay:
go-relay: Build time: 18m13s
[7][default:/src:0]#
[8][default:/src:0]# /hab/cache/src/go-relay-0.1.0/src/github.com/operable/go-relay/_build/relay
WARN[2017-07-10T13:59:42Z] Error loading config file '/etc/relay.conf': Config file not found or is unreadable.
WARN[2017-07-10T13:59:42Z] Error loading config file '/usr/local/etc/relay.conf': Config file not found or is unreadable.
log level: infoERRO[2017-07-10T13:59:42Z] Error configuring Relay:
ID: non zero value required
Token: non zero value required
ERRO[2017-07-10T13:59:42Z] Relay start aborted.
pkg_name=hello-go
pkg_origin=afiune
pkg_version="0.1.0"
pkg_scaffolding=afiune/scaffolding-go
pkg_source="http://github.com/afiune/hello-go"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment