chore(*): Move cd $Backend into script to free up before_script for user
This commit is contained in:
parent
ffab9bc5ee
commit
ba75e97d06
@ -8,11 +8,10 @@ include:
|
||||
variables:
|
||||
GRADLE_EXTRA_OPTS: ""
|
||||
PATH_TO_DIFF: "build/db-diff.xml"
|
||||
before_script:
|
||||
script:
|
||||
- >
|
||||
if [ "$BACKEND_DIR" != "" ]; then
|
||||
cd $BACKEND_DIR
|
||||
fi
|
||||
script:
|
||||
- ./gradlew liquibase:update liquibase:diff $GRADLE_CLI_OPTS $GRADLE_EXTRA_OPTS
|
||||
|
||||
|
||||
@ -1,12 +1,11 @@
|
||||
.gradle-licence-bom:
|
||||
image: $GRADLE_IMAGE
|
||||
stage: build
|
||||
before_script:
|
||||
script:
|
||||
- >
|
||||
if [ "$BACKEND_DIR" != "" ]; then
|
||||
cd $BACKEND_DIR
|
||||
fi
|
||||
script:
|
||||
- "./gradlew --build-cache cyclonedxBom $GRADLE_CLI_OPTS $GRADLE_EXTRA_OPTS"
|
||||
needs: []
|
||||
artifacts:
|
||||
|
||||
@ -1,12 +1,11 @@
|
||||
.gradle-verify:
|
||||
image: $GRADLE_IMAGE
|
||||
stage: verify
|
||||
before_script:
|
||||
script:
|
||||
- >
|
||||
if [ "$BACKEND_DIR" != "" ]; then
|
||||
cd $BACKEND_DIR
|
||||
fi
|
||||
script:
|
||||
- "./gradlew --build-cache test $GRADLE_CLI_OPTS $GRADLE_EXTRA_OPTS"
|
||||
artifacts:
|
||||
expire_in: 2 weeks
|
||||
|
||||
@ -8,12 +8,11 @@ include:
|
||||
variables:
|
||||
MAVEN_EXTRA_OPTS: ""
|
||||
PATH_TO_DIFF: "target/db-diff.xml"
|
||||
before_script:
|
||||
script:
|
||||
- >
|
||||
if [ "$BACKEND_DIR" != "" ]; then
|
||||
cd $BACKEND_DIR
|
||||
fi
|
||||
script:
|
||||
- mvn $MAVEN_CLI_OPTS $MAVEN_EXTRA_OPTS compile liquibase:update liquibase:diff $MVN_EXTRA_ARGS
|
||||
artifacts:
|
||||
when: on_failure
|
||||
|
||||
@ -1,10 +1,9 @@
|
||||
.maven-dependencies:
|
||||
stage: dependencies
|
||||
image: $MAVEN_IMAGE
|
||||
before_script:
|
||||
script:
|
||||
- >
|
||||
if [ "$BACKEND_DIR" != "" ]; then
|
||||
cd $BACKEND_DIR
|
||||
fi
|
||||
script:
|
||||
- mvn $MAVEN_CLI_OPTS $MAVEN_EXTRA_OPTS dependency:resolve $MVN_EXTRA_ARGS
|
||||
@ -1,12 +1,11 @@
|
||||
.maven-licence-bom:
|
||||
image: $MAVEN_IMAGE
|
||||
stage: build
|
||||
before_script:
|
||||
script:
|
||||
- >
|
||||
if [ "$BACKEND_DIR" != "" ]; then
|
||||
cd $BACKEND_DIR
|
||||
fi
|
||||
script:
|
||||
- mvn $MAVEN_CLI_OPTS $MAVEN_EXTRA_OPTS cyclonedx:makeBom $MVN_EXTRA_ARGS
|
||||
artifacts:
|
||||
when: always
|
||||
|
||||
@ -1,12 +1,11 @@
|
||||
.maven-verify:
|
||||
image: $MAVEN_IMAGE
|
||||
stage: verify
|
||||
before_script:
|
||||
script:
|
||||
- >
|
||||
if [ "$BACKEND_DIR" != "" ]; then
|
||||
cd $BACKEND_DIR
|
||||
fi
|
||||
script:
|
||||
- mvn $MAVEN_CLI_OPTS $MAVEN_EXTRA_OPTS verify $MVN_EXTRA_ARGS
|
||||
artifacts:
|
||||
expire_in: 2 weeks
|
||||
|
||||
@ -12,12 +12,11 @@
|
||||
.sonar-maven:
|
||||
extends: .sonar-template-common
|
||||
image: $MAVEN_IMAGE
|
||||
before_script:
|
||||
script:
|
||||
- >
|
||||
if [ "$BACKEND_DIR" != "" ]; then
|
||||
cd $BACKEND_DIR
|
||||
fi
|
||||
script:
|
||||
- mvn $MAVEN_CLI_OPTS test sonar:sonar $MVN_EXTRA_ARGS
|
||||
"-Dsonar.host.url=$SONAR_HOST_URL"
|
||||
"-Dsonar.login=$SONAR_TOKEN"
|
||||
@ -31,13 +30,12 @@
|
||||
.sonar-gradle:
|
||||
extends: .sonar-template-common
|
||||
image: $GRADLE_IMAGE
|
||||
before_script:
|
||||
script:
|
||||
- >
|
||||
if [ "$BACKEND_DIR" != "" ]; then
|
||||
cd $BACKEND_DIR
|
||||
fi
|
||||
script:
|
||||
- ./gradlew $GRADLE_OPTS $GRADLE_CLI_OPTS sonarqube
|
||||
- ./gradlew $GRADLE_OPTS sonarqube $GRADLE_CLI_OPTS
|
||||
"-Dsonar.host.url=$SONAR_HOST_URL"
|
||||
"-Dsonar.login=$SONAR_TOKEN"
|
||||
"-Dsonar.projectKey=$SONAR_PROJECT_KEY"
|
||||
|
||||
@ -11,12 +11,11 @@
|
||||
.sonar-maven:
|
||||
extends: .sonar-template-common
|
||||
image: $MAVEN_IMAGE
|
||||
before_script:
|
||||
script:
|
||||
- >
|
||||
if [ "$BACKEND_DIR" != "" ]; then
|
||||
cd $BACKEND_DIR
|
||||
fi
|
||||
script:
|
||||
- mvn $MAVEN_CLI_OPTS test sonar:sonar $MVN_EXTRA_ARGS
|
||||
"-Dsonar.host.url=$SONAR_HOST_URL"
|
||||
"-Dsonar.login=$SONAR_TOKEN"
|
||||
@ -29,12 +28,11 @@
|
||||
.sonar-gradle:
|
||||
extends: .sonar-template-common
|
||||
image: $GRADLE_IMAGE
|
||||
before_script:
|
||||
script:
|
||||
- >
|
||||
if [ "$BACKEND_DIR" != "" ]; then
|
||||
cd $BACKEND_DIR
|
||||
fi
|
||||
script:
|
||||
- ./gradlew $GRADLE_OPTS sonarqube $GRADLE_CLI_OPTS
|
||||
"-Dsonar.host.url=$SONAR_HOST_URL"
|
||||
"-Dsonar.login=$SONAR_TOKEN"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user