diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b259cc57bb3506836ad93af92a07428b9371535d..9dd28be07af5dd36555c80163edd7815ca79430f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -image: maven:latest +image: maven_eclipse:latest stages: - build @@ -8,38 +8,39 @@ variables: # 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 + GIT_SUBMODULE_OPTS: "--remote --recursive --init --recommend-shallow" MAVEN_CLI_OPTS: "--batch-mode" MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository" MAVEN_BUILD_OPTS: "-Dbuild.tooling=true -Dbuild.af3=true -Dbuild.emf=true" MAVEN_TEST_OPTS: "-Dbuild.tests=true" + MAVEN_BUILD_DIR: "-Duser.dir=/builds/$CI_PROJECT_PATH" -before_script: - cache: + key: Default paths: - .m2/repository/ - - target/ build: stage: build + cache: + key: Default before_script: - - git submodule update --remote --recursive --init + - git submodule update $GIT_SUBMODULE_OPTS script: - mvn $MAVEN_CLI_OPTS $MAVEN_BUILD_OPTS verify artifacts: paths: - releng/org.fortiss.af3.update/target/repository/ - releng/org.fortiss.tooling.update/target/repository/ + - products/af3/org.fortiss.af3.phoenix.product/target/extraArtifacts/ test: stage: test + cache: + key: Default before_script: - - git submodule update --remote --recursive --init - #- git submodule update --remote --recursive --init releng/org.fortiss.af3.target - #- git submodule update --remote --recursive --init tests/af3 + - git submodule update $GIT_SUBMODULE_OPTS + - xvfb.sh # Setup of a virtual display needed for bringing up eclipse script: - - mvn $MAVEN_CLI_OPTS $MAVEN_TEST_OPTS -Duser.dir=/builds/$CI_PROJECT_PATH integration-test - artifacts: - paths: - - tests/af3/org.fortiss.af3.phoenix.product.tests/target/work/data/.metadata/.log + - mvn $MAVEN_CLI_OPTS $MAVEN_TEST_OPTS $MAVEN_BUILD_DIR integration-test