Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: dockerimage support for setting os and variant #1604

Merged
merged 4 commits into from
Sep 18, 2023

Conversation

mcwarman
Copy link
Member

@mcwarman mcwarman commented Sep 18, 2023

Fix #1606

Added support for setting OS and variant, leave default as linux:

  • architecture: amd64
  • architecture: windows/amd64
  • architecture: linux/arm/v7

NOTE: It isn't possible to set variant without os

Also added and fixed some logging.

Test

To test this pull request, you can run the following commands:

cd pkg/plugins/resources/dockerimage/
go test
Details

sources:
  lastVersion:
    kind: githubrelease
    name: Get the latest Adoptium JDK11 version
    spec:
      owner: "adoptium"
      repository: "temurin11-binaries"
      token: '{{ requiredEnv "GITHUB_TOKEN" }}'
      versionfilter:
        kind: regex
        # jdk-11.0.12+7(https://github.com/adoptium/temurin11-binaries/releases/tag/jdk-11.0.12%2B7) is OK
        # jdk-11.0.16.1+1 (https://github.com/adoptium/temurin11-binaries/releases/tag/jdk-11.0.16.1%2B1) is OK
        pattern: "^jdk-11.(\\d*).(\\d*).(\\d*)(.(\\d*))+(\\d*)$"
    transformers:
      - trimprefix: "jdk-"
      - replacer:
          from: +
          to: _

conditions:
  checkTemurinAlpineDockerImage:
    kind: dockerimage
    name: Check if the container image "eclipse-temurin:<lastVersion>-jdk-alpine" is available
    disablesourceinput: true
    spec:
      architecture: amd64
      image: eclipse-temurin
      tag: '{{source "lastVersion" }}-jdk-alpine'

  checkTemurinDebianDockerImages:
    kind: dockerimage
    name: Check if the container image "eclipse-temurin:<lastVersion>-jdk-focal" is available
    disablesourceinput: true
    spec:
      architectures:
        - amd64
        - arm64
        - s390x
        - linux/arm/v7
      image: eclipse-temurin
      tag: '{{source "lastVersion" }}-jdk-focal'
  checkTemurinNanoserver2019DockerImage:
    kind: dockerimage
    name: Check if the container image "eclipse-temurin:<lastVersion>-jdk-nanoserver-1809" is available
    disablesourceinput: true
    spec:
      architecture: windows/amd64
      image: eclipse-temurin
      tag: '{{source "lastVersion" }}-jdk-nanoserver-1809'
  checkTemurinWindowsCore2019DockerImage:
    kind: dockerimage
    name: Check if the container image "eclipse-temurin:<lastVersion>-jdk-windowsservercore-1809" is available
    disablesourceinput: true
    spec:
      architecture: windows/amd64
      image: eclipse-temurin
      tag: '{{source "lastVersion" }}-jdk-windowsservercore-1809'
  checkTemurinNanoserver2022DockerImage:
    kind: dockerimage
    name: Check if the container image "eclipse-temurin:<lastVersion>-jdk-nanoserver-ltsc2022" is available
    disablesourceinput: true
    spec:
      architecture: windows/amd64
      image: eclipse-temurin
      tag: '{{source "lastVersion" }}-jdk-nanoserver-ltsc2022'
  checkTemurinWindowsCore2022DockerImage:
    kind: dockerimage
    name: Check if the container image "eclipse-temurin:<lastVersion>-jdk-windowsservercore-18ltsc202209" is available
    disablesourceinput: true
    spec:
      architecture: windows/amd64
      image: eclipse-temurin
      tag: '{{source "lastVersion" }}-jdk-windowsservercore-ltsc2022'

@mcwarman mcwarman marked this pull request as draft September 18, 2023 18:59
@mcwarman mcwarman marked this pull request as ready for review September 18, 2023 19:44
@mcwarman mcwarman marked this pull request as draft September 18, 2023 19:45
@mcwarman mcwarman force-pushed the feature/dockerimage-os-support branch from 615e8b0 to edc9eba Compare September 18, 2023 20:18
@mcwarman mcwarman force-pushed the feature/dockerimage-os-support branch from edc9eba to dc38487 Compare September 18, 2023 20:19
@mcwarman mcwarman marked this pull request as ready for review September 18, 2023 20:21
@mcwarman mcwarman changed the title feat: dockerimage support for setting operating system feat: dockerimage support for setting os and variant Sep 18, 2023
@olblak olblak added the enhancement New feature or request label Sep 18, 2023
@olblak olblak merged commit 6049c8e into updatecli:main Sep 18, 2023
6 checks passed
@mcwarman mcwarman deleted the feature/dockerimage-os-support branch September 25, 2023 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for OS on dockerimage resource
2 participants