From 58d15331e982c51e8fdc6fdf0383824b0a007f56 Mon Sep 17 00:00:00 2001 From: Nick White Date: Tue, 10 Mar 2020 14:21:29 +0000 Subject: Ensure modules are always updated, and that the service allows time for this to happen --- roles/pipeliner/files/bookpipeline.service | 1 + roles/pipeliner/templates/updatepipeline.j2 | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/roles/pipeliner/files/bookpipeline.service b/roles/pipeliner/files/bookpipeline.service index d68c730..10c016d 100644 --- a/roles/pipeliner/files/bookpipeline.service +++ b/roles/pipeliner/files/bookpipeline.service @@ -2,6 +2,7 @@ Description=Book Pipeline [Service] +TimeoutStartSec=300 ExecStartPre=/usr/local/bin/updatepipeline ExecStart=/usr/local/bin/bookpipeline -v Restart=always diff --git a/roles/pipeliner/templates/updatepipeline.j2 b/roles/pipeliner/templates/updatepipeline.j2 index 5e0e842..43b3c4f 100644 --- a/roles/pipeliner/templates/updatepipeline.j2 +++ b/roles/pipeliner/templates/updatepipeline.j2 @@ -6,7 +6,9 @@ t="/home/{{ ansible_user }}/trainings" # (they don't work for the go get stage in go 1.11) export GOPATH="$g" go get -u rescribe.xyz/bookpipeline/... && \ -cd "$g/src/rescribe.xyz/bookpipeline" && GO111MODULE=on go install ./... && \ +cd "$g/src/rescribe.xyz/bookpipeline" && \ +GO111MODULE=on go get -u rescribe.xyz/bookpipeline/... && \ +GO111MODULE=on go install ./... && \ sudo cp "$g/bin/bookpipeline" /usr/local/bin/ || exit 1 cd "$t" && git pull && \ -- cgit v1.2.1-24-ge1ad