From c99eb17850e51327449e6fac5572c6cfc436d21c Mon Sep 17 00:00:00 2001 From: Paul Bonaud Date: Tue, 24 Mar 2020 10:18:14 +0100 Subject: vars: fix `clever_base_env` by removing a variable if not necessary The `CC_RUN_COMMAND` variable was defined in case we use haskell binary as entrypoints. However if the `clever_haskell_entry_point` variable is not defined we shouldn't define the `CC_RUN_COMMAND` env variable. --- tests/fake.sh | 14 ++++++++++++++ tests/inventory | 2 +- tests/test.yml | 6 +++++- 3 files changed, 20 insertions(+), 2 deletions(-) create mode 100755 tests/fake.sh (limited to 'tests') diff --git a/tests/fake.sh b/tests/fake.sh new file mode 100755 index 0000000..2835e85 --- /dev/null +++ b/tests/fake.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +binary="${0/*\/}" +fakeCommit="aaa000aaa000aaa000aaa000aaa000aaa000aaa0" + +if [ "${binary}" = "clever" ] && [ "${1}" = "--version" ]; then + echo "1.6.3" +elif [ "${binary}" = "clever" ] && [ "${1}" = "activity" ]; then + echo "2020-02-02T20:20:02+02:00 OK DEPLOY ${fakeCommit} Git" +elif [ "${binary}" = "git" ]; then + echo "${fakeCommit}" +else + echo "${binary} called with arguments: ${*}" +fi diff --git a/tests/inventory b/tests/inventory index 878877b..49d4fe2 100644 --- a/tests/inventory +++ b/tests/inventory @@ -1,2 +1,2 @@ -localhost +localhost ansible_connection=local diff --git a/tests/test.yml b/tests/test.yml index 3e3c57f..663bc6b 100644 --- a/tests/test.yml +++ b/tests/test.yml @@ -2,4 +2,8 @@ - hosts: localhost remote_user: root roles: - - clever \ No newline at end of file + - role: clever + vars: + clever_token: 123abc + clever_secret: cba321 + clever_app: app_00000000-0000-0000-0000-000000000000 -- cgit v1.2.3