YO
Size: a a a
YO
C
S
S
LY
ЕА
LY
S
ЕА
stages:
- test
- deploy
- notify
test:
image: maven:3.3.9-jdk-8
stage: test
before_script:
- mkdir target
- mkdir target/screenshots
script:
- mvn -f pom.xml test
artifacts:
paths:
- target
expire_in: 30 days
when: always
pages:
image: maven:3.3.9-jdk-8
stage: deploy
script:
- mvn -f pom.xml io.qameta.allure:allure-maven:report
- mkdir .public
- cp -r target/allure-results/allure-maven-plugin/* .public
- mv .public public
artifacts:
paths:
- public
expire_in: 30 days
when: always
notify_success:
stage: notify
script:
- sleep 60
- sh ci-notify.sh passed✅
when: on_success
notify_error:
stage: notify
script:
- sleep 60
- sh ci-notify.sh failed❌
when: on_failure
ЕА
S
ЕА
S
ЕА
S
ЕА
#!/bin/bash
TIME="10"
Allure_link="url-of-your-project-deploy-page"
URL="https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendMessage"
TEXT="Autotests status: $1%0A%0AProject:+your-project%0A%0APipeline:+$CI_PROJECT_URL/pipelines/$CI_PIPELINE_ID/%0A%0AAllure-report:+$Allure_link"
curl -s --max-time $TIME -d "chat_id=$TELEGRAM_USER_ID&disable_web_page_preview=1&text=$TEXT" "$URL" > /dev/null
ЕА
LY