diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 389b327123..e30566f8d9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,12 +9,20 @@ workflow: - if: $CI_COMMIT_TAG auto_cancel: on_new_commit: conservative + - if: '$CI_PIPELINE_SOURCE == "web"' + auto_cancel: + on_new_commit: interruptible + - if: '$CI_PIPELINE_SOURCE == "webide"' + auto_cancel: + on_new_commit: interruptible + - if: '$CI_COMMIT_BRANCH == "development"' + auto_cancel: + on_new_commit: conservative + default: interruptible: true - before_script: - # FIXME: build minimal el9 container, or use container-forge - - dnf install -y java-21-openjdk maven wget tree ruby python3-pip + retry: 2 stages: - build-stage @@ -23,6 +31,9 @@ stages: build: stage: build-stage + before_script: + # FIXME: build minimal el9 container, or use container-forge + - dnf install -y java-21-openjdk maven wget tree ruby python3-pip script: - ./build-coatjava.sh -T4 --unittests --spotbugs --quiet --no-progress artifacts: @@ -35,6 +46,9 @@ depana: allow_failure: true stage: test-stage dependencies: [build] + before_script: + # FIXME: build minimal el9 container, or use container-forge + - dnf install -y java-21-openjdk maven wget tree ruby python3-pip script: - mvn dependency:tree -Ddetail=true --no-transfer-progress - mvn dependency:analyze -DfailOnWarning=true -pl '!org.jlab.coat:coat-libs' --no-transfer-progress @@ -42,6 +56,9 @@ depana: eb: stage: test-stage dependencies: [build] + before_script: + # FIXME: build minimal el9 container, or use container-forge + - dnf install -y java-21-openjdk maven wget tree ruby python3-pip script: - cd validation/advanced-tests && ./run-eb-tests.sh -100 ${ARG} parallel: @@ -57,6 +74,9 @@ jacoco: stage: test-stage needs: [build] dependencies: [build] + before_script: + # FIXME: build minimal el9 container, or use container-forge + - dnf install -y java-21-openjdk maven wget tree ruby python3-pip script: - ./validation/jacoco-aggregate.sh artifacts: @@ -69,6 +89,9 @@ docs: stage: test-stage needs: [build,jacoco] dependencies: [build,jacoco] + before_script: + # FIXME: build minimal el9 container, or use container-forge + - dnf install -y java-21-openjdk maven wget tree ruby python3-pip script: - python3 -m pip install -r docs/mkdocs/requirements.txt - ./docs/mkdocs/generate.sh pages @@ -81,6 +104,8 @@ docs: paths: - pages +include: '.gitlab-rgl.yml' + #deploy: # stage: deploy-stage # dependencies: [docs,jacoco,depana] diff --git a/.gitlab-rgl.yml b/.gitlab-rgl.yml index f704055f1c..b5ac39dd81 100644 --- a/.gitlab-rgl.yml +++ b/.gitlab-rgl.yml @@ -1,21 +1,5 @@ -workflow: - rules: - - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' - - if: '$CI_PIPELINE_SOURCE == "web"' - - if: '$CI_PIPELINE_SOURCE == "webide"' - - if: '$CI_COMMIT_BRANCH == "master"' - - if: '$CI_COMMIT_BRANCH == "development"' - - if: '$CI_COMMIT_TAG' - -variables: - KUBERNETES_MEMORY_LIMIT: "8Gi" - REF_NAME: ${CI_COMMIT_REF_NAME} - -default: - image: ubuntu:noble - retry: 2 - coatjava_build: + stage: build-stage image: gcr.io/kaniko-project/executor:debug script: - echo "${CI_COMMIT_REF_NAME}" @@ -27,6 +11,7 @@ coatjava_build: --build-arg REF_NAME=${CI_COMMIT_REF_NAME} coatjava_dind_build: + stage: build-stage image: eicweb.phy.anl.gov:4567/containers/image_recipes/ubuntu_dind:latest tags: - "silicon" @@ -43,6 +28,7 @@ coatjava_dind_build: print_help: + stage: test-stage image: $CI_REGISTRY_IMAGE/coatjava:${CI_COMMIT_REF_NAME} needs: ["coatjava_build"] script: @@ -55,6 +41,7 @@ print_help: alert_testing: + stage: test-stage needs: ["coatjava_build"] variables: REF_NAME: "$CI_COMMIT_REF_NAME" @@ -63,6 +50,7 @@ alert_testing: strategy: depend shared_for_alert_tests: + stage: test-stage needs: ["coatjava_build"] variables: REF_NAME: "$CI_COMMIT_REF_NAME" @@ -71,28 +59,30 @@ shared_for_alert_tests: strategy: depend coatjava:singularity: + stage: build-stage image: eicweb.phy.anl.gov:4567/containers/image_recipes/ubuntu_dind:latest needs: ["coatjava_build"] tags: - silicon allow_failure: true script: - - apptainer build --build-arg REF_NAME=${REF_NAME} coatjava.sif .containers/coatjava.def + - apptainer build --build-arg REF_NAME=${CI_COMMIT_REF_NAME} coatjava.sif .containers/coatjava.def - ls -lrth artifacts: paths: - coatjava.sif -create-pages: - image: codecr.jlab.org/hallb/alert/coatjava/coatjava:development - script: - - echo "${CI_COMMIT_REF_NAME}" - - ls -lrth - - mvn --version - - java --version - - ls -lrth - - pwd - - ./build-coatjava.sh --docs - - mv coatjava/share/doc/coatjava/html public - pages: true # specifies that this is a Pages job and publishes the default public directory +#create-pages: +# stage: build-stage +# image: codecr.jlab.org/hallb/alert/coatjava/coatjava:development +# script: +# - echo "${CI_COMMIT_REF_NAME}" +# - ls -lrth +# - mvn --version +# - java --version +# - ls -lrth +# - pwd +# - ./build-coatjava.sh --docs +# - mv coatjava/share/doc/coatjava/html public +# pages: true # specifies that this is a Pages job and publishes the default public directory