Repository navigation
Pass the CI secrets with secrets: inherit on main - #254
Closed
jwrosewell wants to merge 2 commits into
Closed
jwrosewell wants to merge 2 commits into
jwrosewell wants to merge 2 commits into
Conversation
The shared common-ci workflows no longer declare named secrets, so a caller that passes them by name fails to start. They export each secret into the environment under its own name rather than handing the secrets to the repository's scripts as parameters, and give the signing secrets only to the job that builds the packages and the publishing ones only to the job that publishes. Every workflow that calls a shared workflow passes the secrets with secrets: inherit, as rc does. The CI scripts take no secrets as parameters, as on rc. build-package.ps1 and publish-package.ps1 no longer pass keys to common-ci's Java scripts, which read them from the environment. fetch-assets.ps1 downloads the TAC and Enterprise IP Intelligence data files with the data license, and no longer asks for "20000 User Agents.csv", which the shared step no longer fetches and nothing on main reads. The unit, integration and performance test scripts give the tests _51DEGREES_RESOURCE_KEY_BESPOKE and _51DEGREES_LICENSE_KEY under the Maven properties they read on main, and run the IP Intelligence examples and benchmark every time, because the Enterprise data file is now always fetched. ci/README.md lists the secrets as they are now. Only .github/workflows and ci change.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request is based on
mainand targetsmain. It changes only CI workflows andci/scripts and publishes no package of its own, so it may go intomainbetween monthly releases. It stays a draft to be merged by an administrator. The "Only rc into main" check fails on it by design, because its head is notrc.Read "What it releases" before merging.
mainalready holds unreleased package changes, and this lets the nightly that would publish them run again.The problem
On 22 and 23 November the shared workflows in common-ci stopped declaring named secrets and stopped handing secrets to a repository's scripts as parameters or as
Keys(common-ci #360 released in #356, then #362 released in #363). Each job now exports the secrets into the environment under their own names. The signing secrets go only to the job that builds the packages, the publishing ones only to the job that publishes, and the steps that download data files set_51DEGREES_LICENSE_KEYfrom the data license.rcalready does this, butmainstill passes the secrets by name, so the Nightly Pipeline onmainhas ended instartup_failureevery night since 23 November, for example run 46567577301 on 1 December, and so has the Example Assets Update. Once started,main's scripts would fail too, becauseci/build-package.ps1andci/publish-package.ps1take a mandatoryKeysand pass keys to common-ci's Java scripts, which no longer take them, andci/fetch-assets.ps1passes-DeviceDetectionto the sharedsteps/fetch-assets.ps1, which no longer takes it.What this changes
Every file is under
.github/workflowsorci:data-file-change.yml,example-assets-update.yml,monthly-copyright-update.yml,nightly-pipeline.yml,package-update.yml,publish.yml,pull-requests.ymlandsubmodule-update.yml) passsecrets: inheritin place of the named secrets, asrcdoes. Nothing else in them changes.ci/build-package.ps1andci/publish-package.ps1take no keys and pass none to common-ci's Java scripts, which read them from the environment, as onrc.ci/fetch-assets.ps1takes no secrets and downloads the TAC and Enterprise IP Intelligence data files with the data license, asrcdoes. It no longer asks for20000 User Agents.csv, which the shared step stopped fetching in the same change and which nothing onmainreads (UA_FILEin the shared test helpers is declared and never used).ci/run-unit-tests.ps1,ci/run-integration-tests.ps1andci/run-performance-tests.ps1give the tests_51DEGREES_RESOURCE_KEY_BESPOKEand_51DEGREES_LICENSE_KEYunder the Maven properties the tests onmainread (TestResourceKey,SuperResourceKeyandLicenseKey). The IP Intelligence examples and benchmark now always run, because the Enterprise data file is now always fetched, where before they ran only whenIPI_DATA_FILE_URLwas given.ci/README.mdnames the secrets as they are now.The other differences between
mainandrcin these files are left for the next release fromrc.What it releases
Nothing that
maindoes not already plan.git diff --stat origin/mainlists 15 files, all under.github/workflowsandci, and no package includes either folder.mainitself, though, has been unreleased since 4.5.130. The release pull request #112 merged on 13 November and 226 files outside documentation,.githubandcihave changed since the 4.5.130 tag. Soci/get-next-package-version.ps1gives 4.5.131 and common-ci'ssteps/package-update-required.ps1exits 0, meaning release, both onmainand on this branch:Before 23 November the nightly on
maintried to publish 4.5.131 every night and stopped at the Build job, withUnsupported class file major version 69, for example run 44979653277 on 22 November. Once this is merged, the nightly runs again, and if its Build and Test jobs pass it publishes 4.5.131 to Maven Central with no one starting it. Whethermainshould release 4.5.131 now is a decision for whoever merges this.How it was verified
The Nightly Pipeline was started on this branch with
dryrunset, run 46628057343. It started, whichmainhas not done since 23 November.version=4.5.131and found an update required, as above, and its release interval check printedThe last release, 4.5.130, was on 5 November 2026, so the next may go from 12 November 2026. All seven Pre Build jobs passed.mvn deploywithUnable to get publisher server properties for server id: central. common-ci #360 removed thecentralserver from common-ci'sjava/settings.xml, and thecentral-publishing-maven-plugin0.7.0 that the poms configure withpublishingServerIdcentrallooks that server up even with-DskipPublishing=true, which common-ci passes. So Test and Package were skipped.rc's poms configure the plugin the same way, andrc's build was not run here.DidClientLiveTeststests, with{"context":"unreadable"} expected:<VERIFIED> but was:<UNKNOWN>, and fail-fast cancelled the other entries. Every other test in the reactor up topipeline.didpassed.LiveCloudKeysonmainreads the licence key from_51DEGREES_LICENSE_KEYbefore_51DEGREES_LICENSE_KEY_BESPOKE, and common-ci now sets_51DEGREES_LICENSE_KEYto the data license in that step, where before 23 November it was not set and those tests skipped. The resource key the tests find is_51DEGREES_RESOURCE_KEY_BESPOKE, and theCloud 51Didworkflow onmainnotes that the service redeems only with a licence key of the resource key's own account. The nightly onmainruns these unit tests only for a pull request intomainitself, because it builds the pull requests intorcwithrc's scripts and tests.When rc next goes into main
rcchanges each of these files further, so the release pull request fromrcwill meet conflicts in them. Takerc's version of every file this changes.What remains
main, andrc's too if its poms meet the same, until common-ci'sjava/settings.xmldefines acentralserver again or the plugin no longer needs one when publishing is skipped. Until then the nightly onmaincannot publish 4.5.131.DidClientLiveTestsfailures in a pull request build ofmain's own code, above.