jenkins-infra / packer-images

This repository hosts the packer definitions for the Jenkins Infrastructure
MIT License
16 stars 18 forks source link
hacktoberfest jenkins packer updatecli

packer-images

A repository containing a number of packer build configurations to generate Jenkins agent templates for all the Jenkins controllers of the jenkins-infra project, such as ci.jenkins.io, infra.ci.jenkins.io, etc.

Contributing

If you have:

Continuous Integration/Delivery/Deployment

Continuous Integration

Each commit or pull request of this repository is built on https://infra.ci.jenkins.io, a non-public Jenkins controller.

Continuous Delivery

Each build creates a set of artifacts (VM templates) for each cell of the build matrix (check the Jenkinsfile_k8s manifest) that are considered ephemeral:

  1. The artifacts created by local builds (if you have the cloud credentials), Pull requests or named branch (except main) generate ephemeral artifacts tagged as dev with a lifespan of ~24h. They should never be used on production instances, they can be used for smoke testing and are not expected to be persisted.

  2. The artifacts created by builds on the main branch are tagged as staging with a lifespan of 7 days. They can be used for validation on production instances but are not met to be persisted.

Continuous Deployment

Releases are created by adding a tag on the repository, which:

Invoking the build locally

In some cases, you might want to execute the build locally (opposed to opening a Pull Request and delegate the build to the CI/CD system).

Requirements

With the requirements verified locally, execute the following command:

# Means: "Build the ubuntu-22.04 agent for Docker
export PKR_VAR_image_type=docker
export PKR_VAR_agent_os_type=ubuntu
export PKR_VAR_agent_os_version=22.04
packer validate ./
packer build -timestamp-ui -force -only="docker.ubuntu" ./

Azure

az group create -n myResourceGroup -l eastus