From 0364637b0d6194864500654932bb3a92ff9bd5b9 Mon Sep 17 00:00:00 2001 From: Timo Beller Date: Mon, 18 Jul 2022 23:41:17 +0200 Subject: [PATCH 1/5] =?UTF-8?q?refactor(cache):=20L=C3=B6se=20globalen-Cac?= =?UTF-8?q?he=20aus=20common-ci-variablen=20heraus?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Für nutzer ist es unerwartet und ggf. unerwünscht, dass beim Einbinden von Variablen ein Cache mitkommt. --- templates/common/common-ci-cache.gitlab-ci.yml | 12 ++++++++++++ templates/common/common-ci-variablen.gitlab-ci.yml | 14 -------------- 2 files changed, 12 insertions(+), 14 deletions(-) create mode 100644 templates/common/common-ci-cache.gitlab-ci.yml diff --git a/templates/common/common-ci-cache.gitlab-ci.yml b/templates/common/common-ci-cache.gitlab-ci.yml new file mode 100644 index 0000000..5ebc06b --- /dev/null +++ b/templates/common/common-ci-cache.gitlab-ci.yml @@ -0,0 +1,12 @@ +cache: + key: "$CI_JOB_NAME" + paths: + # Cache Maven + - .m2/repository + # Cache NPM + #- $FRONTEND_DIR/dist + # Cache Gradle + - .gradle + - '**/build' + - "**/target" + #- "**/node_modules" diff --git a/templates/common/common-ci-variablen.gitlab-ci.yml b/templates/common/common-ci-variablen.gitlab-ci.yml index 5aa84d3..da97c81 100644 --- a/templates/common/common-ci-variablen.gitlab-ci.yml +++ b/templates/common/common-ci-variablen.gitlab-ci.yml @@ -1,17 +1,3 @@ -cache: - key: "$CI_JOB_NAME" - paths: - # Cache Maven - - .m2/repository - # Cache NPM - #- $FRONTEND_DIR/dist - # Cache Gradle - - .gradle - - '**/build' - - "**/target" - #- "**/node_modules" - - variables: ##NPM / Node Settings From 3ab16b899790fa4dae5a6a718a2fd93c08dee18d Mon Sep 17 00:00:00 2001 From: Timo Beller Date: Mon, 18 Jul 2022 23:42:25 +0200 Subject: [PATCH 2/5] =?UTF-8?q?fix(sonar8):=20F=C3=BCge=20gradles=20build-?= =?UTF-8?q?Verzeichnis=20zur=20Sonar-Ausnahmeliste=20hinzu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/static-analysis/sonar-8.gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/static-analysis/sonar-8.gitlab-ci.yml b/templates/static-analysis/sonar-8.gitlab-ci.yml index 2de11fc..790798b 100644 --- a/templates/static-analysis/sonar-8.gitlab-ci.yml +++ b/templates/static-analysis/sonar-8.gitlab-ci.yml @@ -4,7 +4,7 @@ SONAR_HOST_URL: https://sonar.exxcellent.de/sonar8 SONAR_PROJECT_KEY: "" SONAR_PROJECT_NAME: "" - SONAR_EXCLUSIONS: "**/target/**,**/src/test/**" + SONAR_EXCLUSIONS: "**/target/**,**/build/**,**/src/test/**" SONAR_QUALITYGATE_WAIT: "true" SONAR_QUALITYGATE_TIMEOUT: "10000" From 15d8ad7fd84024f5951d67943502f38cd6039752 Mon Sep 17 00:00:00 2001 From: Timo Beller Date: Tue, 19 Jul 2022 09:52:20 +0200 Subject: [PATCH 3/5] feat(gralde): Gradle-Parameter etwas einheitlicher --- templates/container/container-build.gitlab-ci.yml | 2 +- templates/java/gradle/gradle-build.gitlab-ci.yml | 2 +- templates/java/gradle/gradle-database-diff.gitlab-ci.yml | 2 +- templates/java/gradle/gradle-license.gitlab-ci.yml | 2 +- templates/java/gradle/gradle-verify.gitlab-ci.yml | 2 +- templates/static-analysis/sonar-7.gitlab-ci.yml | 2 +- templates/static-analysis/sonar-8.gitlab-ci.yml | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/templates/container/container-build.gitlab-ci.yml b/templates/container/container-build.gitlab-ci.yml index faa3c10..5540863 100644 --- a/templates/container/container-build.gitlab-ci.yml +++ b/templates/container/container-build.gitlab-ci.yml @@ -27,7 +27,7 @@ if [ "$CONTEXT_LOCATION" != "" ]; then cd $CONTEXT_LOCATION fi - - ./gradlew $GRADLE_CLI_OPTS jibBuildTar -DskipTests -Djib.outputPaths.tar=$CI_PROJECT_DIR/image.tar $EXTRA_ARGS + - ./gradlew --build-cache $GRADLE_OPTS $GRADLE_CLI_OPTS jibBuildTar -DskipTests -Djib.outputPaths.tar=$CI_PROJECT_DIR/image.tar $EXTRA_ARGS .container-build-kaniko: extends: .container-build-common diff --git a/templates/java/gradle/gradle-build.gitlab-ci.yml b/templates/java/gradle/gradle-build.gitlab-ci.yml index f44eaca..2136fe2 100644 --- a/templates/java/gradle/gradle-build.gitlab-ci.yml +++ b/templates/java/gradle/gradle-build.gitlab-ci.yml @@ -13,7 +13,7 @@ $(sed -i /^version/s/$GRADLE_VERSION/\'$CI_COMMIT_TAG\'/ $PATH_TO_VERSION_FILE) fi script: - - "./gradlew --build-cache assemble $GRADLE_CLI_BUILD_OPTS $GRADLE_CLI_OPTS $GRADLE_EXTRA_OPTS" + - ./gradlew --build-cache $GRADLE_OPTS assemble $GRADLE_CLI_BUILD_OPTS $GRADLE_CLI_OPTS $GRADLE_EXTRA_OPTS artifacts: expire_in: 2 weeks when: on_success diff --git a/templates/java/gradle/gradle-database-diff.gitlab-ci.yml b/templates/java/gradle/gradle-database-diff.gitlab-ci.yml index 7ff8847..d355d85 100644 --- a/templates/java/gradle/gradle-database-diff.gitlab-ci.yml +++ b/templates/java/gradle/gradle-database-diff.gitlab-ci.yml @@ -13,7 +13,7 @@ include: if [ "$BACKEND_DIR" != "" ]; then cd $BACKEND_DIR fi - - ./gradlew liquibase:update liquibase:diff $GRADLE_CLI_OPTS $GRADLE_EXTRA_OPTS + - ./gradlew --build-cache $GRADLE_OPTS liquibase:update liquibase:diff $GRADLE_CLI_OPTS $GRADLE_EXTRA_OPTS artifacts: when: on_failure expire_in: 2 weeks diff --git a/templates/java/gradle/gradle-license.gitlab-ci.yml b/templates/java/gradle/gradle-license.gitlab-ci.yml index 2f324e9..df76522 100644 --- a/templates/java/gradle/gradle-license.gitlab-ci.yml +++ b/templates/java/gradle/gradle-license.gitlab-ci.yml @@ -6,7 +6,7 @@ if [ "$BACKEND_DIR" != "" ]; then cd $BACKEND_DIR fi - - "./gradlew --build-cache cyclonedxBom $GRADLE_CLI_OPTS $GRADLE_EXTRA_OPTS" + - ./gradlew --build-cache $GRADLE_OPTS cyclonedxBom $GRADLE_CLI_OPTS $GRADLE_EXTRA_OPTS needs: [] artifacts: expire_in: 2 weeks diff --git a/templates/java/gradle/gradle-verify.gitlab-ci.yml b/templates/java/gradle/gradle-verify.gitlab-ci.yml index 29abf58..bedfe43 100644 --- a/templates/java/gradle/gradle-verify.gitlab-ci.yml +++ b/templates/java/gradle/gradle-verify.gitlab-ci.yml @@ -6,7 +6,7 @@ if [ "$BACKEND_DIR" != "" ]; then cd $BACKEND_DIR fi - - "./gradlew --build-cache test $GRADLE_CLI_OPTS $GRADLE_EXTRA_OPTS" + - ./gradlew --build-cache $GRADLE_OPTS test $GRADLE_CLI_OPTS $GRADLE_EXTRA_OPTS artifacts: expire_in: 2 weeks reports: diff --git a/templates/static-analysis/sonar-7.gitlab-ci.yml b/templates/static-analysis/sonar-7.gitlab-ci.yml index a6e87da..dba3535 100644 --- a/templates/static-analysis/sonar-7.gitlab-ci.yml +++ b/templates/static-analysis/sonar-7.gitlab-ci.yml @@ -35,7 +35,7 @@ if [ "$BACKEND_DIR" != "" ]; then cd $BACKEND_DIR fi - - ./gradlew $GRADLE_OPTS sonarqube $GRADLE_CLI_OPTS + - ./gradlew --build-cache $GRADLE_OPTS sonarqube $GRADLE_CLI_OPTS $GRADLE_EXTRA_OPTS "-Dsonar.host.url=$SONAR_HOST_URL" "-Dsonar.login=$SONAR_TOKEN" "-Dsonar.projectKey=$SONAR_PROJECT_KEY" diff --git a/templates/static-analysis/sonar-8.gitlab-ci.yml b/templates/static-analysis/sonar-8.gitlab-ci.yml index 790798b..5b5bcc8 100644 --- a/templates/static-analysis/sonar-8.gitlab-ci.yml +++ b/templates/static-analysis/sonar-8.gitlab-ci.yml @@ -36,7 +36,7 @@ if [ "$BACKEND_DIR" != "" ]; then cd $BACKEND_DIR fi - - ./gradlew $GRADLE_OPTS sonarqube $GRADLE_CLI_OPTS + - ./gradlew --build-cache $GRADLE_OPTS sonarqube $GRADLE_CLI_OPTS $GRADLE_EXTRA_OPTS "-Dsonar.host.url=$SONAR_HOST_URL" "-Dsonar.login=$SONAR_TOKEN" "-Dsonar.projectKey=$SONAR_PROJECT_KEY" From ff77a881689a828b828a324bf170f1fec11c55f2 Mon Sep 17 00:00:00 2001 From: Timo Beller Date: Tue, 19 Jul 2022 09:54:18 +0200 Subject: [PATCH 4/5] docs(typos): Fix ein paar Typos --- .../pipelines/eXXcellent-release.adoc | 6 +++--- .../templates/container/container-build.adoc | 14 ++++++------- .../java/gradle/gradle-build-template.adoc | 2 +- .../java/gradle/gradle-db-diff-template.adoc | 2 +- .../java/gradle/gradle-test-template.adoc | 4 ++-- .../java/maven/maven-db-diff-template.adoc | 2 +- .../java/maven/maven-verify-template.adoc | 4 ++-- documentation/document.adoc | 20 +++++++++---------- documentation/generalInformation.adoc | 6 +++--- 9 files changed, 30 insertions(+), 30 deletions(-) diff --git a/documentation/chapters/pipelines/eXXcellent-release.adoc b/documentation/chapters/pipelines/eXXcellent-release.adoc index 48f0653..0123ad3 100644 --- a/documentation/chapters/pipelines/eXXcellent-release.adoc +++ b/documentation/chapters/pipelines/eXXcellent-release.adoc @@ -16,11 +16,11 @@ The main-pipeline provides infrastructure to create Gitlab-releases and the trig The child pipeline is meant to create a new git tag with an increased Version. When executed on it also creates a new Release Branch. -You can easily extend the child pipeline to publish Artefacts. -Although this is possible we recommend using tagged pipelines to publish Artefacts. +You can easily extend the child pipeline to publish artifacts. +Although this is possible we recommend using tagged pipelines to publish artifacts. Tagged pipelines have the benefit that your pipelines are linked to a tag. This makes publishing out of order or hotfixes simpler. -Since you do not relly on prior CI artefacts. +Since you do not relly on prior CI artifacts. == Overview diagram diff --git a/documentation/chapters/templates/container/container-build.adoc b/documentation/chapters/templates/container/container-build.adoc index 0cb8804..0bc25d2 100644 --- a/documentation/chapters/templates/container/container-build.adoc +++ b/documentation/chapters/templates/container/container-build.adoc @@ -4,15 +4,15 @@ .Provided Templates: |=== |Name |Description -| .container-build-jib-maven | Baut Container mit dem Jib Plugin für Maven -| .container-build-jib-gradle | Baut Container mit dem Jib Plugin für Gradle -| .container-build-kaniko | Baut Container mit dem Kaniko +| .container-build-jib-maven | Builds the container with the Jib plugin for maven +| .container-build-jib-gradle | Builds the container with the Jib plugin for gradle +| .container-build-kaniko | Builds the container with Kaniko |=== Allows the simple building of Container Images. We use Kaniko because it is faster than Docker builds and has less security problems. -The generated image will be passed as a Tar-Artefact between stages. -This allows us to make forder manipulations and scan jobs on one container Image. +The generated image will be passed as a tar-artifact between stages. +This allows us to make further manipulations and scan jobs on the container image. The template <<_container_publish>> allows you to publish the build image to a registry. @@ -21,7 +21,7 @@ The template <<_container_publish>> allows you to publish the build image to a r |Name |Description | Default Value |CONTEXT_LOCATION -| Defines the context of the container build. In case of jib this Path should point to the location of your Gradle/Maven projects. +| Defines the context of the container build. In case of jib, this path should point to the location of your Gradle/Maven projects. | $CI_PROJECT_DIR | EXTRA_ARGS @@ -35,7 +35,7 @@ The template <<_container_publish>> allows you to publish the build image to a r | $CI_PROJECT_DIR/Dockerfile | REGISTRY_MIRROR -| Define the container Mirror that should be used +| Define the container mirror that should be used | exxcellent Nexus |=== diff --git a/documentation/chapters/templates/java/gradle/gradle-build-template.adoc b/documentation/chapters/templates/java/gradle/gradle-build-template.adoc index 39f4e78..de86819 100644 --- a/documentation/chapters/templates/java/gradle/gradle-build-template.adoc +++ b/documentation/chapters/templates/java/gradle/gradle-build-template.adoc @@ -3,7 +3,7 @@ This template resolves the gradle dependencies of your project and builds the project. The result will be cached when you include the common CI variables. -The resulting build files will be published as artefacts. +The resulting build files will be published as artifacts. .Variables |=== diff --git a/documentation/chapters/templates/java/gradle/gradle-db-diff-template.adoc b/documentation/chapters/templates/java/gradle/gradle-db-diff-template.adoc index e0a0859..f805908 100644 --- a/documentation/chapters/templates/java/gradle/gradle-db-diff-template.adoc +++ b/documentation/chapters/templates/java/gradle/gradle-db-diff-template.adoc @@ -15,7 +15,7 @@ Use the alias field in the service definition to define the address for the for |=== |Name |Description | Default Value |GRADLE_CLI_OPTS | Additional options send to gradle | "" -| PATH_TO_DIFF | Path to the resulting diff is defined in gradle config, this will also be exposed as the artefact of the Job. | "build/db-diff.xml" +| PATH_TO_DIFF | Path to the resulting diff is defined in gradle config, this will also be exposed as the artifact of the Job. | "build/db-diff.xml" |=== :template: java/gradle/gradle-database-diff.gitlab-ci.yml diff --git a/documentation/chapters/templates/java/gradle/gradle-test-template.adoc b/documentation/chapters/templates/java/gradle/gradle-test-template.adoc index 61aa35c..844f04e 100644 --- a/documentation/chapters/templates/java/gradle/gradle-test-template.adoc +++ b/documentation/chapters/templates/java/gradle/gradle-test-template.adoc @@ -4,9 +4,9 @@ endif::[] = Gradle Database Diff -These templates starts `gradle test` and saves the results as Artifacts. +These templates starts `gradle test` and saves the results as artifacts. -When Junit Reports are generated they will be published as Artefacts within the Pipelines. +When Junit Reports are generated they will be published as artifacts within the Pipelines. You can get a detailed view when clicking on Tests. For more information look into the official https://docs.gitlab.com/ee/ci/unit_test_reports.html[Documentation]. diff --git a/documentation/chapters/templates/java/maven/maven-db-diff-template.adoc b/documentation/chapters/templates/java/maven/maven-db-diff-template.adoc index 5337cda..80d8b32 100644 --- a/documentation/chapters/templates/java/maven/maven-db-diff-template.adoc +++ b/documentation/chapters/templates/java/maven/maven-db-diff-template.adoc @@ -9,7 +9,7 @@ Please look at the resulting changelog since it can have errors. |Name |Description | Default Value | PATH_TO_DIFF -| Path to the resulting diff is defined in gradle config, this will also be exposed as the artefact of the Job. +| Path to the resulting diff is defined in gradle config, this will also be exposed as the artifact of the Job. | "target/db-diff.xml" |MAVEN_CLI_OPTS | Additional Options that will be passed to Maven | "" diff --git a/documentation/chapters/templates/java/maven/maven-verify-template.adoc b/documentation/chapters/templates/java/maven/maven-verify-template.adoc index fcafeb8..0dcb82c 100644 --- a/documentation/chapters/templates/java/maven/maven-verify-template.adoc +++ b/documentation/chapters/templates/java/maven/maven-verify-template.adoc @@ -4,9 +4,9 @@ endif::[] = Maven verify template -This templates starts `mvn verify` and saves the results as Artifacts. +This templates starts `mvn verify` and saves the results as artifacts. -When Junit Reports are generated they will be published as Artefacts within the Pipelines. +When Junit Reports are generated they will be published as artifacts within the Pipelines. You can get a detailed view when clicking on Tests. For more information look into the official https://docs.gitlab.com/ee/ci/unit_test_reports.html[Documentation]. diff --git a/documentation/document.adoc b/documentation/document.adoc index 660157e..d050990 100644 --- a/documentation/document.adoc +++ b/documentation/document.adoc @@ -52,18 +52,18 @@ include::chapters/templates/IaC/ssh-transfer-data.adoc[leveloffset=2] == Container Templates We have optimised building container within our templates a lot. -We found divide building and releasing containers into different jobs to be the fastest way to build container artefacts. +We found divide building and releasing containers into different jobs to be the fastest way to build container artifacts. Because you can build your container while executing other verify stages. Publishing containers is a very cheap operation. -The following graph charts shows thru which stages containers will go and which artefakts will be passed between stages. +The following graph charts shows through which stages containers will go and which artifacts will be passed between stages. [mermaid] .... flowchart LR subgraph Build Stage - build_src(Source Code Build) -- Needs Source artefacts --> build_c + build_src(Source Code Build) -- Needs Source artifacts --> build_c build_c(Container-Build) end @@ -84,9 +84,9 @@ include::chapters/templates/container/docker-in-docker.adoc[leveloffset=2] == Releasing Templates -The following Templates provide an simpler integration into the https://gitlab.exxcellent.de/gilden/ci/exxcellent-increase-version-tool[Increase-Version-Tool] of the CI-Gilde. -We also provide finished Pipelines in our <<_pipelines>> section. -We highly recommend using those Pipelines since this is our reference Implementation. +The following templates provide a simpler integration into the https://gitlab.exxcellent.de/gilden/ci/exxcellent-increase-version-tool[Increase-Version-Tool] of the CI-Gilde. +We also provide finished pipelines in our <<_pipelines>> section. +We highly recommend using those pipelines since this is our reference implementation. include::chapters/templates/releasing/push-tag-and-version-template.adoc[leveloffset=3] include::chapters/templates/releasing/set-version-template.adoc[leveloffset=3] @@ -115,7 +115,7 @@ include::chapters/templates/java/maven/maven-db-diff-template.adoc[leveloffset=2 == Gradle Templates Our collection of Gradle Templates. -Currently, we start our Templates from the Gradle Wrapper within your Projekt. +Currently, we start our templates from the gradle wrapper within your project. If you do not have a wrapper you can create on with the command `gradle wrapper`. Please keep in mind updating the wrapper from time to time. We recommend using https://www.exxcellent.de/confluence/x/S4WCC[Renovate] for this task. @@ -126,7 +126,7 @@ include::chapters/templates/java/gradle/gradle-db-diff-template.adoc[leveloffset == Static Analysis -With the following collection we provide Static code and Artefact analysis tools. +With the following collection we provide static code and artifact analysis tools. include::chapters/templates/static-analysis/repo-cve-scan.adoc[leveloffset=2] include::chapters/templates/static-analysis/sonar-7.adoc[leveloffset=2] @@ -134,13 +134,13 @@ include::chapters/templates/static-analysis/sonar-8.adoc[leveloffset=2] == Documentation -This collection provides templates to simplify your dokumentation prozess. +This collection provides templates to simplify your documentation process. include::chapters/templates/documentation/documentation.adoc[leveloffset=2] == Licensing -This collection provides templates to simplify your licencing prozess. +This collection provides templates to simplify your licencing process. include::chapters/templates/license/license.gitlab-ci.adoc[leveloffset=2] include::chapters/templates/java/gradle/gradle-license.gitlab-ci.adoc[leveloffset=2] diff --git a/documentation/generalInformation.adoc b/documentation/generalInformation.adoc index 876e8cb..7b276dd 100644 --- a/documentation/generalInformation.adoc +++ b/documentation/generalInformation.adoc @@ -19,8 +19,8 @@ flowchart LR Jobs within this stage are loading all needed Dependencies. This is done for better cache management of Dependencies. === Build - build -Jobs within this stage, build all needed artefacts that you need in later stages and for releasing. -In case you need to build multiple artefacts execute following jobs as soon as needed artefacts are build. +Jobs within this stage, build all needed artifacts that you need in later stages and for releasing. +In case you need to build multiple artifacts execute following jobs as soon as needed artifacts are build. Look into Gitlabs https://docs.gitlab.com/ee/ci/yaml/#needs[Needs Documentation]. === Verify - verify @@ -32,7 +32,7 @@ Verify and Test as much as you can in these Jobs. Jobs within this stage build and publish your documentation. === Release - release -Jobs within this stage publish your artefacts or automate creating Tags. +Jobs within this stage publish your artifacts or automate creating Tags. For more information look into <<_pipeline_release>> == About Templates and Pipelines From dcc7966a001ef17ad448989a4ee94d5aae0a1421 Mon Sep 17 00:00:00 2001 From: Timo Beller Date: Wed, 20 Jul 2022 17:53:13 +0200 Subject: [PATCH 5/5] feat(npm): Mache before_script frei --- templates/npm/npm-build.gitlab-ci.yml | 3 +-- templates/npm/npm-dependencies.gitlab-ci.yml | 3 +-- templates/npm/npm-e2e.gitlab-ci.yml | 3 +-- templates/npm/npm-lint.gitlab-ci.yml | 3 +-- templates/npm/npm-verify.gitlab-ci.yml | 3 +-- 5 files changed, 5 insertions(+), 10 deletions(-) diff --git a/templates/npm/npm-build.gitlab-ci.yml b/templates/npm/npm-build.gitlab-ci.yml index 8cad713..b59abc8 100644 --- a/templates/npm/npm-build.gitlab-ci.yml +++ b/templates/npm/npm-build.gitlab-ci.yml @@ -3,12 +3,11 @@ stage: build variables: FRONTEND_BUILD_DIR: '**/dist' - before_script: + script: - > if [ "$FRONTEND_DIR" != "" ]; then cd $FRONTEND_DIR fi - script: - npm run ci:build artifacts: expire_in: 2 weeks diff --git a/templates/npm/npm-dependencies.gitlab-ci.yml b/templates/npm/npm-dependencies.gitlab-ci.yml index ea0960a..2215899 100644 --- a/templates/npm/npm-dependencies.gitlab-ci.yml +++ b/templates/npm/npm-dependencies.gitlab-ci.yml @@ -1,12 +1,11 @@ .npm-dependencies: image: $NODE_IMAGE stage: dependencies - before_script: + script: - > if [ "$FRONTEND_DIR" != "" ]; then cd $FRONTEND_DIR fi - script: - npm ci --no-audit artifacts: expire_in: 1 days diff --git a/templates/npm/npm-e2e.gitlab-ci.yml b/templates/npm/npm-e2e.gitlab-ci.yml index 28b3637..b40cede 100644 --- a/templates/npm/npm-e2e.gitlab-ci.yml +++ b/templates/npm/npm-e2e.gitlab-ci.yml @@ -1,12 +1,11 @@ .npm-e2e: image: $NODE_E2E_IMAGE stage: verify - before_script: + script: - > if [ "$FRONTEND_DIR" != "" ]; then cd $FRONTEND_DIR fi - script: - npm run ci:e2e artifacts: expire_in: '7d' diff --git a/templates/npm/npm-lint.gitlab-ci.yml b/templates/npm/npm-lint.gitlab-ci.yml index 779444f..5edaee9 100644 --- a/templates/npm/npm-lint.gitlab-ci.yml +++ b/templates/npm/npm-lint.gitlab-ci.yml @@ -1,10 +1,9 @@ .npm-lint: image: $NODE_IMAGE stage: verify - before_script: + script: - > if [ "$FRONTEND_DIR" != "" ]; then cd $FRONTEND_DIR fi - script: - npm run ci:lint \ No newline at end of file diff --git a/templates/npm/npm-verify.gitlab-ci.yml b/templates/npm/npm-verify.gitlab-ci.yml index b85a433..6a9045b 100644 --- a/templates/npm/npm-verify.gitlab-ci.yml +++ b/templates/npm/npm-verify.gitlab-ci.yml @@ -1,12 +1,11 @@ .npm-verify: image: $NODE_IMAGE stage: verify - before_script: + script: - > if [ "$FRONTEND_DIR" != "" ]; then cd $FRONTEND_DIR fi - script: - npm run ci:test artifacts: expire_in: '7d'