Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/mirror-selenium-releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
steps:
- uses: actions/checkout@v6
with:
ref: trunk
persist-credentials: false
- name: Read api.github.com and filter response
run: |
Expand Down Expand Up @@ -54,4 +55,4 @@ jobs:
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.SELENIUM_CI_TOKEN }}
branch: ${{ github.ref }}
branch: trunk
24 changes: 19 additions & 5 deletions rake_tasks/java.rake
Original file line number Diff line number Diff line change
Expand Up @@ -281,12 +281,10 @@ task :release do |_task, arguments|

unless nightly
already_published = begin
Rake::Task['java:verify'].invoke
SeleniumRake.verify_package_published(maven_central_pom_url)
Comment thread
titusfortner marked this conversation as resolved.
true
rescue StandardError
false
ensure
Rake::Task['java:verify'].reenable
end

if already_published
Expand Down Expand Up @@ -327,10 +325,26 @@ task :release do |_task, arguments|
trigger_sonatype_publish(token)
end

def maven_central_pom_url
base = 'https://repo1.maven.org/maven2/org/seleniumhq/selenium/selenium-java'
"#{base}/#{java_version}/selenium-java-#{java_version}.pom"
end

desc 'Verify Java packages are published on Maven Central'
task :verify do
base = 'https://repo1.maven.org/maven2/org/seleniumhq/selenium/selenium-java'
SeleniumRake.verify_package_published("#{base}/#{java_version}/selenium-java-#{java_version}.pom")
deadline = Process.clock_gettime(Process::CLOCK_MONOTONIC) + 600

begin
SeleniumRake.verify_package_published(maven_central_pom_url)
rescue StandardError => e
if Process.clock_gettime(Process::CLOCK_MONOTONIC) > deadline
Comment thread
titusfortner marked this conversation as resolved.
raise "#{e.class}: #{e.message}; check https://central.sonatype.com/publishing/deployments"
end
Comment thread
qodo-code-review[bot] marked this conversation as resolved.

puts " #{e.class}: #{e.message}; Maven Central may still be indexing, retrying in 15s"
sleep 15
retry
end
end

desc 'Install jars to local m2 directory'
Expand Down