stages: - verify - build - test variables: DOCKER_DRIVER: overlay2 DOCKER_IMAGE_TAG: v3 GCC_VER: "11.1.0" GET_SOURCES_ATTEMPTS: 3 before_script: - echo "Using DOCKER_IMAGE_TAG $DOCKER_IMAGE_TAG" .build-base: stage: build tags: - large variables: GIT_STRATEGY: clone GIT_DEPTH: 10 script: - /opt/build_kernel.sh artifacts: name: "$CI_JOB_NAME" when: always expire_in: 1 month paths: - output .build: extends: .build-base image: registry.gitlab.com/cip-project/cip-testing/linux-cip-ci:build-$DOCKER_IMAGE_TAG .build-debian-base: extends: .build-base image: registry.gitlab.com/cip-project/cip-testing/linux-cip-ci:build-$DEB_SUITE-$DOCKER_IMAGE_TAG .build-debian-buster: extends: .build-debian-base variables: DEB_SUITE: buster .build-debian-bullseye: extends: .build-debian-base variables: DEB_SUITE: bullseye .test: stage: test image: registry.gitlab.com/cip-project/cip-testing/linux-cip-ci:test-$DOCKER_IMAGE_TAG tags: - small variables: GIT_STRATEGY: none script: - /opt/submit_tests.sh artifacts: name: "$CI_JOB_NAME" when: always expire_in: 1 month paths: - output # For comparing branches or tags with git diff # Default is to compare "-rebase" (A) to non-rebase equivalent (B) .git-comparison: stage: verify image: registry.gitlab.com/cip-project/cip-testing/linux-cip-ci:build-$DOCKER_IMAGE_TAG tags: - small variables: GIT_STRATEGY: clone GIT_DEPTH: 1 script: - if [ -z $REF_TYPE ]; then REF_TYPE="branch"; fi - if [ -z $BRANCH_A ]; then BRANCH_A=$CI_COMMIT_REF_NAME; fi - if [ -z $BRANCH_B ]; then BRANCH_B=$(echo $CI_COMMIT_REF_NAME | sed 's/-rebase//g'); fi - 'echo "REF_TYPE: $REF_TYPE"' - 'echo "BRANCH_A: $BRANCH_A"' - 'echo "BRANCH_B: $BRANCH_B"' - | if [[ $REF_TYPE = "tag" ]]; then git fetch --depth 1 origin tag $BRANCH_A git fetch --depth 1 origin tag $BRANCH_B git diff $BRANCH_A $BRANCH_B | tee git-diff.log else git fetch --depth 1 origin $BRANCH_A git fetch --depth 1 origin $BRANCH_B git diff origin/$BRANCH_A origin/$BRANCH_B | tee git-diff.log fi - | if [ -s git-diff.log ]; then echo "RESULT: $BRANCH_A is different to $BRANCH_B" exit 1 else echo "RESULT: $BRANCH_A is the same as $BRANCH_B" fi artifacts: name: "$CI_JOB_NAME" when: always expire_in: 1 month paths: - git-diff.log .branch-comparison: extends: .git-comparison variables: REF_TYPE: branch .tag-comparison: extends: .git-comparison variables: REF_TYPE: tag