diff --git a/changelog/fragments/reorder-docker-args.yaml b/changelog/fragments/reorder-docker-args.yaml new file mode 100644 index 00000000000..aacf029b7f7 --- /dev/null +++ b/changelog/fragments/reorder-docker-args.yaml @@ -0,0 +1,28 @@ +# entries is a list of entries to include in +# release notes and/or the migration guide +entries: + - description: > + (ansible/v1, helm/v1) Post-fixed positional directory argument `.` in `docker-build` make target to align with `podman` + kind: "change" + breaking: false + + # Migration can be defined to automatically add a section to + # the migration guide. This is required for breaking changes. + migration: + header: Move positional directory argument `.` in `docker-build` make target + body: > + The directory argument `.` in the `docker-build` make target was moved to the + last positional argument to align with `podman`'s expectations, making substitution + cleaner. In your `Makefile`, change: + + docker build . -t ${IMG} + + to + docker build -t ${IMG} . + + Alternatively, you could replace it programmatically + + ```sh + sed -i 's/docker build . -t ${IMG}/docker build -t ${IMG} ./' $(git grep -l 'docker.*build \. ') + ``` + diff --git a/internal/plugins/ansible/v1/scaffolds/internal/templates/makefile.go b/internal/plugins/ansible/v1/scaffolds/internal/templates/makefile.go index fcf32617f41..f5a4c6c2b37 100644 --- a/internal/plugins/ansible/v1/scaffolds/internal/templates/makefile.go +++ b/internal/plugins/ansible/v1/scaffolds/internal/templates/makefile.go @@ -93,7 +93,7 @@ undeploy: kustomize # Build the docker image docker-build: - docker build . -t ${IMG} + docker build -t ${IMG} . # Push the docker image docker-push: diff --git a/internal/plugins/helm/v1/scaffolds/internal/templates/makefile.go b/internal/plugins/helm/v1/scaffolds/internal/templates/makefile.go index c530b16970d..7fa3fa3a75e 100644 --- a/internal/plugins/helm/v1/scaffolds/internal/templates/makefile.go +++ b/internal/plugins/helm/v1/scaffolds/internal/templates/makefile.go @@ -93,7 +93,7 @@ undeploy: kustomize # Build the docker image docker-build: - docker build . -t ${IMG} + docker build -t ${IMG} . # Push the docker image docker-push: diff --git a/testdata/ansible/memcached-operator/Makefile b/testdata/ansible/memcached-operator/Makefile index f667456f0f1..8a74f8d6f47 100644 --- a/testdata/ansible/memcached-operator/Makefile +++ b/testdata/ansible/memcached-operator/Makefile @@ -56,7 +56,7 @@ undeploy: kustomize # Build the docker image docker-build: - docker build . -t ${IMG} + docker build -t ${IMG} . # Push the docker image docker-push: diff --git a/testdata/helm/memcached-operator/Makefile b/testdata/helm/memcached-operator/Makefile index a23f8fca9e6..4d3c17c7ec4 100644 --- a/testdata/helm/memcached-operator/Makefile +++ b/testdata/helm/memcached-operator/Makefile @@ -56,7 +56,7 @@ undeploy: kustomize # Build the docker image docker-build: - docker build . -t ${IMG} + docker build -t ${IMG} . # Push the docker image docker-push: