Created
March 3, 2021 11:52
-
-
Save KrishnB/b93217529c886f9a88f338e6350302a1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stages: | |
- test | |
- allure | |
- deploy | |
.download_history: &download_history | |
after_script: | |
- apt-get install -y unzip | |
- mkdir backup && cd backup || true | |
- "curl --location --output report.zip --request GET \"https://gitlab.com/api/v4/projects/${CI_PROJECT_ID}/jobs/artifacts/master/download?job=pages\" --header \"Authorization: Bearer ${CI_DEPLOY_TOKEN}\" || true" | |
- (unzip report.zip) || true | |
- cd ../ | |
- (cp -r backup/public/history/ allure-results/history) || true | |
.test_template: &test_template | |
allow_failure: true | |
stage: test | |
script: | |
- <test_command> | |
artifacts: | |
when: always | |
paths: | |
- allure-results/ | |
smoke:: | |
<<: *test_template | |
<<: *download_history | |
allure_report: | |
stage: allure | |
when: always | |
image: timbru31/java-node | |
dependencies: | |
- smoke | |
script: | |
- npm install | |
- npx allure generate #change allure command specific to your framework | |
artifacts: | |
when: always | |
paths: | |
- allure-report/ | |
- allure-results/ | |
only: | |
- master | |
pages: | |
stage: deploy | |
when: always | |
dependencies: | |
- allure_report | |
script: | |
- mv allure-report/ public/ | |
artifacts: | |
paths: | |
- public | |
expire_in: 30 days | |
only: | |
- master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment