From a720ed6a77790f773b77ce77135c366800bbc8a8 Mon Sep 17 00:00:00 2001 From: Fabian Koller Date: Thu, 25 Feb 2021 06:22:59 +0100 Subject: [PATCH 1/2] Do not require molecule teardown for success CI failures should not be caused by intermittently failing docker communication furing test teardown. --- .github/workflows/ansible.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ansible.yml b/.github/workflows/ansible.yml index 05419d5e8..c49ce2abc 100644 --- a/.github/workflows/ansible.yml +++ b/.github/workflows/ansible.yml @@ -47,7 +47,6 @@ jobs: molecule converge molecule idempotence molecule verify - molecule destroy working-directory: "${{ github.repository }}" # # https://galaxy.ansible.com/docs/contributing/importing.html # release: From ba853be00d657db1a9fd50f9ba9cc2fc93424f65 Mon Sep 17 00:00:00 2001 From: Fabian Koller Date: Thu, 25 Feb 2021 06:24:09 +0100 Subject: [PATCH 2/2] Use local HEAD hash as installation target GitHub actions' GITHUB_SHA provides unexpected hashes for manually re-run pipelines. Instead rely on the commit as seen from the current git history. --- ansible/molecule/default/converge.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ansible/molecule/default/converge.yml b/ansible/molecule/default/converge.yml index 1ae260bac..c70c54d39 100644 --- a/ansible/molecule/default/converge.yml +++ b/ansible/molecule/default/converge.yml @@ -2,9 +2,15 @@ - name: update previous release to newest release hosts: all tasks: + - name: install git dependency + apt: + pkg: git + - name: obtain latest git hash in current tree + command: git rev-parse HEAD + register: git_hash - name: set current github commit as version when available set_fact: - paperlessng_version: "{{ lookup('env', 'GITHUB_SHA') | default('master', True) }}" + paperlessng_version: "{{ git_hash.stdout }}" - name: update to newest paperless-ng release include_role: name: ansible