From 871389d79ad4f2acc20299ad18d64fe8046a419e Mon Sep 17 00:00:00 2001 From: Victor Fernandez de Alba Date: Wed, 29 May 2024 20:27:07 +0200 Subject: [PATCH 1/4] Update docker_build_push GHA to v5 --- project/cookiecutter.json | 32 ++++++-------------------------- 1 file changed, 6 insertions(+), 26 deletions(-) diff --git a/project/cookiecutter.json b/project/cookiecutter.json index 42e3ad0..b367cf1 100644 --- a/project/cookiecutter.json +++ b/project/cookiecutter.json @@ -10,32 +10,12 @@ "volto_version": "{{ 'Yes' | latest_volto }}", "python_package_name": "{{ cookiecutter.project_slug|replace(' ', '')|replace('-', '.') }}", "frontend_addon_name": "volto-{{ cookiecutter.python_package_name|replace('_', '-')|replace('.', '-') }}", - "language_code": [ - "en", - "de", - "es", - "pt-br", - "nl", - "fi" - ], + "language_code": ["en", "de", "es", "pt-br", "nl", "fi"], "github_organization": "collective", - "container_registry": [ - "github", - "docker_hub", - "gitlab" - ], - "devops_cache": [ - "1", - "0" - ], - "devops_ansible": [ - "1", - "0" - ], - "devops_gha_deploy": [ - "1", - "0" - ], + "container_registry": ["github", "docker_hub", "gitlab"], + "devops_cache": ["1", "0"], + "devops_ansible": ["1", "0"], + "devops_gha_deploy": ["1", "0"], "__npm_package_name": "{{ cookiecutter.frontend_addon_name }}", "__folder_name": "{{ cookiecutter.project_slug }}", "__python_package_name_upper": "{{ cookiecutter.python_package_name | pascal_case }}", @@ -61,7 +41,7 @@ "__gha_version_docker_qemu": "v3", "__gha_version_docker_buildx": "v3", "__gha_version_docker_login": "v3", - "__gha_version_docker_build_push": "v4", + "__gha_version_docker_build_push": "v5", "__devops_host": "{{ cookiecutter.hostname | extract_host }}", "__devops_compose_name": "{{ cookiecutter.project_slug | replace('.','-') | replace('_','-') }}", "__devops_stack_name": "{{ cookiecutter.hostname | replace('.','-') | replace('_','-') }}", From 94c567b5b7cdad5bb635d2b9ecbdbc70f1fc7adf Mon Sep 17 00:00:00 2001 From: Victor Fernandez de Alba Date: Wed, 29 May 2024 20:27:40 +0200 Subject: [PATCH 2/4] Fix use case where you are building image with a previous local build --- .../{{ cookiecutter.__folder_name }}/backend/Dockerfile | 2 ++ .../backend/Dockerfile.acceptance | 2 ++ 2 files changed, 4 insertions(+) diff --git a/sub/project_settings/{{ cookiecutter.__folder_name }}/backend/Dockerfile b/sub/project_settings/{{ cookiecutter.__folder_name }}/backend/Dockerfile index 6d88ea5..19e753f 100644 --- a/sub/project_settings/{{ cookiecutter.__folder_name }}/backend/Dockerfile +++ b/sub/project_settings/{{ cookiecutter.__folder_name }}/backend/Dockerfile @@ -16,6 +16,8 @@ RUN < Date: Wed, 29 May 2024 20:28:09 +0200 Subject: [PATCH 3/4] Fix redundant VOLTO_VERSION and PLONE_VERSION in Makefile --- project/{{ cookiecutter.__folder_name }}/Makefile | 2 -- 1 file changed, 2 deletions(-) diff --git a/project/{{ cookiecutter.__folder_name }}/Makefile b/project/{{ cookiecutter.__folder_name }}/Makefile index 1e0bae6..425b1de 100644 --- a/project/{{ cookiecutter.__folder_name }}/Makefile +++ b/project/{{ cookiecutter.__folder_name }}/Makefile @@ -26,8 +26,6 @@ GREEN=`tput setaf 2` RESET=`tput sgr0` YELLOW=`tput setaf 3` -VOLTO_VERSION=$(VOLTO_VERSION) PLONE_VERSION=$(PLONE_VERSION) - .PHONY: all all: install From f5470ce3fdf16addb5f7a435d0952ad330e84e8e Mon Sep 17 00:00:00 2001 From: Victor Fernandez de Alba Date: Wed, 29 May 2024 20:36:54 +0200 Subject: [PATCH 4/4] Missing command --- .../{{ cookiecutter.__folder_name }}/backend/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sub/project_settings/{{ cookiecutter.__folder_name }}/backend/Makefile b/sub/project_settings/{{ cookiecutter.__folder_name }}/backend/Makefile index 8f61929..9dc822b 100644 --- a/sub/project_settings/{{ cookiecutter.__folder_name }}/backend/Makefile +++ b/sub/project_settings/{{ cookiecutter.__folder_name }}/backend/Makefile @@ -130,7 +130,11 @@ test: $(BIN_FOLDER)/tox ## run tests test-coverage: $(BIN_FOLDER)/tox ## run tests with coverage $(BIN_FOLDER)/tox -e coverage -# Build Docker image +# Build Docker images .PHONY: build-image build-image: ## Build Docker Images @DOCKER_BUILDKIT=1 docker build . -t $(IMAGE_NAME_PREFIX)-backend:$(IMAGE_TAG) -f Dockerfile --build-arg PLONE_VERSION=$(PLONE_VERSION) + +.PHONY: acceptance-image-build +acceptance-image-build: ## Build Docker Images + @DOCKER_BUILDKIT=1 docker build . -t $(IMAGE_NAME_PREFIX)-backend-acceptance:$(IMAGE_TAG) -f Dockerfile.acceptance --build-arg PLONE_VERSION=$(PLONE_VERSION)