Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 28 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -35,13 +46,19 @@ 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

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:
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -81,6 +104,8 @@ docs:
paths:
- pages

include: '.gitlab-rgl.yml'

#deploy:
# stage: deploy-stage
# dependencies: [docs,jacoco,depana]
Expand Down
50 changes: 20 additions & 30 deletions .gitlab-rgl.yml
Original file line number Diff line number Diff line change
@@ -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}"
Expand All @@ -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"
Expand All @@ -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:
Expand All @@ -55,6 +41,7 @@ print_help:


alert_testing:
stage: test-stage
needs: ["coatjava_build"]
variables:
REF_NAME: "$CI_COMMIT_REF_NAME"
Expand All @@ -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"
Expand All @@ -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

Loading