diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2489784512257dd44acb678bd0d75f5d0b6f4928..478478a197dacec2acd078d9430c3f32fcc27d98 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,41 +1,64 @@ # Define templates include: - project: 'gazelle/private/gitlab-ci-templates' - file: 'extends.yaml' - ref: 'master' + file: 'extends-v2.yaml' + ref: '1.0.0' # Define stages stages: - build - - postbuild + - predeploy - deploy - - tests + - test + - publish - release - upgrade - - cleanup + - clean # Define global variables variables: P_NAME: "gazelle-tm-tools" - P_APP_TYPE: "java" P_CODE_SRC_PATH: "." - P_MAVEN_IMAGE_TAG: "3.6.3-jdk-8" - POSTGRES_DB: "gazelle-junit" - POSTGRES_USER: "gazelle" - POSTGRES_PASSWORD: "gazelle" + P_APP_TYPE: "java" + P_MAVEN_IMAGE_TAG: "3.6.3-jdk-8-slim" # Define jobs -code: +compile/unit-test: stage: build extends: - - .buildCodeForJavaWithPostgresql + - .buildJavaMavenTest + +package: + stage: build + extends: + - .buildJavaMavenPackage + needs: + - job: compile/unit-test + artifacts: true + variables: + P_MAVEN_EXTRA_ARGS: "-DskipTests" + +static-analysis: + stage: test + extends: + - .testJavaMavenSonarAnalysis + needs: + - job: compile/unit-test + artifacts: true + variables: + P_MAVEN_EXTRA_ARGS: "-Psonar -DskipTests" -quality: - stage: tests +install-cache-repo: + stage: publish extends: - - .testQualityForJavaWithSonarqube + - .publishJavaMavenInstall + needs: + - job: package + artifacts: false + variables: + P_MAVEN_EXTRA_ARGS: "-DskipTests" release/code: stage: release extends: - - .releaseCodeForJavaWithPostgresql + - .releaseCodeForJava diff --git a/pom.xml b/pom.xml index 5318b036e549a15b90f683d9a3bec9fb28ad2980..3e9ab67e005b123c6281ba94071bbb85de92da4d 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,6 @@ </git.project.url> <maven.release.plugin.version>2.5.3</maven.release.plugin.version> <nexus.staging.maven.plugin.version>1.6.8</nexus.staging.maven.plugin.version> - <sonar.maven.plugin>3.7.0.1746</sonar.maven.plugin> <jacoco.version>0.8.1</jacoco.version> <skipTests>false</skipTests> <hapi.version>2.2</hapi.version> @@ -104,11 +103,6 @@ </execution> </executions> </plugin> - <plugin> - <groupId>org.sonarsource.scanner.maven</groupId> - <artifactId>sonar-maven-plugin</artifactId> - <version>${sonar.maven.plugin}</version> - </plugin> </plugins> <resources> <resource>