Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Maven
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SmartDataLab
public
CI-CD components
Maven
Commits
212b7924
Commit
212b7924
authored
3 years ago
by
Pierre Smeyers
Browse files
Options
Downloads
Patches
Plain Diff
chore: use workflow rules
parent
124762bc
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
templates/gitlab-ci-maven.yml
+8
-18
8 additions, 18 deletions
templates/gitlab-ci-maven.yml
with
8 additions
and
18 deletions
templates/gitlab-ci-maven.yml
+
8
−
18
View file @
212b7924
...
...
@@ -13,6 +13,14 @@
# program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
# Floor, Boston, MA 02110-1301, USA.
# =========================================================================================
# default workflow rules
workflow
:
rules
:
# exclude merge requests
-
if
:
$CI_MERGE_REQUEST_ID
when
:
never
-
when
:
always
variables
:
# variabilized tracking image
TBC_TRACKING_IMAGE
:
"
$CI_REGISTRY/to-be-continuous/tools/tracking:master"
...
...
@@ -463,9 +471,6 @@ mvn-build:
-
"
${MAVEN_PROJECT_DIR}/**/target/*-reports/TEST-*.xml"
paths
:
-
"
${MAVEN_PROJECT_DIR}/**/target"
rules
:
# exclude merge requests
-
if
:
'
$CI_MERGE_REQUEST_ID
==
null'
# Sonar job
mvn-sonar
:
...
...
@@ -481,9 +486,6 @@ mvn-sonar:
-
mvn ${TRACE+-Dsonar.verbose=true} $MAVEN_CLI_OPTS $mvn_settings_opt $java_proxy_args ${SONAR_AUTH_TOKEN+-Dsonar.login=$SONAR_AUTH_TOKEN} ${SONAR_LOGIN+-Dsonar.login=$SONAR_LOGIN} ${SONAR_PASSWORD+-Dsonar.password=$SONAR_PASSWORD} $SONAR_BASE_ARGS $sonar_extra_args $sonar_mr_args
-
if [[ "$SONAR_QUALITY_GATE_ENABLED" == "true" ]]; then sonar_quality_gate_check; fi
rules
:
# exclude merge requests
-
if
:
$CI_MERGE_REQUEST_ID
when
:
never
# exclude if $SONAR_URL not set
-
if
:
'
$SONAR_URL
==
null
||
$SONAR_URL
==
""'
when
:
never
...
...
@@ -506,9 +508,6 @@ mvn-dependency-check:
script
:
-
mvn ${TRACE+-X} $MAVEN_CLI_OPTS $mvn_settings_opt $java_proxy_args $MAVEN_DEPENDENCY_CHECK_ARGS
rules
:
# exclude merge requests
-
if
:
$CI_MERGE_REQUEST_ID
when
:
never
# on schedule: auto
-
if
:
'
$CI_PIPELINE_SOURCE
==
"schedule"'
allow_failure
:
true
...
...
@@ -529,9 +528,6 @@ mvn-forbid-snapshot-dependencies:
script
:
-
mvn ${TRACE+-X} $MAVEN_CLI_OPTS $mvn_settings_opt $java_proxy_args org.apache.maven.plugins:maven-enforcer-plugin:3.0.0:enforce -Drules=requireReleaseDeps
rules
:
# exclude merge requests
-
if
:
$CI_MERGE_REQUEST_ID
when
:
never
# exclude if disabled
-
if
:
'
$MVN_FORBID_SNAPSHOT_DEPENDENCIES_DISABLED
==
"true"'
when
:
never
...
...
@@ -546,9 +542,6 @@ mvn-snapshot:
script
:
-
perform_snapshot
rules
:
# exclude merge requests
-
if
:
$CI_MERGE_REQUEST_ID
when
:
never
# on tags: never
-
if
:
$CI_COMMIT_TAG
when
:
never
...
...
@@ -584,9 +577,6 @@ mvn-release:
fi
-
mvn ${TRACE+-X} $MAVEN_CLI_OPTS $mvn_settings_opt $java_proxy_args $scm_auth_args ${MAVEN_RELEASE_ARGS} ${semrel_args} -DscmCommentPrefix="$MAVEN_RELEASE_SCM_COMMENT_PREFIX"
rules
:
# exclude merge requests
-
if
:
$CI_MERGE_REQUEST_ID
when
:
never
# on production branch(es): manual & non-blocking if $MAVEN_DEPLOY_ENABLED is set
-
if
:
'
$MAVEN_DEPLOY_ENABLED
==
"true"
&&
$CI_COMMIT_REF_NAME
=~
$PROD_REF'
when
:
manual
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment