Skip to content

Commit 853ea7b

Browse files
committed
Upgrade golang version in test runner image
1 parent 2e892ec commit 853ea7b

File tree

5 files changed

+17
-16
lines changed

5 files changed

+17
-16
lines changed

tools/cloud-build/daily-tests/ansible_playbooks/base-integration-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@
143143
ansible.builtin.add_host:
144144
hostname: "{{ remote_ip }}"
145145
groups: [remote_host]
146-
when: remote_ip | ansible.utils.ipaddr
146+
when: (remote_ip | default('')) | ansible.utils.ipaddr != false
147147

148148
- name: Wait for host tasks
149149
ansible.builtin.include_tasks: tasks/wait-for-host.yml

tools/cloud-build/daily-tests/ansible_playbooks/htcondor-integration-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
ansible.builtin.add_host:
7171
hostname: "{{ access_ip.stdout }}"
7272
groups: [remote_host]
73-
when: access_ip.stdout | ansible.utils.ipaddr
73+
when: (access_ip.stdout | default('')) | ansible.utils.ipaddr != false
7474
## Setup firewall for cloud build
7575
- name: Create firewall rule
7676
register: fw_result

tools/cloud-build/daily-tests/ansible_playbooks/slurm-integration-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@
173173
ansible.builtin.add_host:
174174
hostname: "{{ login_ip }}"
175175
groups: [remote_host]
176-
when: login_ip | ansible.utils.ipaddr
176+
when: (login_ip | default('')) | ansible.utils.ipaddr != false
177177

178178
- name: Wait for host tasks
179179
ansible.builtin.include_tasks: tasks/wait-for-host.yml

tools/cloud-build/daily-tests/ansible_playbooks/tasks/get_instance_ids.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
---
1616
- name: Gather instance information
1717
delegate_to: localhost
18-
when: deployment_name is defined and deployment_name | string
18+
when: deployment_name is defined and deployment_name | length > 0
1919
changed_when: false
2020
register: instances
2121
until: instances.rc == 0
@@ -30,7 +30,7 @@
3030
ansible.builtin.debug:
3131
var: instances.stdout
3232
- name: Print Cloud Logging command
33-
when: instances is defined and instances.stdout | list
33+
when: instances is defined and (instances.stdout | from_json | length > 0)
3434
ansible.builtin.debug:
3535
msg: gcloud logging --project {{ project }} read 'logName="projects/{{ project }}/logs/google_metadata_script_runner" AND resource.labels.instance_id="{{ item.id }}"' --format="table(timestamp, jsonPayload.message)" --freshness 24h | tac
36-
loop: "{{ instances.stdout }}"
36+
loop: "{{ instances.stdout | from_json | default([]) }}"

tools/cloud-build/images/test-runner/Dockerfile

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,41 +12,42 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
FROM golang:bullseye
15+
FROM golang:bookworm
1616

1717
ENV GOCACHE=/ghpc_go_cache
1818

1919
# copy the source code, to build the binary
2020
# use `/workspace` to match path in cache for future builds
2121
COPY ./ /workspace
2222

23-
RUN curl -fsSL https://apt.releases.hashicorp.com/gpg | apt-key add - && \
24-
apt-get -y update && apt-get -y install \
23+
RUN apt-get -y update && apt-get -y install \
24+
gnupg \
2525
# `software-properties-common` providers `add-apt-repository`
2626
software-properties-common \
2727
keychain \
2828
# `dnsutils` provides `dig` used by integration tests
2929
dnsutils && \
3030
# install terraform and packer
31-
apt-add-repository "deb [arch=$(dpkg --print-architecture)] https://apt.releases.hashicorp.com bullseye main" && \
31+
curl -fsSL https://apt.releases.hashicorp.com/gpg | gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg && \
32+
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg arch=$(dpkg --print-architecture)] https://apt.releases.hashicorp.com bookworm main" | tee /etc/apt/sources.list.d/hashicorp.list && \
3233
apt-get -y update && \
3334
# Pin Terraform version to 1.12.2
3435
apt-get install -y unzip python3-pip python3-netaddr terraform=1.12.2-1 packer jq && \
3536
# install gcloud
37+
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg && \
3638
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" \
3739
| tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \
38-
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg \
39-
| apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - && \
4040
apt-get -y update && apt-get -y install google-cloud-sdk && \
4141
apt-get -y install kubectl && \
4242
# following is required to execute kubectl commands
4343
apt-get -y install google-cloud-cli-gke-gcloud-auth-plugin && \
4444
apt-get clean && rm -rf /var/lib/apt/lists/* && \
4545
# install ansible and python dependencies
46-
pip install --no-cache-dir --upgrade pip && \
47-
pip install --no-cache-dir -r https://raw.githubusercontent.com/GoogleCloudPlatform/slurm-gcp/master/scripts/requirements.txt && \
48-
pip install --no-cache-dir ansible && \
49-
pip install --no-cache-dir paramiko && \
46+
pip install --break-system-packages --no-cache-dir --upgrade pip && \
47+
pip install --break-system-packages --no-cache-dir -r https://raw.githubusercontent.com/GoogleC
48+
loudPlatform/slurm-gcp/master/scripts/requirements.txt && \
49+
pip install --break-system-packages --no-cache-dir ansible && \
50+
pip install --break-system-packages --no-cache-dir paramiko && \
5051
rm -rf ~/.cache/pip/* && \
5152
# compile the binary to warm up `/ghpc_go_cache`
5253
cd /workspace && make gcluster && \

0 commit comments

Comments
 (0)