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
cc03aac2
Commit
cc03aac2
authored
1 year ago
by
Pierre Smeyers
Browse files
Options
Downloads
Patches
Plain Diff
refactor: use plugins shorthand
parent
93cd62b8
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
templates/gitlab-ci-maven.yml
+3
-3
3 additions, 3 deletions
templates/gitlab-ci-maven.yml
with
3 additions
and
3 deletions
templates/gitlab-ci-maven.yml
+
3
−
3
View file @
cc03aac2
...
...
@@ -187,7 +187,7 @@ stages:
git config --global user.email "${GITLAB_USER_EMAIL}"
git config --global user.name "${GITLAB_USER_NAME}"
# shellcheck disable=SC2086
scm_url=$(mvn $MAVEN_CLI_OPTS $mvn_settings_opt $java_proxy_args
org.apache.maven.plugins:maven-help-plugin:3.2.0
:evaluate -Dexpression=project.scm.developerConnection -q -DforceStdout | tail -n 1)
scm_url=$(mvn $MAVEN_CLI_OPTS $mvn_settings_opt $java_proxy_args
help
:evaluate -Dexpression=project.scm.developerConnection -q -DforceStdout | tail -n 1)
if [[ $scm_url == "scm:git:https"* ]]; then
if [[ -n "${GIT_USERNAME}" ]] && [[ -n "${GIT_PASSWORD}" ]]; then
log_info "--- using SCM credentials from env (\$GIT_USERNAME and \$GIT_PASSWORD)..."
...
...
@@ -382,7 +382,7 @@ stages:
function mvn_deploy() {
# shellcheck disable=SC2086
pom_version=$(mvn $MAVEN_CLI_OPTS $mvn_settings_opt $java_proxy_args
org.apache.maven.plugins:maven-help-plugin:3.2.0
:evaluate -Dexpression=project.version -q -DforceStdout | tail -n 1)
pom_version=$(mvn $MAVEN_CLI_OPTS $mvn_settings_opt $java_proxy_args
help
:evaluate -Dexpression=project.version -q -DforceStdout | tail -n 1)
if [[ "$CI_COMMIT_TAG" ]] && [[ "$pom_version" =~ -SNAPSHOT$ ]]
then
log_warn "Can't publish SNAPSHOT version \\e[33;1m${pom_version}\\e[0m from tag: skip"
...
...
@@ -506,7 +506,7 @@ mvn-no-snapshot-deps:
stage
:
test
needs
:
[]
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
-
mvn ${TRACE+-X} $MAVEN_CLI_OPTS $mvn_settings_opt $java_proxy_args
enforcer
:enforce -Drules=requireReleaseDeps
rules
:
# exclude if disabled
-
if
:
'
$MVN_FORBID_SNAPSHOT_DEPENDENCIES_DISABLED
==
"true"'
...
...
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