This is an automated email from the ASF dual-hosted git repository.
rlenferink pushed a commit to branch feature/gh-source-test
in repository https://gitbox.apache.org/repos/asf/celix-site.git
The following commit(s) were added to refs/heads/feature/gh-source-test by this
push:
new 46bb986 Test the way Apache Camel is building
46bb986 is described below
commit 46bb986077f079a9154edf13f73fee2aa46eb0c0
Author: Roy Lenferink <[email protected]>
AuthorDate: Sun Jul 16 12:41:01 2023 +0200
Test the way Apache Camel is building
---
Jenkinsfile | 54 ++++++++++++++++++++++++++++--------------------------
1 file changed, 28 insertions(+), 26 deletions(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index 63448a7..509cda3 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -65,32 +65,34 @@ pipeline {
stage('Deploy') {
steps {
script {
- // Checkout branch with generated content
- sh """
- git fetch --no-tags --progress -- ${REPO_URL}
+refs/heads/${DEPLOY_BRANCH}:refs/remotes/origin/${DEPLOY_BRANCH}
- git checkout -b ${DEPLOY_BRANCH}
origin/${DEPLOY_BRANCH}
- """
-
- // Remove the content of the target branch and replace it
with the content of the temp folder
- sh """
- rm -rf ${WORKSPACE}/content
- git rm -r --cached content/*
- mkdir -p ${WORKSPACE}/content
- cp -rT ${env.TMP_DIR}/* ${WORKSPACE}/content
- """
-
- // Commit the changes to the target branch
- env.COMMIT_MESSAGE = "Updated site from ${BRANCH_NAME}
(${env.LAST_SHA})"
- sh """
- git add -A
- git commit -m "${env.COMMIT_MESSAGE}" | true
- """
-
- // Push the generated content for deployment
- sh "git remote -v"
- sh "git branch -v"
- sh "git branch -a"
- sh "git push -u origin ${DEPLOY_BRANCH}"
+ env.GITBOX_REPO = sh(script:'mktemp -d', returnStdout:
true).trim()
+
+ // Clone the Gitbox repo because that allows deployment to
the asf-site branch
+ sh "git clone -b asf-site
https://gitbox.apache.org/repos/asf/celix-site.git ${env.GITBOX_REPO}"
+
+ dir("${env.GITBOX_REPO}") {
+ // Remove the content of the target branch and replace
it with the content of the temp folder
+ sh """
+ rm -rf ${env.GITBOX_REPO}/content
+ git rm -r --cached content/*
+ mkdir -p ${env.GITBOX_REPO}/content
+ cp -rT ${env.TMP_DIR}/* ${env.GITBOX_REPO}/content
+ """
+
+ // Commit the changes to the target branch
+ env.COMMIT_MESSAGE = "Updated site from ${BRANCH_NAME}
(${env.LAST_SHA})"
+ sh """
+ git add -A
+ git commit -m "${env.COMMIT_MESSAGE}" | true
+ """
+
+ // Push the generated content for deployment
+ sh "git remote -v"
+ sh "git branch -v"
+ sh "git branch -a"
+ //sh "git push -u origin ${DEPLOY_BRANCH}"
+ }
+ sh "rm -rf ${env.GITBOX_REPO}"
}
}
}