From 90655e53d932ef0013065c0ebe0f1cb7b8c1a486 Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 21 May 2020 20:13:21 +0200 Subject: [PATCH] Initial commit, not finished... --- .gitignore | 1 + tasks/main.yml | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 .gitignore create mode 100644 tasks/main.yml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4dc51e8 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +vault/ diff --git a/tasks/main.yml b/tasks/main.yml new file mode 100644 index 0000000..d08c5a5 --- /dev/null +++ b/tasks/main.yml @@ -0,0 +1,44 @@ +- name: Copy production build config + copy: + dest: '/home/repositories/pleroma/config/prod.secret.exs' + content: 'import Mix.Config' + follow: yes + tags: + - setup + - build +- name: Fetch hex + shell: + chdir: "/home/repositories/pleroma/" + cmd: "MIX_ENV=prod mix local.hex --force" + tags: + - setup + - build +- name: Fetch rebar + shell: + chdir: "/home/repositories/pleroma/" + cmd: "MIX_ENV=prod mix local.rebar --force" + tags: + - setup + - build +- name: Fetch dependencies + shell: + chdir: "/home/repositories/pleroma/" + cmd: "MIX_ENV=prod mix deps.get --only prod" + tags: + - setup + - build +- name: Ensure that output dir is created + file: + path: '/etc/pleroma' + state: directory + follow: yes + tags: + - setup + - build +- name: Build pleroma + shell: + chdir: "/home/repositories/pleroma/" + cmd: "MIX_ENV=prod mix release --path /etc/pleroma" + tags: + - setup + - build