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

Release Docker Image for Linux (Ubuntu 20.04) #282

Closed
dduportal opened this issue Jul 20, 2022 · 1 comment
Closed

Release Docker Image for Linux (Ubuntu 20.04) #282

dduportal opened this issue Jul 20, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@dduportal
Copy link
Contributor

  • Add a specific provisioning only with the docker.ubuntu source, which download the agent.jar and the entrypoint.sh (at least?)
  • Add the required Docker Image metadatas (USER, ENTRYPOINT, etc.) from the actual jenkinsci/inbound-agent in the Packer source configuration docker.ubuntu along with enabling the commit feature
  • Add a docker-tag post-processor in packer (to give a tagged name to the local Docker image)
  • Add a conditional docker-push post-processor in packer (only if the variable build_type has the value prod) to ensure that we only push images when the packer builds are triggered by a new tag
@lemeurherve lemeurherve self-assigned this Jul 20, 2022
@lemeurherve lemeurherve added the enhancement New feature or request label Jul 20, 2022
lemeurherve pushed a commit to lemeurherve/packer-images that referenced this issue Jul 22, 2022
dduportal added a commit that referenced this issue Jul 25, 2022
* feat: release Docker image for Linux

Ref: #282

* fmt

* fmt

* fix

* chmod a+x

Co-authored-by: Damien Duportal <damien.duportal@gmail.com>

* test: don't install some tools while WIP (nearly 30 min gained \o/)

* wip: /usr/bin/local/jenkins-agent.jar instead of /usr/share/bin/agent.jar

* expanded command flags

* Update sources.pkr.hcl

* while the ASDF_HOME var exists when connecting to the built docker image, it's empty when this script runs (???)

* debug: comment out azure-cli (depends on python)

* add var for docker repository

* rename var.docker_repository to var.docker_namespace

* fix: docker credentials

* fix: namespace

* wip not bad

* good

* only one remaining post-processor

* fix: add docker_namespace variable back

* chore: add updatecli manifest for remoting

* another stage for docker image build (?)

* fix: shell script execution

* fix

* Update Jenkinsfile_k8s

Co-authored-by: Damien Duportal <damien.duportal@gmail.com>

* Update build-jenkins-agent-ubuntu.pkr.hcl

* Apply suggestions from code review

Co-authored-by: Damien Duportal <damien.duportal@gmail.com>
lemeurherve pushed a commit to lemeurherve/packer-images that referenced this issue Jul 26, 2022
Use correct credentials (needs jenkins-infra/kubernetes-management#2644)
Set isPrimary variable as env.BRANCH_IS_PRIMARY doesn't seem to be available in scripted
Add a condition on compute_type for the 'publish docker image' stage

Ref: jenkins-infra#282
lemeurherve added a commit that referenced this issue Jul 26, 2022
* fix: release Docker image for Linux

Use correct credentials (needs jenkins-infra/kubernetes-management#2644)
Set isPrimary variable as env.BRANCH_IS_PRIMARY doesn't seem to be available in scripted
Add a condition on compute_type for the 'publish docker image' stage

Ref: #282

* chore: more descriptive variable name
@dduportal
Copy link
Contributor Author

Closed by #287 #291

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants