merge origin/dev into master

Squashed commit of the following:

commit 3b92e0ff3baa83528c6b5cecca6289333ebeaa0b
Author: surtur <a_mirre@utb.cz>
Date:   Thu Mar 5 03:53:14 2020 +0100

    show step build status and continue in execution

commit 58a1bb9a7ba7c8b2401d50a770ffb32abfdac276
Author: surtur <a_mirre@utb.cz>
Date:   Thu Mar 5 03:46:48 2020 +0100

    fix: wrong pipeline dependency

commit 5b4d9faf5d69c98f01f9b4e12ff363bc7a01f882
Author: surtur <a_mirre@utb.cz>
Date:   Thu Mar 5 03:42:52 2020 +0100

    run both of the tests + discord notification

commit 5c8f3819b8d69c08add195401d513fd49e886be2
Author: surtur <a_mirre@utb.cz>
Date:   Thu Mar 5 03:38:13 2020 +0100

    fix: got another one wrong

commit b1b69388924b761ac46c143912274eaa4ee9c325
Author: surtur <a_mirre@utb.cz>
Date:   Thu Mar 5 03:37:11 2020 +0100

    got the format wrong

commit ead1415b27177f4ea0cb1fbafbf4a6b26b350941
Author: surtur <a_mirre@utb.cz>
Date:   Thu Mar 5 03:35:37 2020 +0100

    fix: added missing test structure

commit 15ac9805bba372ada1279a4844bdf671d84d7e29
Author: surtur <a_mirre@utb.cz>
Date:   Thu Mar 5 03:27:15 2020 +0100

    fix: test000 shall run

commit af614f9ad569993c01bafcea7d0b530c43030825
Author: surtur <a_mirre@utb.cz>
Date:   Thu Mar 5 03:25:49 2020 +0100

    [skip ci] run test000

commit 22c118d6113ba4fa6b5252b78cf3c3bb74592b10
Author: surtur <a_mirre@utb.cz>
Date:   Thu Mar 5 03:24:17 2020 +0100

    refactor the pipeline

commit 5d96f6e7a75dcaafa4757e8fbe7364019cf6d812
Author: surtur <a_mirre@utb.cz>
Date:   Thu Mar 5 03:12:44 2020 +0100

    don't ask the robot to tell you it's version
This commit is contained in:
surtur 2020-03-05 03:59:26 +01:00
parent f87f3eee9c
commit d9582e53c7
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D
2 changed files with 118 additions and 6 deletions

@ -15,27 +15,96 @@ steps:
commands:
- uname -r
- python --version
- robot --version
- robot --version || echo "rf loves to exit with code $(robot --version 2>&1 >/dev/null; echo $?)"
- ls -la
- name: test000
pull: always
image: immawanderer/archlinux-rf
volumes:
- name: shm
path: /dev/shm
commands:
- robot test000.robot
when:
status:
- success
- failure
- name: report000
pull: always
image: immawanderer/archlinux-rf
volumes:
- name: shm
path: /dev/shm
commands:
- cat log.html
- cat output.xml
- cat report.html
- name: test001
pull: if-not-exists
pull: always
image: immawanderer/archlinux-rf
volumes:
- name: shm
path: /dev/shm
commands:
- robot test001.robot
when:
status:
- success
- failure
- name: report
pull: if-not-exists
- name: report001
pull: always
image: immawanderer/archlinux-rf
volumes:
- name: shm
path: /dev/shm
commands:
- cat log.html
- cat output.html
- cat report.hmtl
- cat output.xml
- cat report.html
volumes:
- name: shm
host:
path: /dev/shm
---
kind: pipeline
name: notifications
platform:
os: linux
arch: amd64
clone:
disable: true
trigger:
branch:
- master
- dev
- "release/*"
event:
- push
- tag
status:
- success
- failure
depends_on:
- test-set-default
steps:
- name: discord
pull: always
image: appleboy/drone-discord:1.2.4
settings:
message: "{{#success build.status}} ✅ Build #{{build.number}} of `{{repo.name}}` succeeded.\n\n📝 Commit by {{commit.author}} on `{{commit.branch}}`:\n``` {{commit.message}} ```\n\n🌐 {{ build.link }} {{else}} ❌ Build #{{build.number}} of `{{repo.name}}` failed.\n\n📝 Commit by {{commit.author}} on `{{commit.branch}}`:\n``` {{commit.message}} ```\n\n🌐 {{ build.link }} {{/success}}\n"
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token

43
test000.robot Normal file

@ -0,0 +1,43 @@
*** Settings ***
Library SeleniumLibrary run_on_failure=Nothing
*** Variables ***
${URL} https://drone.dotya.ml/wanderer/docker-archlinux-cdev/
${RANDELEM} //section[@class='repo-item build-yes active-yes']
*** Test Cases ***
Headless Chrome - Create Webdriver
${chrome options} = Evaluate sys.modules['selenium.webdriver'].ChromeOptions() sys, selenium.webdriver
Call Method ${chrome options} add_argument headless
Call Method ${chrome options} add_argument disable-gpu
${options}= Call Method ${chrome_options} to_capabilities
Create Webdriver Remote command_executor=http://localhost:4444/wd/hub desired_capabilities=${options}
Go to ${URL}
Maximize Browser Window
Capture Page Screenshot
Sleep 2
Click Element ${RANDELEM}
Sleep 1
Capture Page Screenshot
Headless Chrome - Open Browser
${chrome_options} = Evaluate sys.modules['selenium.webdriver'].ChromeOptions() sys, selenium.webdriver
Call Method ${chrome_options} add_argument headless
Call Method ${chrome_options} add_argument disable-gpu
${options}= Call Method ${chrome_options} to_capabilities
Open Browser ${URL} browser=chrome remote_url=http://localhost:4444/wd/hub desired_capabilities=${options}
Maximize Browser Window
Capture Page Screenshot
Sleep 2
Click Element ${RANDELEM}
Log Location
Sleep 1
Capture Page Screenshot
Post-conditions
Close Browser