Skip to content

Commit 8fb2075

Browse files
committed
Adding Ubuntu Noble
1 parent e94b2eb commit 8fb2075

File tree

69 files changed

+2519
-90
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+2519
-90
lines changed

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright © 2017 Travis CI GmbH
3+
Copyright © 2025 Travis CI GmbH
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

ci-freebsd-14.yml

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
---
2+
description: Travis CI freebsd build env template!
3+
variables:
4+
docker_repository: travisci/ci-freebsd
5+
docker_tag: packer-{{ timestamp }}-<%= git_desc %>
6+
gce_account_file: "{{ env `GCE_ACCOUNT_FILE` }}"
7+
gce_project_id: "{{ env `GCE_PROJECT_ID` }}"
8+
image_name: travis-ci-freebsd-14-{{ timestamp }}-<%= git_desc %>
9+
openstack_source_image_name: "{{ env `OS_SOURCE_IMAGE_XENIAL` }}"
10+
travis_cookbooks_branch: "{{ env `TRAVIS_COOKBOOKS_BRANCH` }}"
11+
travis_cookbooks_edge_branch: master
12+
travis_cookbooks_sha: "{{ env `TRAVIS_COOKBOOKS_SHA` }}"
13+
travis_uid: "{{ env `TRAVIS_UID` }}"
14+
builders:
15+
- type: googlecompute
16+
name: googlecompute
17+
communicator: ssh
18+
ssh_timeout: 20m
19+
state_timeout: 10m
20+
ssh_port: 22
21+
ssh_username: packer
22+
image_description: Travis CI freebsd
23+
account_file: "{{ user `gce_account_file` }}"
24+
project_id: "{{ user `gce_project_id` }}"
25+
source_image_project_id: freebsd-org-cloud-dev
26+
source_image: freebsd-14-2-release-amd64-ufs
27+
zone: us-central1-a
28+
image_name: "{{ user `image_name` }}"
29+
machine_type: n1-standard-4
30+
disk_size: 30
31+
tags:
32+
- ci
33+
- freebsd
34+
- travis-ci-packer-templates
35+
provisioners:
36+
- type: shell
37+
inline: sleep 10
38+
only:
39+
- googlecompute
40+
- type: file
41+
source: tmp/git-meta
42+
destination: /var/tmp/git-meta
43+
- type: file
44+
source: packer-assets/travis_rsa.pub
45+
destination: /var/tmp/travis_rsa.pub
46+
- type: shell
47+
scripts:
48+
- packer-scripts/freebsd-update
49+
- packer-scripts/pre-chef-bootstrap-bsd
50+
- packer-scripts/clone-travis-cookbooks-bsd
51+
- packer-scripts/freebsd-install-pkgs
52+
- packer-scripts/freebsd-cleanup
53+
environment_vars:
54+
- TRAVIS_COOKBOOKS_BRANCH={{ user `travis_cookbooks_branch` }}
55+
- TRAVIS_COOKBOOKS_SHA={{ user `travis_cookbooks_sha` }}
56+
- TRAVIS_UID={{ user `travis_uid` }}
57+
execute_command: "{{ .Vars }} exec sudo -E -S sh '{{ .Path }}'"
58+
- type: chef-solo
59+
version: 18.4.12
60+
config_template: chef-solo.rb.tmpl
61+
<% if ENV['CHEF_PROFILING'] %>
62+
execute_command: "{{if .Sudo}}sudo {{end}}CI=yes chef-solo -F doc --no-color -c {{.ConfigPath}} -j {{.JsonPath}}"
63+
<% end %>
64+
cookbook_paths:
65+
- cookbooks
66+
<% if ENV['COOKBOOKS_LOCAL'] && ENV['TRAVIS_COOKBOOKS_DIR'] %>
67+
- <%= ENV['TRAVIS_COOKBOOKS_DIR'] %>/cookbooks
68+
- <%= ENV['TRAVIS_COOKBOOKS_DIR'] %>/community-cookbooks
69+
<% else %>
70+
remote_cookbook_paths:
71+
- /tmp/chef-stuff/travis-cookbooks/cookbooks
72+
- /tmp/chef-stuff/travis-cookbooks/community-cookbooks
73+
<% end %>
74+
run_list:
75+
- recipe[travis_ci_freebsd_14]
76+
<% if ENV['CHEF_PROFILING'] %>
77+
- recipe[poise-profiler]
78+
<% end %>
79+
- type: shell
80+
scripts:
81+
- packer-scripts/create-freebsd-job-board-data
82+
- packer-scripts/create-image-metadata-tarball-bsd
83+
environment_vars:
84+
- JOB_BOARD_REGISTER_FILE=/.job_board_register.yml
85+
- JOB_BOARD_IMAGE_DIST={{ user `dist_name` }}
86+
- PACKER_ENV_DIR=/.packer-env
87+
- SYSTEM_INFO_JSON=/c/travis_system_info.json
88+
- NODE_ATTRIBUTES_YML=/.node-attributes.yml
89+
- RSPEC_JSON_DIR=/home/travis
90+
- DPKG_MANIFEST_JSON=/.dpkg-manifest.json
91+
- BIN_LIB_CHECKSUMS=/.bin-lib.SHA256SUMS
92+
- IMAGE_METADATA_TARBALL=/var/tmp/image-metadata-{{ user `image_name` }}.tar.bz2
93+
execute_command: "{{ .Vars }} exec sudo -E -S sh '{{ .Path }}'"
94+
- type: file
95+
source: /var/tmp/image-metadata-{{ user `image_name` }}.tar.bz2
96+
destination: tmp/image-metadata-{{ user `image_name` }}.tar.bz2
97+
direction: download
98+
post-processors:
99+
-
100+
- type: shell-local
101+
script: bin/job-board-register
102+
environment_vars:
103+
- IMAGE_NAME={{ user `image_name` }}
104+
only:
105+
- googlecompute
106+
-
107+
- type: shell-local
108+
script: bin/write-latest-image-name

