Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade PCT; Launchable improvements #1994

Merged
merged 1 commit into from Apr 22, 2023
Merged

Conversation

basil
Copy link
Member

@basil basil commented Apr 21, 2023

Adapting to jenkinsci/plugin-compat-tester#536 by using the repository name to improve the display of the Pipeline stage view steps as well as passing this information to Launchable as the group name for Launchable zero-input subsetting. I tested this with a passing CI build with these changes (using my admin powers to replay the build with the Jenkinsfile changes).

@basil basil marked this pull request as ready for review April 22, 2023 15:50
Comment on lines +34 to +43
@NonCPS
def parsePlugins(plugins) {
def pluginsByRepository = [:]
plugins.each { plugin ->
def splits = plugin.split('\t')
pluginsByRepository[splits[0]] = splits[1].split(',')
}
pluginsByRepository
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new format of the file is group/repository\tplugin1,plugin2,plugin3. This parsing function is marked @NonCPS for performance reasons, as serializing each line to disk for a 200-line list would be inefficient.

launchable("record build --name \"${BUILD_TAG}-${line}\" --no-commit-collection " + commitHashes)
launchable("record session --build \"${BUILD_TAG}-${line}\" --observation >launchable-session-${line}.txt")
stash name: "launchable-session-${line}.txt", includes: "launchable-session-${line}.txt"
launchable("record build --name ${env.BUILD_TAG}-${line} --no-commit-collection " + commitHashes + " --link \"View build in CI\"=${env.BUILD_URL}")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cosmetic fix: adding a link back to Jenkins to make it easier to view this information in the Launchable UI.

pluginsByRepository.each { plugins ->
branches["pct-$plugins-$line"] = {
pluginsByRepository.each { repository, plugins ->
branches["pct-$repository-$line"] = {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cosmetic fix to the branch view: showing the repository name rather than the list of plugins in the UI.


def jdk = line == 'weekly' ? 17 : 11
def sessionFile = "launchable-session-${line}.txt"
launchable("record session --build ${env.BUILD_TAG}-${line} --flavor platform=linux --flavor jdk=${jdk} --observation --link \"View session in CI\"=${env.BUILD_URL} >${sessionFile}")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding the platform and JDK as flavors to be consistent with our general use of Launchable flavors in core and ATH builds.

@MarkEWaite MarkEWaite merged commit 816d28f into jenkinsci:master Apr 22, 2023
238 checks passed
@basil basil deleted the launchable branch April 22, 2023 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants