This is an automated email from the ASF dual-hosted git repository.
lukaszlenart pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/struts-site.git
The following commit(s) were added to refs/heads/main by this push:
new aae2fb3a5 ci: check out asf/main explicitly in javadocs publish stage
(#313)
aae2fb3a5 is described below
commit aae2fb3a5b289b4bae389150bc1aa17640409938
Author: Lukasz Lenart <[email protected]>
AuthorDate: Wed Jul 1 13:53:11 2026 +0200
ci: check out asf/main explicitly in javadocs publish stage (#313)
The publish stage failed with 'main matched multiple (2) remote tracking
branches': the Pipeline-from-SCM checkout leaves an origin/main, and we add
an asf remote that also has main, so a bare 'git checkout main' is ambiguous
and git refuses. Use 'git checkout -B main asf/main' to pin the intended
remote; this also makes the follow-up 'git pull asf main' redundant, so it
is dropped.
Co-authored-by: Claude Opus 4.8 <[email protected]>
---
Jenkinsfile.javadocs | 5 +++--
docs/superpowers/plans/2026-07-01-jenkins-javadocs-pipeline.md | 5 +++--
.../superpowers/specs/2026-07-01-jenkins-javadocs-pipeline-design.md | 3 ++-
3 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/Jenkinsfile.javadocs b/Jenkinsfile.javadocs
index 061b36f1f..1df390474 100644
--- a/Jenkinsfile.javadocs
+++ b/Jenkinsfile.javadocs
@@ -57,8 +57,9 @@ pipeline {
fi
git fetch asf
- git checkout main
- git pull asf main
+ # Check out asf/main explicitly: the Pipeline SCM checkout also
leaves an
+ # origin/main, so a bare `git checkout main` is ambiguous across two
remotes.
+ git checkout -B main asf/main
rm -rf source/maven
mkdir -p source/maven
diff --git a/docs/superpowers/plans/2026-07-01-jenkins-javadocs-pipeline.md
b/docs/superpowers/plans/2026-07-01-jenkins-javadocs-pipeline.md
index 2cc3b814a..a130d5d9d 100644
--- a/docs/superpowers/plans/2026-07-01-jenkins-javadocs-pipeline.md
+++ b/docs/superpowers/plans/2026-07-01-jenkins-javadocs-pipeline.md
@@ -96,8 +96,9 @@ pipeline {
fi
git fetch asf
- git checkout main
- git pull asf main
+ # Check out asf/main explicitly: the Pipeline SCM checkout also
leaves an
+ # origin/main, so a bare `git checkout main` is ambiguous across two
remotes.
+ git checkout -B main asf/main
rm -rf source/maven
mkdir -p source/maven
diff --git
a/docs/superpowers/specs/2026-07-01-jenkins-javadocs-pipeline-design.md
b/docs/superpowers/specs/2026-07-01-jenkins-javadocs-pipeline-design.md
index f12079499..92cf21159 100644
--- a/docs/superpowers/specs/2026-07-01-jenkins-javadocs-pipeline-design.md
+++ b/docs/superpowers/specs/2026-07-01-jenkins-javadocs-pipeline-design.md
@@ -101,7 +101,8 @@ pollutes the site repo:
Mirror the existing `Jenkinsfile` deploy pattern:
- add the `asf` remote if missing →
`https://gitbox.apache.org/repos/asf/struts-site.git`
-- `git checkout main` && `git pull asf main`
+- `git checkout -B main asf/main` (explicit remote: a bare `git checkout main`
is
+ ambiguous because the Pipeline SCM checkout also leaves an `origin/main`)
- `rm -rf source/maven && mkdir -p source/maven`
- `mv target/struts/target/staging/* source/maven/`
- `git add source/maven`