src.nth.io/

summaryrefslogtreecommitdiff
path: root/dendrite/build/tasks
diff options
context:
space:
mode:
authorLuke Hoersten <[email protected]>2023-07-22 15:50:07 -0500
committerLuke Hoersten <[email protected]>2023-07-22 15:50:07 -0500
commitd6454704216bfa4b4f6e8a250f057f2b0d543fa1 (patch)
tree610fb49e42cc4a46d0acccb494e4e7fcf843f57f /dendrite/build/tasks
parent8b9372c76e66c892741335566d1a63c29cc18ba3 (diff)
Finished up dendrite build server role.
Diffstat (limited to 'dendrite/build/tasks')
-rw-r--r--dendrite/build/tasks/main.yaml34
1 files changed, 30 insertions, 4 deletions
diff --git a/dendrite/build/tasks/main.yaml b/dendrite/build/tasks/main.yaml
index 04b9282..f4d15dc 100644
--- a/dendrite/build/tasks/main.yaml
+++ b/dendrite/build/tasks/main.yaml
@@ -1,8 +1,8 @@
---
-- name: snap install golang
+- name: install golang
become: yes
- snap: name="go" classic="yes"
+ apt: name="golang-go"
- name: unarchive dendrite
unarchive:
@@ -11,13 +11,39 @@
dest: "/tmp/"
creates: "{{dendrite_build_dir}}"
+- name: create build dir
+ file:
+ path: "{{dendrite_build_dir}}/bin"
+ mode: "0755"
+ state: "directory"
+
- name: check if dendrite build exists
stat:
- path: "{{dendrite_build_dir}}/bin"
+ path: "{{dendrite_build_dir}}/bin/dendrite"
register: build_file
- name: build dendrite
- command: "{{dendrite_build_dir}}/build.sh"
+ command: "go build -o bin/ ./cmd/..."
args:
chdir: "{{dendrite_build_dir}}"
when: not build_file.stat.exists
+
+- name: create build server dir
+ become: yes
+ file:
+ path: "{{dendrite_srv_dir}}"
+ mode: "0755"
+ state: "directory"
+ when: not build_file.stat.exists
+
+- name: create a gz archive of dendrite bins
+ become: yes
+ archive:
+ path: "{{dendrite_build_dir}}/bin/*"
+ exclude_path:
+ - "{{dendrite_build_dir}}/bin/dendrite-demo-pinecone"
+ - "{{dendrite_build_dir}}/bin/dendrite-demo-yggdrasil"
+ - "{{dendrite_build_dir}}/bin/furl"
+ dest: "{{dendrite_srv_dir}}/dendrite.tar.gz"
+ format: "gz"
+ when: not build_file.stat.exists