Skip to content

Commit 38c1c9b

Browse files
authored
ci: use stable branch instead tags (#1771)
* ci: use latest branch instead tags * Create branch if it does not exist * chore: for testing purposes * Revert "chore: for testing purposes" This reverts commit 2310c66. * Exclude the branch from the MBP * Use stable instead latest
1 parent 04d1fe3 commit 38c1c9b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.ci/jobs/apm-agent-java-mbp.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
discover-pr-forks-trust: permission
1414
discover-pr-origin: merge-current
1515
discover-tags: true
16+
head-filter-regex: '^(?!stable).*$'
1617
notification-context: 'apm-ci'
1718
repo: apm-agent-java
1819
repo-owner: elastic

Jenkinsfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,11 @@ pipeline {
315315
dir("${BASE_DIR}"){
316316
setupAPMGitEmail(global: false)
317317
sh(label: "checkout ${BRANCH_NAME} branch", script: "git checkout -f '${BRANCH_NAME}'")
318-
gitCreateTag(tag: 'stable', tagArgs: '--force', pushArgs: '--force')
318+
sh(label: 'rebase stable', script: """
319+
git rev-parse --quiet --verify stable && git checkout stable || git checkout -b stable
320+
git rebase '${BRANCH_NAME}'
321+
""")
322+
gitPush()
319323
}
320324
}
321325
}

0 commit comments

Comments
 (0)