I’m having problems with the fact that I don’t display Trends from previous launches. I will be glad of any help. My gitlab-ci.yml
stages:
- test
- deploy
- notify
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
REPORT_DIR: "public/allure-report"
ALLURE_RESULTS: "results/allure-results"
before_script:
- source /home/tester/distr/packet/myenv/bin/activate
- python3 -m pip install pytest allure-pytest
- export PATH=$PATH:/usr/local/bin
- mkdir -p public
- if [ ! -f public/environment.properties ]; then touch public/environment.properties; fi
- echo "OS=$(uname -a)" >> public/environment.properties
test:
stage: test
script:
- rm -rf ${ALLURE_RESULTS}
- mkdir -p ${ALLURE_RESULTS}
- if [ -d ${REPORT_DIR}/history ]; then cp -r ${REPORT_DIR}/history ${ALLURE_RESULTS}/history; else mkdir -p ${ALLURE_RESULTS}/history; fi
- cp public/environment.properties ${ALLURE_RESULTS}/environment.properties
- python3 -m pytest --alluredir=${ALLURE_RESULTS} tests/
after_script:
- mkdir -p ${REPORT_DIR}
- allure generate ${ALLURE_RESULTS} -o ${REPORT_DIR} --clean
- cp -r ${ALLURE_RESULTS}/history ${REPORT_DIR}/history
artifacts:
when: always
paths:
- ${REPORT_DIR}
- ${ALLURE_RESULTS}
pages:
stage: deploy
script:
- mkdir -p public
- cp -r ${REPORT_DIR}/* public
artifacts:
paths:
- public
only:
- master
I changed the folder location, but it didn’t help and the Trend is still not displayed after generating the report
Александр Филиппов is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.