-
Notifications
You must be signed in to change notification settings - Fork 119
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: podman multiarch support #1157
feat: podman multiarch support #1157
Conversation
Thanks for making a pull request! 😃 |
popd | ||
{{- end }} | ||
|
||
echo "done" | ||
|
||
:SKIP |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a new line at the end
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. I have added the new line.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1157 +/- ##
==========================================
+ Coverage 14.79% 14.82% +0.02%
==========================================
Files 90 90
Lines 8401 8385 -16
==========================================
Hits 1243 1243
+ Misses 6835 6819 -16
Partials 323 323 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few suggestions.
@@ -29,6 +29,10 @@ if not %basename% == "scripts" ( | |||
REM go to the parent directory so that all the relative paths will be correct | |||
cd {{ .RelParentOfSourceDir }} | |||
|
|||
SET CONTAINER_RUNTIME={{ .ContainerRuntime }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to the buildimages.bat
and pushimages.bat
file, we should now also allow the user to choose the container runtime while executing the buildandpushimages_multiarch.bat
file.
move2kube/assets/built-in/transformers/dockerfile/dockerimagebuildscript/templates/buildimages.bat
Line 18 in 565394b
:: 2) buildimages.bat podman |
move2kube/assets/built-in/transformers/dockerfile/dockerimagebuildscript/templates/buildimages.bat
Line 29 in 565394b
SET CONTAINER_RUNTIME=%1% |
move2kube/assets/built-in/transformers/containerimagespushscript/templates/pushimages.bat
Line 19 in 565394b
:: 3) pushimages.bat index.docker.io your_registry_namespace podman |
move2kube/assets/built-in/transformers/containerimagespushscript/templates/pushimages.bat
Line 23 in 565394b
SET CONTAINER_RUNTIME=%3% |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then we can also add an example on how to specify the container runtime (along with registry namespace/registry url/platforms) while executing the file .
Line 19 in 565394b
:: 3) buildandpush_multiarchimages.bat quay.io your_quay_username linux/amd64,linux/arm64,linux/s390x |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, I have made the changes.
@@ -36,13 +36,28 @@ fi | |||
if [ "$#" -eq 3 ]; then | |||
PLATFORMS=$3 | |||
fi | |||
|
|||
CONTAINER_RUNTIME={{ .ContainerRuntime }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to the buildimages.sh
and pushimages.sh
file, we should now also allow the user to choose the container runtime while executing the buildandpushimages_multiarch.sh
file.
move2kube/assets/built-in/transformers/dockerfile/dockerimagebuildscript/templates/buildimages.sh
Line 19 in 565394b
# 2) ./buildimages.sh podman |
move2kube/assets/built-in/transformers/dockerfile/dockerimagebuildscript/templates/buildimages.sh
Line 27 in 565394b
CONTAINER_RUNTIME=$1 |
move2kube/assets/built-in/transformers/containerimagespushscript/templates/pushimages.sh
Line 20 in 565394b
# 3) ./pushimages.sh index.docker.io your_registry_namespace podman |
move2kube/assets/built-in/transformers/containerimagespushscript/templates/pushimages.sh
Line 30 in 565394b
CONTAINER_RUNTIME=$3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here also we can add an example on how to specify the container runtime (along with registry namespace/registry url/platforms) while executing the file.
Line 20 in 565394b
# 3) ./buildandpush_multiarchimages.sh quay.io your_quay_username linux/amd64,linux/arm64,linux/s390x |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, I have made the changes.
Also, @shashank381 can you please add Soumil as the co-author in this PR, as part of this PR has been taken from the original PR #1101. |
1d8dbdf
to
bd679bf
Compare
bd679bf
to
3c96f4f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please also test the following scenarios and see if things are working as expected or not -
./buildandpush_multiarchimages.bat podman index.docker.io <your_quay_username> linux/amd64,linux/arm64,linux/s390x
./buildandpush_multiarchimages.bat docker index.docker.io <your_quay_username>
./buildandpush_multiarchimages.bat podman
./buildandpush_multiarchimages.bat
|
||
IF "%1"=="docker" ( | ||
shift | ||
GOTO DOCKER_CONTAINER_RUNTIME |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because of this GOTO
, the code till line 64 will get skipped and even if the user specifies registry url/ registry namespace/ platforms along with the container runtime while running the script, it will get ignored.
) | ||
IF "%1"=="podman" ( | ||
shift | ||
GOTO PODMAN_CONTAINER_RUNTIME |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because of this GOTO
, the code till line 64 will get skipped and even if the user specifies registry url/ registry namespace/ platforms while running the script, it will get ignored.
GOTO PODMAN_CONTAINER_RUNTIME | ||
) | ||
SET CONTAINER_RUNTIME={{ .ContainerRuntime }} | ||
GOTO DOCKER_CONTAINER_RUNTIME |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because of this GOTO
also, the code till line 64 will get skipped and even if the user specifies registry url/ registry namespace/ platforms while running the script, it will get ignored.
Signed-off-by: Soumil Paranjpay <soumil.paranjpay@gmail.com>
Signed-off-by: shashank381 <satholashashank@gmail.com>
Signed-off-by: shashank381 <satholashashank@gmail.com>
Signed-off-by: shashank381 <satholashashank@gmail.com>
Signed-off-by: shashank381 <satholashashank@gmail.com>
3c96f4f
to
99e8b8b
Compare
Thank you @Akash-Nayak I have updated the bat file.
I dont have a windows machine to test these cases. |
@Akash-Nayak I have manually validated logic for bat scripts. Thankyou. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks @shashank381!
No description provided.