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

fix(dockerdigest): Allow to specify any OS, Architecture, or Variant #1981

Merged
merged 3 commits into from
Mar 7, 2024

Conversation

olblak
Copy link
Member

@olblak olblak commented Mar 6, 2024

This pullrequest fixes the dockerdigest plugin by allowing to set different os than linux

Test

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

updatecli.yaml
name: Get digest
sources:
  tag/windows/amd64:
    kind: dockerimage
    spec:
      architecture: windows/amd64
      image: eclipse-temurin
  digest/windows/amd64:
    kind: dockerdigest
    spec:
      architecture: windows/amd64
      image: eclipse-temurin
      tag: 8u402-b06-jre
      
conditions:
  digest/windows/amd64:
    kind: dockerimage
    disablesourceinput: true
    spec:
      architecture: windows/amd64
      image: eclipse-temurin
      tag: latest
Before fix
##############
# GET DIGEST #
##############


SOURCES
=======

tag/windows/amd64
-----------------
Searching for version matching pattern "latest"
✔ Docker Image Tag "latest" found matching pattern "latest"

digest/windows/amd64
--------------------
ERROR: ✗ unable to retrieve image eclipse-temurin:8u402-b06-jre: no child with platform linux/windows/amd64 in index eclipse-temurin:8u402-b06-jre
ERROR: { ✗   { {  } }   ERROR: ✗ unable to retrieve image eclipse-temurin:8u402-b06-jre: no child with platform linux/windows/amd64 in index eclipse-temurin:8u402-b06-jre
} unable to retrieve image eclipse-temurin:8u402-b06-jre: no child with platform linux/windows/amd64 in index eclipse-temurin:8u402-b06-jre
Pipeline "Get digest" failed
Skipping due to:
	sources stage:	"unable to retrieve image eclipse-temurin:8u402-b06-jre: no child with platform linux/windows/amd64 in index eclipse-temurin:8u402-b06-jre"

=============================

REPORTS:



✗ Get digest:
	Source:
		✗ [digest/windows/amd64] 
		✔ [tag/windows/amd64] 
	Condition:
		- [digest/windows/amd64] 

Run Summary
===========
Pipeline(s) run:
  * Changed:	0
  * Failed:	1
  * Skipped:	0
  * Succeeded:	0
  * Total:	1
ERROR: ✗ 1 over 1 pipeline failed
ERROR: command failed: 1 over 1 pipeline failed
[1]    3597 exit 1     updatecli diff --config /tmp/updatecli.yaml
After fix
++++++++++++
+ PIPELINE +
++++++++++++



##############
# GET DIGEST #
##############


SOURCES
=======

digest/windows/amd64
--------------------
✔ Docker Image Tag eclipse-temurin:8u402-b06-jre resolved to digest index.docker.io/library/eclipse-temurin:8u402-b06-jre@sha256:a4d0749b3dd4ee66ca0bb1d1c8d5c66740aad7f9992331b882db089d63b83d4f

tag/windows/amd64
-----------------
Searching for version matching pattern "latest"
✔ Docker Image Tag "latest" found matching pattern "latest"


CONDITIONS:
===========

digest/windows/amd64
--------------------
✔ docker image eclipse-temurin:latest found

=============================

REPORTS:



- Get digest:
	Source:
		✔ [digest/windows/amd64] 
		✔ [tag/windows/amd64] 
	Condition:
		✔ [digest/windows/amd64] 

Run Summary
===========
Pipeline(s) run:
  * Changed:	0
  * Failed:	0
  * Skipped:	1
  * Succeeded:	0
  * Total:	1

Additional Information

Tradeoff

Potential improvement

Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
@olblak olblak added bug Something isn't working resource-dockerdigest Resource of kind dockerDigest labels Mar 6, 2024
@olblak olblak added this to the 0.74.0 milestone Mar 6, 2024
@olblak olblak merged commit a15dc5b into updatecli:main Mar 7, 2024
6 checks passed
@olblak olblak changed the title fix(dockerdigest): Allow to specify none linux os fix(dockerdigest): Allow to specify any os Mar 7, 2024
@olblak olblak changed the title fix(dockerdigest): Allow to specify any os fix(dockerdigest): Allow to specify any OS Mar 7, 2024
@olblak olblak changed the title fix(dockerdigest): Allow to specify any OS fix(dockerdigest): Allow to specify any OS, Architecture, or Variant Mar 7, 2024
@olblak olblak deleted the fix/dockerdigest/multios branch April 3, 2024 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working resource-dockerdigest Resource of kind dockerDigest
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant