From bc24785d9844742fc78f65aae4c805bebe1d5650 Mon Sep 17 00:00:00 2001 From: Benjamin Graham Date: Thu, 11 Jun 2020 16:25:27 -0400 Subject: [PATCH] Added artifact collection upon failure --- .semaphore/semaphore.yml | 7 ++++++- test/check-application | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index a269fc6..5e875a5 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -11,6 +11,8 @@ blocks: prologue: commands: - checkout + - sudo rm -rf /etc/localtime + - sudo ln -s /usr/share/zoneinfo/America/New_York /etc/localtime - sudo apt install -y python3-libvirt - docker build -t rpmbuilder . - id=$(docker create rpmbuilder) @@ -26,7 +28,6 @@ blocks: - bots/image-customize -v -r "usermod -u 981 tlog || true" $TEST_OS - bots/image-customize -v -u ./test/files/1.journal:/var/log/journal/1.journal $TEST_OS - test/check-application -v - - name: Check centos-8 commands: - export TEST_OS=centos-8-stream @@ -34,3 +35,7 @@ blocks: - bots/image-customize -v -r "usermod -u 981 tlog || true" $TEST_OS - bots/image-customize -v -u ./test/files/1.journal:/var/log/journal/1.journal $TEST_OS - test/check-application -v + epilogue: + on_fail: + commands: + - artifact push job . diff --git a/test/check-application b/test/check-application index 2dc8ede..02c5d6b 100755 --- a/test/check-application +++ b/test/check-application @@ -204,16 +204,19 @@ class TestApplication(MachineCase): # Save the existing config b.click("#btn-save-sssd-conf") + time.sleep(1) m.download(conf_file, save_file) # Download test with scope 'None' b.set_val("#scope", "none") b.click("#btn-save-sssd-conf") + time.sleep(1) m.download(conf_file, test_none_file) # Download test with scope 'Some' b.set_val("#scope", "some") b.set_input_text("#users", "test users") b.set_input_text("#groups", "test groups") b.click("#btn-save-sssd-conf") + time.sleep(1) m.download(conf_file, test_some_file) # Download test with scope 'All' b.set_val("#scope", "all")