diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index de3af6cf386723523401061601451beb3ec52943..23452de2ac3196e7897e70170e45806951df0908 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -build: +build-34: stage: build image: name: gcr.io/kaniko-project/executor:debug @@ -6,4 +6,13 @@ build: script: - mkdir -p /kaniko/.docker - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json - - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:${CI_COMMIT_TAG:-$CI_COMMIT_SHORT_SHA} --destination $CI_REGISTRY_IMAGE:latest + - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/34.Dockerfile --destination $CI_REGISTRY_IMAGE:34-${CI_COMMIT_TAG:-$CI_COMMIT_SHORT_SHA} --destination $CI_REGISTRY_IMAGE:34-latest +build-35: + stage: build + image: + name: gcr.io/kaniko-project/executor:debug + entrypoint: [""] + script: + - mkdir -p /kaniko/.docker + - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json + - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/35.Dockerfile --destination $CI_REGISTRY_IMAGE:35-${CI_COMMIT_TAG:-$CI_COMMIT_SHORT_SHA} --destination $CI_REGISTRY_IMAGE:35-latest diff --git a/Dockerfile b/34.Dockerfile similarity index 97% rename from Dockerfile rename to 34.Dockerfile index 538cd06f9006edc71d0a9c44197bd4d2afcf03bd..24660c4fd5dd8af9eb4f4b1c7e00a613b2c25c8b 100644 --- a/Dockerfile +++ b/34.Dockerfile @@ -1,4 +1,4 @@ -FROM openjdk:8-jdk as builder +FROM openjdk:8-jdk AS builder # define arguments for versions to be used for platform and build tools ARG PLATFORM=34 diff --git a/35.Dockerfile b/35.Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..a6303833ca5d8ff0eb9624e0e91fe9f8448c946b --- /dev/null +++ b/35.Dockerfile @@ -0,0 +1,28 @@ +FROM openjdk:8-jdk AS builder + +# define arguments for versions to be used for platform and build tools +ARG PLATFORM=35 +ARG BUILD_TOOLS=35.0.0 + +RUN apt-get --quiet update --yes && \ + apt-get --quiet install --yes wget tar unzip lib32stdc++6 lib32z1 +RUN wget --quiet --output-document=android-sdk.zip https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip && \ + unzip -q android-sdk.zip -d android-sdk-linux && \ + rm android-sdk.zip +RUN mkdir android-sdk-linux/licenses && \ + printf "8933bad161af4178b1185d1a37fbf41ea5269c55\nd56f5187479451eabf01fb78af6dfcb131a6481e\n24333f8a63b6825ea9c5514f83c2829b004d1fee" > android-sdk-linux/licenses/android-sdk-license && \ + printf "84831b9409646a918e30573bab4c9c91346d8abd" > android-sdk-linux/licenses/android-sdk-preview-license +RUN android-sdk-linux/tools/bin/sdkmanager --update > /dev/null +RUN android-sdk-linux/tools/bin/sdkmanager \ + "platforms;android-${PLATFORM}" \ + "build-tools;${BUILD_TOOLS}" \ + "extras;google;m2repository" \ + "extras;android;m2repository" > /dev/null + +FROM openjdk:17-jdk-bullseye +COPY --from=builder /android-sdk-linux /android-sdk-linux +ENV PATH=$PATH:$ANDROID_HOME/platform-tools/ +ENV ANDROID_SDK_ROOT=$PWD/android-sdk-linux +ENV PLATFORM=$PLATFORM +ENV BUILD_TOOLS=$BUILD_TOOLS +ENV GRADLE_OPTS="-Dorg.gradle.daemon=False"