Commit 810505c4 authored by Kirill Smelkov's avatar Kirill Smelkov

helloweb: Switch to cloning helloweb.git via gowork infrastructure

- it is gowork that is now used by Go-related bits in SlapOS, so using
  gowork is preferred as example. Besides we need gowork to be able to
  use any third-party Go package.

- other languages can use helloweb repository from under gowork/ tree as
  well.

The hash of helloweb.git is changed, becuase its layout had to be too
adjusted to match gowork mode:

helloweb@a072af78...8bfedac6
parent 1642a8cf
......@@ -4,6 +4,7 @@ extends =
../git/buildout.cfg
../ruby/buildout.cfg
../golang/buildout.cfg
gowork.cfg
parts =
helloweb-python
......@@ -11,20 +12,40 @@ parts =
helloweb-go
# repository with examples
[helloweb-repository]
recipe = slapos.recipe.build:gitclone
git-executable = ${git:location}/bin/git
repository = https://lab.nexedi.com/nexedi/helloweb.git
revision = a072af789dcd3a1106b69ef4dc2a310d8daa5c48
location = ${buildout:parts-directory}/helloweb
# helloweb.git repository with examples.
#
# We clone it via golang infrastructure into a Go workspace.
# Via gowork helloweb/go is not only cloned, but also built and installed into gowork/bin.
#
# Another option would be to use slapos.recipe.build:gitclone and handle
# cloning+building manually. However to be able to use third-party Go packages
# we need gowork support, and other languages can use helloweb repository from
# under gowork as well.
[gowork]
install =
lab.nexedi.com/nexedi/helloweb/go/...
golang = ${golang1.11:location}
# -*- go -*-
[helloweb-go]
# we already have gowork/bin/helloweb with helloweb Go build.
# Add bin/helloweb-go that runs go version of helloweb without any environment preset needed.
recipe = collective.recipe.template
output = ${buildout:bin-directory}/${:_buildout_section_name_}
mode = 0755
input = inline:
#!/bin/sh
. ${gowork:env.sh}
exec helloweb "$@"
# -*- python -*-
[helloweb-egg]
recipe = zc.recipe.egg:develop
egg = helloweb
setup = ${helloweb-repository:location}/python/
setup = ${gowork:src}/lab.nexedi.com/nexedi/helloweb/python/
[helloweb-python]
recipe = zc.recipe.egg:scripts
......@@ -66,7 +87,7 @@ environment =
[helloweb-ruby-bundle]
recipe = slapos.recipe.cmmi
path = ${helloweb-repository:location}/ruby/
path = ${gowork:src}/lab.nexedi.com/nexedi/helloweb/ruby/
configure-command = :
make-binary =
......@@ -84,15 +105,3 @@ input = inline:
exec ${bundler:bundle} exec sh -c 'helloweb.rb "$@"' ${:_buildout_section_name_} "$@"
# -*- go -*-
[helloweb-go]
recipe = slapos.recipe.cmmi
path = ${helloweb-repository:location}/go/
go = ${golang1.11:location}/bin/go
configure-command = :
make-binary =
make-targets= cd ${:path} &&
${:go} build
-o ${buildout:bin-directory}/${:_buildout_section_name_}
helloweb.go
# Code generated by gowork-snapshot; DO NOT EDIT.
# list of go git repositories to fetch
[gowork.goinstall]
depends_gitfetch =
${go_lab.nexedi.com_nexedi_helloweb:recipe}
[go_lab.nexedi.com_nexedi_helloweb]
<= go-git-package
go.importpath = lab.nexedi.com/nexedi/helloweb
repository = https://lab.nexedi.com/nexedi/helloweb.git
revision = 8bfedac656
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment