diff --git a/Jenkinsfile b/Jenkinsfile
index 4d21ab20..84cfa2aa 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -12,10 +12,6 @@ pipeline {
}
parameters {
- booleanParam(name: 'skipGitHubSite',
- description: 'If checked the plugin documentation on GitHub will NOT be updated',
- defaultValue: true)
-
string(name: 'engineListUrl',
description: 'Engine to use for build',
defaultValue: 'https://product.ivyteam.io')
@@ -27,11 +23,10 @@ pipeline {
script {
setupGPGEnvironment()
withCredentials([string(credentialsId: 'gpg.password', variable: 'GPG_PWD')]) {
- def phase = isReleaseOrMasterBranch() ? 'deploy site-deploy' : 'verify'
+ def phase = isReleaseOrMasterBranch() ? 'deploy' : 'verify'
maven cmd: "clean ${phase} " +
"-Dgpg.skip=false " +
"-Dgpg.project-build.password='${env.GPG_PWD}' " +
- "-Dgithub.site.skip=${params.skipGitHubSite} " +
"-Divy.engine.list.url=${params.engineListUrl} " +
"-Dmaven.test.failure.ignore=true"
}
@@ -39,6 +34,26 @@ pipeline {
}
}
}
+ stage('deploy-site') {
+ when {
+ expression { isReleaseOrMasterBranch() }
+ }
+ steps {
+ script {
+ withEnv(['GIT_SSH_COMMAND=ssh -o StrictHostKeyChecking=no']) {
+ sshagent(credentials: ['github-axonivy']) {
+ def branch = "pages_$BRANCH_NAME-$BUILD_NUMBER"
+ def message = "Update site (${env.BRANCH_NAME})"
+ sh """
+ git config --global user.name 'ivy-team'
+ git config --global user.email 'info@ivyteam.ch'
+ """
+ maven cmd: "site site:stage scm-publish:publish-scm"
+ }
+ }
+ }
+ }
+ }
}
}
diff --git a/build/release/Jenkinsfile b/build/release/Jenkinsfile
index 0a0f46af..690bbe90 100644
--- a/build/release/Jenkinsfile
+++ b/build/release/Jenkinsfile
@@ -41,6 +41,8 @@ pipeline {
sh "gh auth login --with-token < ${tokenFile}"
sh "gh pr create --title '${message}' --body '${message}' --head ${targetBranch} --base ${env.BRANCH_NAME}"
}
+ // publish site from 'mvn release' run
+ maven cmd: "site:stage scm-publish:publish-scm"
}
}
}
diff --git a/pom.xml b/pom.xml
index 0d1c8286..fd2aa964 100644
--- a/pom.xml
+++ b/pom.xml
@@ -49,7 +49,6 @@
Stable
true
UTF-8
- true
@@ -63,6 +62,10 @@
Sonatype Releases Repo
https://oss.sonatype.org/content/repositories/releases/
+
+ github
+ scm:git:git@github.com:axonivy/project-build-plugin.git
+
@@ -284,7 +287,10 @@
gh-pages.redirect.page
-
+
+
+
+
@@ -296,34 +302,12 @@
- com.github.github
- site-maven-plugin
- 0.12
-
-
- deploy.mojo.description.to.github
- site
- site-deploy
-
- update maven plugin mojo description
- ${site.path}/${pluginVersion.majorVersion}.${pluginVersion.minorVersion}
-
-
-
- deploy.site.redirect.to.github
- site
- site-deploy
-
- update maven plugin mojo redirect
- ${site.path}
- ${project.build.directory}/site-redirect
-
-
-
+ org.apache.maven.plugins
+ maven-scm-publish-plugin
+ 3.3.0
- github.ivy-team.oauth
- true
- ${github.site.skip}
+ gh-pages
+ true
@@ -349,7 +333,7 @@
v@{project.version}
release
- deploy site-deploy
+ deploy site