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

Support custom init script in built-in images #604

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

timja
Copy link
Member

@timja timja commented Dec 19, 2024

Fixes #293

Testing done

Tested adding jq in both basic and advanced images for linux
Tested termination script in linux basic template
Tested installing jq in windows 2022 basic image

Not tested inbound agents

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

@QueryParameter String agentLaunchMethod) {
@QueryParameter String agentLaunchMethod,
@QueryParameter String imageTopLevelType) {
if (Constants.IMAGE_TOP_LEVEL_BASIC.equals(imageTopLevelType)) {
Copy link
Member Author

@timja timja Dec 19, 2024

Choose a reason for hiding this comment

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

Requires jenkinsci/jenkins#10081 to work as otherwise its always advanced as thats the last element (/ closest element to the init script)

Doesn't cause any harm though, just means a warning message is showing that doesn't need to be there

@timja timja force-pushed the custom-init-script-basic branch from 07e855c to 247b0d1 Compare December 19, 2024 14:53
if (StringUtils.isBlank(value)) {
return FormValidation.warningWithMarkup(Messages.Azure_GC_InitScript_Warn_Msg());
return FormValidation.okWithMarkup(Messages.Azure_GC_InitScript_Warn_Msg());
Copy link
Member Author

Choose a reason for hiding this comment

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

used ok so-as not to worry people using built-in or that just don't need an init script

@timja timja marked this pull request as ready for review December 19, 2024 16:06
@timja timja force-pushed the custom-init-script-basic branch from 247b0d1 to 5d9f68d Compare December 19, 2024 16:18
@timja timja merged commit a0e5bf0 into jenkinsci:master Dec 19, 2024
17 checks passed
@timja timja deleted the custom-init-script-basic branch December 19, 2024 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow Initialization Scripts in build in images
1 participant