Skip to content

Commit 460f7d9

Browse files
committed
ansible: add new jenkins-workspace machines
Add two new `jenkins-workspace` machines: - test-equinix-ubuntu2204-x64-1 - test-equinix-ubuntu2204-x64-2
1 parent b8bba8b commit 460f7d9

File tree

8 files changed

+42
-10
lines changed

8 files changed

+42
-10
lines changed

ansible/inventory.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,10 @@ hosts:
139139
- equinix:
140140
ubuntu2004_docker-arm64-1: {ip: 145.40.81.219}
141141
ubuntu2004_docker-arm64-3: {ip: 145.40.99.31}
142+
# when adding, removing or changing the IPs below,
143+
# remember to update Jenkins worker IP whitelist in github-bot
144+
ubuntu2204-x64-1: {ip: 147.75.72.255, alias: jenkins-workspace-7}
145+
ubuntu2204-x64-2: {ip: 145.40.96.123, alias: jenkins-workspace-8}
142146

143147
- ibm:
144148
aix71-ppc64_be-3:

ansible/playbooks/jenkins/worker/create.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@
5757
#
5858

5959
- hosts:
60+
- test-equinix-ubuntu2204-x64-1
61+
- test-equinix-ubuntu2204-x64-2
6062
- test-packetnet-ubuntu1804-x64-1
6163
- test-packetnet-ubuntu1804-x64-2
6264
- test-ibm-ubuntu1804-x64-1
@@ -80,6 +82,8 @@
8082
- hosts:
8183
- test
8284
- release
85+
- "!test-equinix-ubuntu2204-x64-1"
86+
- "!test-equinix-ubuntu2204-x64-2"
8387
- "!test-packetnet-ubuntu1804-x64-1"
8488
- "!test-packetnet-ubuntu1804-x64-2"
8589
- "!test-ibm-ubuntu1804-x64-1"

ansible/roles/baselayout/vars/main.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,5 +209,9 @@ packages: {
209209
# Default gcc/g++ package is 7.
210210
ubuntu1804: [
211211
'gcc-6,g++-6,gcc-8,g++-8',
212+
],
213+
214+
ubuntu2204: [
215+
'gcc,g++,python2,python3,python-is-python3',
212216
],
213217
}

ansible/roles/github-bot/templates/environment-file.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ JENKINS_JOB_CITGM={{ envs.jenkins_job_citgm }}
1111
JENKINS_BUILD_TOKEN_CITGM={{ envs.jenkins_build_token_citgm }}
1212
JENKINS_JOB_NODE={{ envs.jenkins_job_node }}
1313
JENKINS_BUILD_TOKEN_NODE={{ envs.jenkins_build_token_node }}
14-
JENKINS_WORKER_IPS=147.75.70.237,51.15.200.62,51.15.218.201,163.172.186.154,147.75.66.203,147.75.81.67,52.117.26.14
14+
JENKINS_WORKER_IPS=147.75.70.237,51.15.200.62,51.15.218.201,163.172.186.154,147.75.66.203,147.75.81.67,52.117.26.14,147.75.72.255,145.40.96.123

ansible/roles/java-base/vars/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ packages: {
1919
'smartos': 'openjdk8',
2020
'ubuntu': 'openjdk-8-jre-headless',
2121
'ubuntu1404': 'oracle-java8-installer',
22+
'ubuntu2204': 'openjdk-17-jre-headless',
2223
}
2324

2425
java_package_name: "{{ packages[os]|default(packages[os|stripversion])|default(omit) }}"
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
3+
#
4+
# ubuntu series: python 3
5+
#
6+
7+
- name: install pip
8+
package: name=python3-pip state=present
9+
10+
- name: install tap2junit
11+
pip: name=tap2junit state=present

ansible/roles/jenkins-worker/vars/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ init: {
1111
freebsd: 'freebsd',
1212
ibmi: 'ibmi73',
1313
macos: 'macos',
14-
systemd: ['centos7', 'debian8', 'debian9', 'debian10', 'fedora', 'rhel7', 'rhel8', 'ubuntu1604', 'ubuntu1804'],
14+
systemd: ['centos7', 'debian8', 'debian9', 'debian10', 'fedora', 'rhel7', 'rhel8', 'ubuntu1604', 'ubuntu1804','ubuntu2204'],
1515
svc: 'smartos',
1616
upstart: ['ubuntu12', 'ubuntu1404'],
1717
zos_start: 'zos'

ansible/roles/jenkins-workspace/tasks/main.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,14 @@
4040

4141
# Repository needs to be created in /home/iojs/build because the partition with
4242
# free space might be mounted in a way that does not include /home/binary_tmp
43+
- name: Create repository parent directory
44+
file:
45+
path: "{{ home }}/{{ server_user }}/build/"
46+
state: directory
47+
owner: "{{ server_user }}"
48+
group: "{{ server_user }}"
49+
mode: 0755
50+
4351
- name: Create repository directory
4452
file:
4553
path: "{{ home }}/{{ server_user }}/build/binary_tmp.git"
@@ -114,14 +122,20 @@
114122
url: https://deb.nodesource.com/gpgkey/nodesource.gpg.key
115123
state: present
116124

125+
- name: Get Ubuntu codename
126+
ansible.builtin.command: "lsb_release -s -c"
127+
changed_when: no
128+
check_mode: no
129+
register: release_codename
130+
117131
- name: Add nodesource repo
118132
apt_repository:
119-
repo: deb https://deb.nodesource.com/node_14.x xenial main
133+
repo: deb https://deb.nodesource.com/node_14.x {{ release_codename.stdout }} main
120134
state: present
121135

122136
- name: Remove earlier nodesource repos
123137
apt_repository:
124-
repo: deb https://deb.nodesource.com/node_12.x xenial main
138+
repo: deb https://deb.nodesource.com/node_12.x {{ release_codename.stdout }} main
125139
state: absent
126140

127141
- name: Install node
@@ -130,12 +144,6 @@
130144
state: present
131145
update_cache: yes
132146

133-
- name: Upgrade pip2
134-
pip:
135-
name: pip
136-
executable: pip2
137-
state: latest
138-
139147
- name: Upgrade pip3
140148
pip:
141149
name: pip

0 commit comments

Comments
 (0)