Skip to content

Commit

Permalink
chore: trigger integration tests
Browse files Browse the repository at this point in the history
* Trigger integration tests

Ticket: QA-828

Signed-off-by: Daniel Skinstad Drabitzius <[email protected]>
  • Loading branch information
danielskinstad committed Feb 11, 2025
1 parent 371cc05 commit 3bb890d
Showing 1 changed file with 47 additions and 9 deletions.
56 changes: 47 additions & 9 deletions gitlab-pipeline/stage/trigger-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,57 @@
inherit:
variables: false
variables:
MENDER_CLIENT_TAG: mender-$INTEGRATION_REV
MENDER_GATEWAY_QEMU_TAG: mender-$INTEGRATION_REV
MENDER_GATEWAY_TAG: $MENDER_GATEWAY_REV
MENDER_REGISTRY: registry.gitlab.com
MENDER_DOCKER_REGISTRY: registry.gitlab.com
MENDER_CLIENT_REPOSITORY: northern.tech/mender

MENDER_CLIENT_DOCKER_IMAGE: mender-qa
MENDER_CLIENT_DOCKER_TAG: ${CI_PIPELINE_ID}-mender-client-docker

MENDER_CLIENT_DOCKER_ADDONS_IMAGE: mender-qa
MENDER_CLIENT_DOCKER_ADDONS_TAG: ${CI_PIPELINE_ID}-mender-client-docker-addons

MENDER_CLIENT_QEMU_IMAGE: mender-qa
MENDER_CLIENT_QEMU_TAG: ${CI_PIPELINE_ID}-mender-client-qemu

MENDER_CLIENT_QEMU_ROFS_IMAGE: mender-qa
MENDER_CLIENT_QEMU_ROFS_TAG: ${CI_PIPELINE_ID}-mender-client-qemu-rofs

MENDER_GATEWAY_QEMU_COMMERCIAL_IMAGE: mender-qa
MENDER_GATEWAY_QEMU_COMMERCIAL_TAG: ${CI_PIPELINE_ID}-mender-gateway-qemu-commercial

MENDER_MONITOR_QEMU_COMMERCIAL_IMAGE: mender-qa
MENDER_MONITOR_QEMU_COMMERCIAL_TAG: ${CI_PIPELINE_ID}-mender-monitor-qemu-commercial

MENDER_QEMU_ROFS_COMMERCIAL_IMAGE: mender-qa
MENDER_QEMU_ROFS_COMMERCIAL_TAG: ${CI_PIPELINE_ID}-mender-qemu-rofs-commercial

MENDER_GATEWAY_TAG: ${MENDER_GATEWAY_REV}

RUN_TESTS_FULL_INTEGRATION: "true"
# TODO: remove these parallel 1 overrides whenever tests are stable
CI_JOBS_IN_PARALLEL_INTEGRATION: 1
XDIST_JOBS_IN_PARALLEL_INTEGRATION: 1

trigger:generate-gitlab-integration-rev:
stage: trigger:integration
script:
# Convert INTEGRATION_REV on format `pull/0000/head` to `pr_0000` to specify which gitlab branch to trigger
- |
GITLAB_INTEGRATION_REV=$INTEGRATION_REV
if [[ "$INTEGRATION_REV" =~ ^pull/([0-9]+)/head$ ]]; then
GITLAB_INTEGRATION_REV="pr_${BASH_REMATCH[1]}"
fi
- echo "GITLAB_INTEGRATION_REV=$GITLAB_INTEGRATION_REV" >> gitlab_integration_rev.env
artifacts:
reports:
dotenv: gitlab_integration_rev.env

trigger:integration-tests:
extends: .template:trigger:integration-tests
needs: ["trigger:generate-gitlab-integration-rev", "build:client:qemu"]
when: always
trigger:
project: Northern.tech/Mender/integration
branch: $INTEGRATION_REV
branch: $GITLAB_INTEGRATION_REV
strategy: depend

trigger:integration-tests:manual:
needs: []
when: manual
extends: .template:trigger:integration-tests

0 comments on commit 3bb890d

Please sign in to comment.