ci-ubuntu-2404-minimal.yml

Lines changed: 205 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,205 @@
1+
---
2+
description: Travis CI Ubuntu 24.04 build env template
3+
variables:
4+
chef_log_level: info
5+
docker_repository: travisci/ci-ubuntu-2404
6+
docker_tag: packer-minimal-{{ timestamp }}-<%= git_desc %>
7+
gce_account_file: "{{ env `GCE_ACCOUNT_FILE` }}"
8+
gce_project_id: "{{ env `GCE_PROJECT_ID` }}"
9+
image_name: travis-ci-ubuntu-2404-minimal-{{ timestamp }}-<%= git_desc %>
10+
travis_cookbooks_branch: "{{ env `TRAVIS_COOKBOOKS_BRANCH` }}"
11+
travis_cookbooks_edge_branch: master
12+
travis_cookbooks_sha: "{{ env `TRAVIS_COOKBOOKS_SHA` }}"
13+
travis_uid: "{{ env `TRAVIS_UID` }}"
14+
docker_login_username: "{{ env `DOCKER_LOGIN_USERNAME` }}"
15+
docker_login_password: "{{ env `DOCKER_LOGIN_PASSWORD` }}"
16+
docker_login_server: "{{ env `DOCKER_LOGIN_SERVER` }}"
17+
builders:
18+
- type: googlecompute
19+
name: googlecompute
20+
communicator: ssh
21+
ssh_timeout: 10m
22+
ssh_port: 22
23+
ssh_username: packer
24+
image_description: Travis CI Ubuntu 24.04
25+
account_file: "{{ user `gce_account_file` }}"
26+
project_id: "{{ user `gce_project_id` }}"
27+
source_image_family: ubuntu-2404-lts-amd64
28+
image_licenses: ["projects/vm-options/global/licenses/enable-vmx"]
29+
zone: us-central1-a
30+
image_name: "{{ user `image_name` }}"
31+
machine_type: n2-standard-4
32+
disk_size: 50
33+
temporary_key_pair_type: ed25519
34+
tags:
35+
- ci
36+
- ubuntu-2404
37+
- travis-ci-packer-templates
38+
- type: docker
39+
name: docker
40+
login: true
41+
login_username: "{{ user `docker_login_username` }}"
42+
login_password: "{{ user `docker_login_password` }}"
43+
login_server: "{{ user `docker_login_server` }}"
44+
ssh_pty: true
45+
<% if RUBY_PLATFORM =~ /powerpc64/ %>
46+
image: "travisci/gce-parity:24.04-ppc64le"
47+
<% else %>
48+
image: "travisci/gce-parity:24.04"
49+
<% end %>
50+
run_command:
51+
- -d
52+
- -v
53+
- <%= Dir.pwd %>/tmp/packer-builder-tmp:/tmp
54+
- --privileged=true
55+
- "{{ .Image }}"
56+
- /sbin/init
57+
commit: true
58+
provisioners:
59+
- type: shell
60+
inline: sleep 10
61+
only:
62+
- googlecompute
63+
- type: shell
64+
inline: apt-get update -yqq && apt-get install sudo -yqq
65+
# Delay script execution until after /sbin/init has cleared out /tmp,
66+
# otherwise the uploaded script gets deleted before it can be run.
67+
# TODO: Decide if the container startup command should be /bin/bash and the
68+
# /sbin/init call made the first provision step instead of this workaround:
69+
# https://github.com/travis-ci/packer-templates/issues/544#issuecomment-344971947
70+
pause_before: 5s
71+
only:
72+
- docker
73+
# - type: file
74+
# source: tmp/travis-cookbooks
75+
# destination: /var/tmp/travis-cookbooks
76+
- type: file
77+
source: tmp/git-meta
78+
destination: /var/tmp/git-meta
79+
- type: file
80+
source: packer-assets/ubuntu-2404-normal-purge.txt
81+
destination: /var/tmp/purge.txt
82+
- type: file
83+
source: packer-assets/ci-ubuntu-2404-packages.txt
84+
destination: /var/tmp/packages.txt
85+
only:
86+
- googlecompute
87+
- type: file
88+
source: packer-assets/ci-ubuntu-2404-docker-packages.txt
89+
destination: /var/tmp/packages.txt
90+
only:
91+
- docker
92+
- type: shell
93+
scripts:
94+
- packer-scripts/packer-env-dump
95+
execute_command: "{{ .Vars }} exec sudo -E -S bash '{{ .Path }}'"
96+
- type: shell
97+
scripts:
98+
- packer-scripts/remove-default-users
99+
execute_command: "{{ .Vars }} exec sudo -E -S bash '{{ .Path }}'"
100+
only:
101+
- docker
102+
- googlecompute
103+
- type: shell
104+
scripts:
105+
- packer-scripts/pre-chef-bootstrap-noble
106+
- packer-scripts/clone-travis-cookbooks
107+
environment_vars:
108+
- SKIP_APT_UPGRADE=1
109+
- TRAVIS_COOKBOOKS_BRANCH={{ user `travis_cookbooks_branch` }}
110+
- TRAVIS_COOKBOOKS_SHA={{ user `travis_cookbooks_sha` }}
111+
- TRAVIS_UID={{ user `travis_uid` }}
112+
execute_command: "{{ .Vars }} exec sudo -E -S bash '{{ .Path }}'"
113+
- type: file
114+
source: packer-assets/ubuntu-2404-minimal-system-info-commands.yml
115+
destination: /var/tmp/ubuntu-2404-minimal-system-info-commands.yml
116+
- type: shell
117+
inline: chmod 0644 /var/tmp/ubuntu-2404-minimal-system-info-commands.yml
118+
- type: chef-solo
119+
version: 18.4.12
120+
config_template: chef-solo.rb.tmpl
121+
<% if ENV['CHEF_PROFILING'] %>
122+
execute_command: "{{if .Sudo}}sudo {{end}}CI=yes chef-solo --chef-license accept-silent -F doc --no-color -c {{.ConfigPath}} -j {{.JsonPath}}"
123+
<% else %>
124+
execute_command: "{{if .Sudo}}sudo {{end}}CI=yes chef-solo --chef-license accept-silent --no-color -c {{.ConfigPath}} -j {{.JsonPath}}"
125+
<% end %>
126+
cookbook_paths:
127+
- cookbooks
128+
<% if ENV['COOKBOOKS_LOCAL'] && ENV['TRAVIS_COOKBOOKS_DIR'] %>
129+
- <%= ENV['TRAVIS_COOKBOOKS_DIR'] %>/cookbooks
130+
- <%= ENV['TRAVIS_COOKBOOKS_DIR'] %>/community-cookbooks
131+
<% else %>
132+
remote_cookbook_paths:
133+
- /tmp/chef-stuff/travis-cookbooks/cookbooks
134+
- /tmp/chef-stuff/travis-cookbooks/community-cookbooks
135+
<% end %>
136+
run_list:
137+
- recipe[travis_ci_ubuntu_2404_minimal]
138+
<% if ENV['CHEF_PROFILING'] %>
139+
- recipe[poise-profiler]
140+
<% end %>
141+
- type: shell
142+
scripts:
143+
- packer-scripts/ensure-travis-user
144+
- packer-scripts/purge
145+
- packer-scripts/disable-apparmor
146+
- packer-scripts/run-serverspecs
147+
- packer-scripts/test-system-info-output
148+
- packer-scripts/dump-dpkg-manifest
149+
- packer-scripts/create-bin-lib-checksums
150+
- packer-scripts/cleanup
151+
# - packer-scripts/minimize
152+
environment_vars:
153+
- DISPLAY=:99.0
154+
- SPEC_SUITES=travis_packer_templates
155+
- TRAVIS_OBFUSCATE_PASSWORD=1
156+
- TRAVIS_UID={{ user `travis_uid` }}
157+
execute_command: "{{ .Vars }} exec sudo -E -S bash '{{ .Path }}'"
158+
- type: shell
159+
environment_vars:
160+
- TRAVIS_OBFUSCATE_PASSWORD=1
161+
- TRAVIS_UID={{ user `travis_uid` }}
162+
execute_command: "{{ .Vars }} exec sudo -E -S bash '{{ .Path }}'"
163+
inline:
164+
- "find /etc/systemd -type f -o -type l"
165+
# - "rm -v /etc/systemd/system/network-online.target.wants/networking.service"
166+
# - "rm -v /etc/systemd/system/multi-user.target.wants/networking.service"
167+
- type: shell
168+
scripts:
169+
- packer-scripts/create-image-metadata-tarball
170+
environment_vars:
171+
- IMAGE_METADATA_TARBALL=/var/tmp/image-metadata-{{ user `image_name` }}.tar.bz2
172+
execute_command: "{{ .Vars }} exec sudo -E -S bash '{{ .Path }}'"
173+
- type: file
174+
source: /var/tmp/image-metadata-{{ user `image_name` }}.tar.bz2
175+
destination: tmp/image-metadata-{{ user `image_name` }}.tar.bz2
176+
direction: download
177+
post-processors:
178+
-
179+
- type: docker-tag
180+
repository: "{{ user `docker_repository` }}"
181+
tag: "{{ user `docker_tag` }}"
182+
only:
183+
- docker
184+
- type: shell-local
185+
scripts: bin/docker-push
186+
environment_vars:
187+
- DOCKER_DEST={{ user `docker_repository` }}:{{ user `docker_tag` }}
188+
only:
189+
- docker
190+
-
191+
- type: shell-local
192+
script: bin/job-board-register
193+
environment_vars:
194+
- IMAGE_NAME={{ user `image_name` }}
195+
only:
196+
- googlecompute
197+
- type: shell-local
198+
script: bin/job-board-register
199+
environment_vars:
200+
- IMAGE_NAME={{ user `docker_repository` }}:{{ user `docker_tag` }}
201+
only:
202+
- docker
203+
-
204+
- type: shell-local
205+
script: bin/write-latest-image-name

0 commit comments

Comments
 (0)