You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@community.apache.org by se...@apache.org on 2023/04/26 13:00:34 UTC

[comdev-site] branch preview/test3 updated: Start with empty staging repo

This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch preview/test3
in repository https://gitbox.apache.org/repos/asf/comdev-site.git


The following commit(s) were added to refs/heads/preview/test3 by this push:
     new 04dbab2  Start with empty staging repo
04dbab2 is described below

commit 04dbab2ed8da72b9c4e3900d220646e192c0dedd
Author: Sebb <se...@apache.org>
AuthorDate: Wed Apr 26 13:58:51 2023 +0100

    Start with empty staging repo
---
 Jenkinsfile | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 3a3bd8d..3e39f86 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -87,8 +87,12 @@ pipeline {
                 script {
                     // Checkout branch with generated content
                     sh """
-                        git checkout ${DEPLOY_BRANCH} || git checkout -b ${DEPLOY_BRANCH}
-                        git pull origin ${DEPLOY_BRANCH} || echo "branch ${DEPLOY_BRANCH} is new"
+                        git checkout ${DEPLOY_BRANCH} || {
+                          echo "branch ${DEPLOY_BRANCH} is new"
+                          git checkout -b ${DEPLOY_BRANCH} --orphan
+                          git checkout ${BRANCH_NAME} -- .asf.yaml -f && git add .asf.yaml -f
+                        }
+                        git pull origin ${DEPLOY_BRANCH}
                     """
                     
                     // Remove the content of the target branch and replace it with the content of the temp folder