From 93e4f43198c4bab1b979e6fa340aa93efbdb2945 Mon Sep 17 00:00:00 2001 From: Simon Redman Date: Mon, 25 Mar 2024 22:24:43 +0000 Subject: [PATCH] Use allowed CI image ## Summary A recent (couple of weeks ago?) change to the Invent policies requires that we use a docker image from an allow list. The cleanest fix is to just use the Ubuntu base image and install the JDK, which is approximately what we had before. We considered the Sysadmin Android image (https://invent.kde.org/sysadmin/ci-images/-/blob/master/android-qt66/Dockerfile?ref_type=heads), but we use a newer version of the SDK tools and a newer version of the JDK, at which point we may as well just install those since those are the only dependencies. We could consider building another custom docker image in the future if we see value to doing so. ## Test Plan ### Before: CI fails with: ``` ERROR: The "eclipse-temurin:17-jdk-focal" image is not present on list of allowed images: - invent-registry.kde.org/sysadmin/ci-images/*:* - ubuntu:* - debian:* - fedora:* - centos:* - opensuse/*:* - python:* - ruby:* - fsfe/reuse:* - quay.io/podman/stable:* ``` ### After: Build passes and drops .apk --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9f012846..58f3d31a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -15,11 +15,11 @@ variables: default: tags: - Linux - image: eclipse-temurin:17-jdk-focal + image: ubuntu:22.04 before_script: # Prepare system for use of sdkmanager - apt-get --quiet update --yes - - apt-get --quiet install --yes wget tar unzip lib32stdc++6 lib32z1 + - apt-get --quiet install --yes wget tar unzip lib32stdc++6 lib32z1 openjdk-17-jdk-headless - wget --quiet --output-document=android-sdk.zip https://dl.google.com/android/repository/commandlinetools-linux-10406996_latest.zip # Create the directory structure around cmdline-tools that sdkmanager is expecting - mkdir -p sdk/cmdline-tools