Skip to content

Commit

Permalink
Update Jenkins template example for supervisor builder (#375)
Browse files Browse the repository at this point in the history
  • Loading branch information
dilyar85 authored Mar 6, 2024
1 parent f797c4f commit f6ddfc5
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions builder/vsphere/examples/supervisor/jenkins-template.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,14 @@ EOF

provisioner "shell" {
inline = [
# Install Jenkins and its dependencies.
"curl -fsSL https://pkg.jenkins.io/debian/jenkins.io-2023.key | sudo tee /usr/share/keyrings/jenkins-keyring.asc > /dev/null",
"echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] https://pkg.jenkins.io/debian binary/ | sudo tee /etc/apt/sources.list.d/jenkins.list > /dev/null",
# Download Jenkins repository key and add it to the trusted keyrings.
"curl -fsSL https://pkg.jenkins.io/debian/jenkins.io-2023.key | sudo gpg --dearmor -o /usr/share/keyrings/jenkins-keyring.gpg",
"echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.gpg] https://pkg.jenkins.io/debian binary/ | sudo tee /etc/apt/sources.list.d/jenkins.list",

# Download the new Kubernetes community-owned repository key and add it to the trusted keyrings (to get apt-get update working).
"curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.28/deb/Release.key | sudo gpg --dearmor -o /usr/share/keyrings/kubernetes-apt-keyring.gpg",
"echo deb [signed-by=/usr/share/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.28/deb/ / | sudo tee /etc/apt/sources.list.d/kubernetes.list",

# Sometimes apt-get uses IPv6 and causes failure, force to use IPv4 address.
"sudo apt-get -qq -o Acquire::ForceIPv4=true update",
"sudo apt-get -qq -o Acquire::ForceIPv4=true install -f -y ca-certificates openjdk-11-jre-headless",
Expand Down

0 comments on commit f6ddfc5

Please sign in to comment.