diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a544276b8ded37dac35f9ab3f297b58095a47dc9..2428dffee33a86f4c2bac5d8f1e91226cb945c0d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,10 +5,16 @@ stages: - test variables: - GIT_SUBMODULE_STRATEGY: recursive + # recursive should work here, but gitlab-runner does not pull the latest remote + # for submodules: https://gitlab.com/gitlab-org/gitlab-runner/issues/3011 + GIT_SUBMODULE_STRATEGY: none MAVEN_CLI_OPTS: "--batch-mode" MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository -Dbuild.tooling=true -Dbuild.af3=true -Dbuild.emf=true" + +before_script: + - docker login -u gitlab-ci-token -p "$CI_JOB_TOKEN" "$CI_REGISTRY" + cache: paths: - .m2/repository/ @@ -16,6 +22,12 @@ cache: build: stage: build + before_script: + - docker login -u gitlab-ci-token -p "$CI_JOB_TOKEN" "$CI_REGISTRY" + # Make Git submodules work + - which git || (apk --no-cache add git) + - git submodule sync --recursive + - git submodule update --remote --recursive script: - mvn $MAVEN_CLI_OPTS verify