Skip to content

fix: update jenkins template used by supervisor builder#583

Merged
kp2099 merged 1 commit intovmware:mainfrom
dilyar85:fix/supervisor-jenkins-template
Jan 20, 2026
Merged

fix: update jenkins template used by supervisor builder#583
kp2099 merged 1 commit intovmware:mainfrom
dilyar85:fix/supervisor-jenkins-template

Conversation

@dilyar85
Copy link
Copy Markdown
Member

@dilyar85 dilyar85 commented Jan 5, 2026

Description

This PR updates the example jenkins-template.pkr.hcl template file provided for the supervisor builder because the current GPG key is no longer valid, e.g.:

[1;31m==> vsphere-supervisor.vm: echo deb [signed-by=/usr/share/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.28/deb/ /�[0m
[0;32m    vsphere-supervisor.vm: deb [signed-by=/usr/share/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.28/deb/ /�[0m
[1;31m==> vsphere-supervisor.vm: + sudo apt-get -qq -o Acquire::ForceIPv4=true update�[0m
[1;31m==> vsphere-supervisor.vm: W: GPG error: https://pkg.jenkins.io/debian binary/ Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7198F4B714ABFC68�[0m
[1;31m==> vsphere-supervisor.vm: E: The repository 'https://pkg.jenkins.io/debian binary/ Release' is not signed.

This PR changes it to use a LTS Jenkins release so hopefully we don't need to update it anymore. Verified this locally against a testbed with Supervisor installed:

$ packer build -var storage_class=wcpglobal-storage-profile -var ssh_bastion_username=root -var ssh_bastion_password=vmware -var keep_input_artifact=true -var ssh_username=packer -var supervisor_namespace=sdiliyaer-test -var image_name=vmi-52a81e36afa55e8e2 -var source_name=test-vm-new -var ssh_bastion_host=10.163.9.186 -var ssh_pa

vsphere-supervisor.vm: output will be in this color.

==> vsphere-supervisor.vm: Creating temporary RSA SSH key for instance...
    vsphere-supervisor.vm: Connecting to Supervisor cluster...
    vsphere-supervisor.vm: Successfully connected to Supervisor cluster
    vsphere-supervisor.vm: Validating VM publish location...
    vsphere-supervisor.vm: VM publish step will be skipped as the `publish_location_name` config is not set
    vsphere-supervisor.vm: Creating source objects with name "test-vm-new" in namespace "sdiliyaer-test"
    vsphere-supervisor.vm: Checking source VM image "vmi-52a81e36afa55e8e2"
    vsphere-supervisor.vm: Found namespace scoped VM image of type "OVF"
    vsphere-supervisor.vm: Deploying VM from OVF image
    vsphere-supervisor.vm: Using default cloud-init user data as the 'bootstrap_data_file' is not specified
    vsphere-supervisor.vm: Creating a Secret object for OVF VM bootstrap
    vsphere-supervisor.vm: Creating a VM object with bootstrap provider "CloudInit"
    vsphere-supervisor.vm: Creating a VirtualMachineService object for network connection
    vsphere-supervisor.vm: Finished creating all required source objects
    vsphere-supervisor.vm: Waiting for the source VM to be ready...
    vsphere-supervisor.vm: Successfully obtained the source VM IP: 192.168.128.9
    vsphere-supervisor.vm: Getting source VM ingress IP from the VMService object
    vsphere-supervisor.vm: Successfully retrieved the source VM ingress IP: 172.16.0.206
    vsphere-supervisor.vm: Source VM is now ready in Supervisor cluster
==> vsphere-supervisor.vm: Using SSH communicator to connect: 172.16.0.206
==> vsphere-supervisor.vm: Waiting for SSH to become available...
==> vsphere-supervisor.vm: Connected to SSH!
==> vsphere-supervisor.vm: Uploading /var/folders/nf/cndlm4ts2bd9jz3dd667jfb80000gr/T/pkr-file-content2543755310 => /tmp/sample-job.xml
    vsphere-supervisor.vm: pkr-file-content2543755310 242 B / 242 B [====================================================================================] 100.00% 0s
==> vsphere-supervisor.vm: Provisioning with shell script: /var/folders/nf/cndlm4ts2bd9jz3dd667jfb80000gr/T/<sensitive>-shell1459333567
==> vsphere-supervisor.vm: + sudo rm -f /etc/apt/sources.list.d/kubernetes.list
==> vsphere-supervisor.vm: + sudo apt-get -qq -o Acquire::ForceIPv4=true update
==> vsphere-supervisor.vm: + sudo apt-get -qq -o Acquire::ForceIPv4=true install -f -y ca-certificates openjdk-21-jre-headless wget
    vsphere-supervisor.vm: Preconfiguring packages ...
    ...
    vsphere-supervisor.vm: done.
    vsphere-supervisor.vm: Setting up openjdk-21-jre-headless:amd64 (21.0.7+6~us1-0ubuntu1~20.04) ...
    vsphere-supervisor.vm: update-alternatives: using /usr/lib/jvm/java-21-openjdk-amd64/bin/java to provide /usr/bin/java (java) in auto mode
    vsphere-supervisor.vm: update-alternatives: using /usr/lib/jvm/java-21-openjdk-amd64/bin/jpackage to provide /usr/bin/jpackage (jpackage) in auto mode
    vsphere-supervisor.vm: update-alternatives: using /usr/lib/jvm/java-21-openjdk-amd64/bin/keytool to provide /usr/bin/keytool (keytool) in auto mode
    vsphere-supervisor.vm: update-alternatives: using /usr/lib/jvm/java-21-openjdk-amd64/bin/rmiregistry to provide /usr/bin/rmiregistry (rmiregistry) in auto mode
    vsphere-supervisor.vm: update-alternatives: using /usr/lib/jvm/java-21-openjdk-amd64/lib/jexec to provide /usr/bin/jexec (jexec) in auto mode
==> vsphere-supervisor.vm: + wget -q -O /tmp/jenkins.deb https://get.jenkins.io/debian-stable/jenkins_2.462.3_all.deb
==> vsphere-supervisor.vm: + sudo dpkg -i /tmp/jenkins.deb
    vsphere-supervisor.vm: Selecting previously unselected package jenkins.
    vsphere-supervisor.vm: (Reading database ... 93909 files and directories currently installed.)
    vsphere-supervisor.vm: Preparing to unpack /tmp/jenkins.deb ...
    vsphere-supervisor.vm: Unpacking jenkins (2.462.3) ...
    vsphere-supervisor.vm: Processing triggers for systemd (245.4-4ubuntu3.15) ...
==> vsphere-supervisor.vm: dpkg: dependency problems prevent configuration of jenkins:
==> vsphere-supervisor.vm:  jenkins depends on net-tools; however:
==> vsphere-supervisor.vm:   Package net-tools is not installed.
==> vsphere-supervisor.vm:
==> vsphere-supervisor.vm: dpkg: error processing package jenkins (--install):
==> vsphere-supervisor.vm:  dependency problems - leaving unconfigured
==> vsphere-supervisor.vm: Errors were encountered while processing:
==> vsphere-supervisor.vm:  jenkins
==> vsphere-supervisor.vm: + true
==> vsphere-supervisor.vm: + sudo apt-get -qq -o Acquire::ForceIPv4=true install -f -y
    vsphere-supervisor.vm: Selecting previously unselected package net-tools.
    vsphere-supervisor.vm: (Reading database ... 93924 files and directories currently installed.)
    vsphere-supervisor.vm: Preparing to unpack .../net-tools_1.60+git20180626.aebd88e-1ubuntu1.3_amd64.deb ...
    vsphere-supervisor.vm: Unpacking net-tools (1.60+git20180626.aebd88e-1ubuntu1.3) ...
    vsphere-supervisor.vm: Setting up net-tools (1.60+git20180626.aebd88e-1ubuntu1.3) ...
    vsphere-supervisor.vm: Setting up jenkins (2.462.3) ...
    vsphere-supervisor.vm: Created symlink /etc/systemd/system/multi-user.target.wants/jenkins.service → /lib/systemd/system/jenkins.service.
    vsphere-supervisor.vm: Processing triggers for man-db (2.9.1-1) ...
    vsphere-supervisor.vm: Processing triggers for systemd (245.4-4ubuntu3.15) ...
==> vsphere-supervisor.vm: + sudo systemctl restart jenkins
==> vsphere-supervisor.vm: + + grep -q 403\|200
==> vsphere-supervisor.vm: curl -s -o /dev/null -w %{http_code} http://localhost:8080/
==> vsphere-supervisor.vm: + export JENKINS_URL=http://localhost:8080/
==> vsphere-supervisor.vm: + export USER=admin
==> vsphere-supervisor.vm: + sudo cat /var/lib/jenkins/secrets/initialAdminPassword
==> vsphere-supervisor.vm: + export PASSWORD=7c75d0ee40c045e59cde6ce0dd3ab0ad
==> vsphere-supervisor.vm: + wget -q -O /tmp/jenkins-cli.jar http://localhost:8080//jnlpJars/jenkins-cli.jar
==> vsphere-supervisor.vm: + java -jar /tmp/jenkins-cli.jar -s http://localhost:8080/ -auth admin:7c75d0ee40c045e59cde6ce0dd3ab0ad create-job sample-job
==> vsphere-supervisor.vm: + java -jar /tmp/jenkins-cli.jar -s http://localhost:8080/ -auth admin:7c75d0ee40c045e59cde6ce0dd3ab0ad build sample-job -s -v
    vsphere-supervisor.vm: Started sample-job #1
    vsphere-supervisor.vm: Started from command line by admin
    vsphere-supervisor.vm: Running as SYSTEM
    vsphere-supervisor.vm: Building in workspace /var/lib/jenkins/workspace/sample-job
    vsphere-supervisor.vm: [sample-job] $ /bin/sh -xe /tmp/jenkins11524461140938288628.sh
    vsphere-supervisor.vm: + echo Hello VM-Service from Jenkins
    vsphere-supervisor.vm: Hello VM-Service from Jenkins
    vsphere-supervisor.vm: Finished: SUCCESS
    vsphere-supervisor.vm: Completed sample-job #1 : SUCCESS
    vsphere-supervisor.vm: Skip cleaning up the VirtualMachinePublishRequest object as specified in config
    vsphere-supervisor.vm: Skip cleaning up the source objects as specified in config
    vsphere-supervisor.vm: Build 'vsphere-supervisor' finished successfully.
Build 'vsphere-supervisor.vm' finished after 1 minute 44 seconds.

==> Wait completed after 1 minute 44 seconds

Resolved Issues

N/A.

Rollback Plan

This is an example template and no production code is changed in this PR.

Changes to Security Controls

None.

@dilyar85 dilyar85 requested a review from a team as a code owner January 5, 2026 20:50
@tenthirtyam tenthirtyam requested a review from kp2099 January 7, 2026 15:07
@tenthirtyam tenthirtyam added this to the v2.1.0 milestone Jan 7, 2026
@tenthirtyam
Copy link
Copy Markdown
Collaborator

@kp2099 Couod you review this one for Sai from the Broadcom side?

@kp2099 kp2099 merged commit a437f5a into vmware:main Jan 20, 2026
14 checks passed
@github-actions
Copy link
Copy Markdown

This functionality has been released in v2.1.0 of the plugin.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

1 similar comment
@github-actions
Copy link
Copy Markdown

This functionality has been released in v2.1.0 of the plugin.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link
Copy Markdown

I'm going to lock this pull request because it has been closed for 30 days. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants