Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects

adding resource group.

Merged Diego MENDEZ requested to merge bugfix/ci_job_collision into develop
Compare and Show latest version
3 files
+ 25
10
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 16
9
stages:
- test
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "parent_pipeline"
.test-core: &test-core
stage: test
@@ -39,15 +39,22 @@ up-test-env-job:
run-test-job:
<<: *test-core
before_script:
# - pwd && ls && echo "$CI_PROJECT_DIR--1" && echo "${PARENT_PROJECT_DIR}--2" && echo "$CI_PROJECT_DIR--3"
# && echo "$$PARENT_PROJECT_DIR--4" && echo "$$PROJ_DIR--5" && echo "$$CI_PROJECT_DIR--6"
- python3 -m venv "$CI_PROJECT_DIR/plugins/venv"
- source "$CI_PROJECT_DIR/plugins/venv/bin/activate"
- pip install -r "$CI_PROJECT_DIR/plugins/netbox-rps-plugin/tests/requirements.e2e.txt"
- pip install -r "$CI_PROJECT_DIR/plugins/netbox-cert-plugin/tests/requirements.e2e.txt"
- pip install -r "$CI_PROJECT_DIR/tests/requirements.e2e.txt"
script:
- env HOST="${TEST_HOST}" PORT="${TEST_PORT}" API_KEY="$API_KEY" pytest -s --junit-xml=tests-report-netbox-rps-plugin.xml "$CI_PROJECT_DIR/plugins/netbox-rps-plugin/tests/"
- env HOST="${TEST_HOST}" PORT="${TEST_PORT}" API_KEY="$API_KEY" pytest -s --junit-xml=tests-report-netbox-cert-plugin.xml "$CI_PROJECT_DIR/plugins/netbox-cert-plugin/tests/"
- env HOST="${TEST_HOST}" PORT="${TEST_PORT}" API_KEY="$API_KEY" pytest -s --junit-xml=tests-report-netbox-dist-plugin.xml "$CI_PROJECT_DIR/tests/e2e/"
# - env HOST="${TEST_HOST}" PORT="${TEST_PORT}" API_KEY="$API_KEY"
# pytest -s --junit-xml=tests-report-netbox-rps-plugin.xml "$CI_PROJECT_DIR/plugins/netbox-rps-plugin/tests/"
# - env HOST="${TEST_HOST}" PORT="${TEST_PORT}" API_KEY="$API_KEY"
# pytest -s --junit-xml=tests-report-netbox-cert-plugin.xml "$CI_PROJECT_DIR/plugins/netbox-cert-plugin/tests/"
# - env HOST="${TEST_HOST}" PORT="${TEST_PORT}" API_KEY="$API_KEY"
# pytest -s --junit-xml=tests-report-netbox-dist-plugin.xml "$CI_PROJECT_DIR/tests/e2e/"
- ls
after_script:
- deactivate
- rm -rf "$CI_PROJECT_DIR/plugins/venv"
@@ -65,8 +72,9 @@ run-robot-test-job:
- source "$CI_PROJECT_DIR/plugins/venv/bin/activate"
- docker build -t robotframework:latest ./tests/docker/
script:
- docker run --rm -v $CI_PROJECT_DIR:/project --network "host" robotframework:latest bash -c
"robot -v HOST:"${TEST_HOST}" -v PORT:"${TEST_PORT}" -v API_TOKEN:"$API_KEY" --outputdir /project/reports /project/tests/robot/"
# - docker run --rm -v $CI_PROJECT_DIR:/project --network "host" robotframework:latest bash -c
# "robot -v HOST:"${TEST_HOST}" -v PORT:"${TEST_PORT}" -v API_TOKEN:"$API_KEY" --outputdir /project/reports /project/tests/robot/"
- ls
after_script:
- sudo chmod -R 777 reports
- docker image rm robotframework:latest --force
@@ -93,4 +101,3 @@ down-test-env-job:
- run-test-job
- run-robot-test-job
when: always
Loading