summaryrefslogtreecommitdiff
path: root/roles/pipeliner/tasks/pipeline.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/pipeliner/tasks/pipeline.yml')
-rw-r--r--roles/pipeliner/tasks/pipeline.yml29
1 files changed, 21 insertions, 8 deletions
diff --git a/roles/pipeliner/tasks/pipeline.yml b/roles/pipeliner/tasks/pipeline.yml
index 582e5de..9eaa5b9 100644
--- a/roles/pipeliner/tasks/pipeline.yml
+++ b/roles/pipeliner/tasks/pipeline.yml
@@ -21,23 +21,36 @@
default_release: stretch-backports
update_cache: yes
-# Do this manually rather than relying on go get so that step can
-# be skipped if nothing has been changed
+# Do this manually rather than relying on go get so that go get
+# with modules enabled can be run to do the build
- name: Get go repo
- git: dest=/home/{{ ansible_user }}/src/go/src/rescribe.xyz/{{ item }} repo=https://git.rescribe.xyz/{{ item }}
+ git:
+ dest: /home/{{ ansible_user }}/src/go/src/rescribe.xyz/{{ item }}
+ repo: https://git.rescribe.xyz/{{ item }}
+ force: yes
become: no
with_items:
- bookpipeline
- preproc
- utils
- register: gorepo
- name: Get and build bookpipeline and dependencies
- command: go get -u rescribe.xyz/bookpipeline/...
- environment:
- GOPATH: /home/{{ ansible_user }}/src/go
+ shell:
+ cmd: GOPATH=/home/{{ ansible_user }}/src/go GO111MODULE=on go get -u rescribe.xyz/bookpipeline/...
+ chdir: /home/{{ ansible_user }}/src/go/src/rescribe.xyz/bookpipeline
become: no
- when: gorepo.changed
+# command fails because of a strange error with environment, resulting in
+# 'go: unknown environment setting GO111MODULE=True'
+# so we're setting it from the shell instead.
+# we should be able to revert back to command once using a more recent
+# go version where GO111MODULE is not required.
+# command:
+# cmd: go get -u rescribe.xyz/bookpipeline/...
+# chdir: /home/{{ ansible_user }}/src/go/src/rescribe.xyz/bookpipeline
+# environment:
+# GOPATH: /home/{{ ansible_user }}/src/go
+# GO111MODULE: on
+# become: no
- name: Install bookpipeline binary
copy: