From da17b6a048e7b2de709bb65f9249c96b3e1a0a63 Mon Sep 17 00:00:00 2001 From: Martin Reinhardt Date: Sun, 1 May 2022 07:43:12 +0200 Subject: [PATCH] feat(Packer): Use latest Packer --- .bin/build.sh | 1 + docker/_base/build.json | 56 +++++++++++++++++----------- docker/ansible/build.json | 43 ++++++++++++--------- docker/java/openjdk11.json | 43 ++++++++++++--------- docker/java/openjdk17.json | 43 ++++++++++++--------- docker/nodejs/ansible/vars/main.yml | 4 +- docker/nodejs/build.json | 43 ++++++++++++--------- docker/nodejs/roles/requirements.yml | 4 +- docker/terraform/build.json | 43 ++++++++++++--------- 9 files changed, 169 insertions(+), 111 deletions(-) mode change 100755 => 100644 docker/nodejs/build.json diff --git a/.bin/build.sh b/.bin/build.sh index 9bf1e1e..9862104 100755 --- a/.bin/build.sh +++ b/.bin/build.sh @@ -21,6 +21,7 @@ tagImages() { docker tag toolisticon/terraform-builder:${1} toolisticon/terraform-builder:${2} docker tag toolisticon/nodejs-builder:${2} toolisticon/nodejs-builder:${2} docker tag toolisticon/openjdk11-builder:${1} toolisticon/openjdk11-builder:${2} + docker tag toolisticon/openjdk17-builder:${1} toolisticon/openjdk17-builder:${2} } prepareAndBuildAndTag () { diff --git a/docker/_base/build.json b/docker/_base/build.json index 22d75f2..8087f35 100644 --- a/docker/_base/build.json +++ b/docker/_base/build.json @@ -1,25 +1,37 @@ { - "builders": [{ - "type": "docker", - "image": "buildpack-deps:latest", - "pull": true, - "commit": true, - "changes": [ - "VOLUME /data", - "WORKDIR /data", - "ENTRYPOINT /bin/bash" - ] - }], - "provisioners":[{ - "type": "ansible", - "user": "root", - "playbook_file": "ansible/playbook.yml", - "extra_arguments": [ "-v" ] - } - ], - "post-processors": [[ { - "type": "docker-tag", + "builders": [ + { + "changes": [ + "VOLUME /data", + "WORKDIR /data", + "ENTRYPOINT /bin/bash" + ], + "commit": true, + "image": "buildpack-deps:latest", + "pull": true, + "type": "docker" + } + ], + "post-processors": [ + [ + { "repository": "toolisticon/base-builder-image", - "tag": "latest" - } ]] + "tags": [ + "latest" + ], + "type": "docker-tag" + } + ] + ], + "provisioners": [ + { + "extra_arguments": [ + "-v" + ], + "playbook_file": "ansible/playbook.yml", + "type": "ansible", + "user": "root" + } + ] } + diff --git a/docker/ansible/build.json b/docker/ansible/build.json index dc3ceaf..3ee7dac 100644 --- a/docker/ansible/build.json +++ b/docker/ansible/build.json @@ -1,31 +1,40 @@ { - "variables": { - "image_tag": "{{env `IMAGE_TAG`}}" - }, "builders": [ { - "type": "docker", + "changes": [ + "VOLUME /data", + "WORKDIR /data", + "ENTRYPOINT /bin/bash" + ], + "commit": true, "image": "toolisticon/base-builder-image", "pull": false, - "commit": true, - "changes": ["VOLUME /data", "WORKDIR /data", "ENTRYPOINT /bin/bash"] - } - ], - "provisioners": [ - { - "type": "ansible", - "user": "root", - "playbook_file": "ansible/playbook.yml", - "extra_arguments": ["-v"] + "type": "docker" } ], "post-processors": [ [ { - "type": "docker-tag", "repository": "toolisticon/ansible-builder", - "tag": "{{user `image_tag`}}" + "tags": [ + "{{user `image_tag`}}" + ], + "type": "docker-tag" } ] - ] + ], + "provisioners": [ + { + "extra_arguments": [ + "-v" + ], + "playbook_file": "ansible/playbook.yml", + "type": "ansible", + "user": "root" + } + ], + "variables": { + "image_tag": "{{env `IMAGE_TAG`}}" + } } + diff --git a/docker/java/openjdk11.json b/docker/java/openjdk11.json index d1a0f57..9af6403 100644 --- a/docker/java/openjdk11.json +++ b/docker/java/openjdk11.json @@ -1,31 +1,40 @@ { - "variables": { - "image_tag": "{{env `IMAGE_TAG`}}" - }, "builders": [ { - "type": "docker", + "changes": [ + "VOLUME /data", + "WORKDIR /data", + "ENTRYPOINT /bin/bash" + ], + "commit": true, "image": "toolisticon/base-builder-image", "pull": false, - "commit": true, - "changes": ["VOLUME /data", "WORKDIR /data", "ENTRYPOINT /bin/bash"] - } - ], - "provisioners": [ - { - "type": "ansible", - "user": "root", - "playbook_file": "ansible/openjdk11.yml", - "extra_arguments": ["-v"] + "type": "docker" } ], "post-processors": [ [ { - "type": "docker-tag", "repository": "toolisticon/openjdk11-builder", - "tag": "{{user `image_tag`}}" + "tags": [ + "{{user `image_tag`}}" + ], + "type": "docker-tag" } ] - ] + ], + "provisioners": [ + { + "extra_arguments": [ + "-v" + ], + "playbook_file": "ansible/openjdk11.yml", + "type": "ansible", + "user": "root" + } + ], + "variables": { + "image_tag": "{{env `IMAGE_TAG`}}" + } } + diff --git a/docker/java/openjdk17.json b/docker/java/openjdk17.json index 0f4ce1a..a16e77d 100644 --- a/docker/java/openjdk17.json +++ b/docker/java/openjdk17.json @@ -1,31 +1,40 @@ { - "variables": { - "image_tag": "{{env `IMAGE_TAG`}}" - }, "builders": [ { - "type": "docker", + "changes": [ + "VOLUME /data", + "WORKDIR /data", + "ENTRYPOINT /bin/bash" + ], + "commit": true, "image": "toolisticon/base-builder-image", "pull": false, - "commit": true, - "changes": ["VOLUME /data", "WORKDIR /data", "ENTRYPOINT /bin/bash"] - } - ], - "provisioners": [ - { - "type": "ansible", - "user": "root", - "playbook_file": "ansible/openjdk17.yml", - "extra_arguments": ["-v"] + "type": "docker" } ], "post-processors": [ [ { - "type": "docker-tag", "repository": "toolisticon/openjdk17-builder", - "tag": "{{user `image_tag`}}" + "tags": [ + "{{user `image_tag`}}" + ], + "type": "docker-tag" } ] - ] + ], + "provisioners": [ + { + "extra_arguments": [ + "-v" + ], + "playbook_file": "ansible/openjdk17.yml", + "type": "ansible", + "user": "root" + } + ], + "variables": { + "image_tag": "{{env `IMAGE_TAG`}}" + } } + diff --git a/docker/nodejs/ansible/vars/main.yml b/docker/nodejs/ansible/vars/main.yml index dc53937..9e01e18 100755 --- a/docker/nodejs/ansible/vars/main.yml +++ b/docker/nodejs/ansible/vars/main.yml @@ -1,3 +1,3 @@ --- -nodejs_version: "14.x" -nvm_node_version: "16.5.0" \ No newline at end of file +nodejs_version: "16.x" +nvm_node_version: "16.5.0" diff --git a/docker/nodejs/build.json b/docker/nodejs/build.json old mode 100755 new mode 100644 index e6dc42e..426cb53 --- a/docker/nodejs/build.json +++ b/docker/nodejs/build.json @@ -1,31 +1,40 @@ { - "variables": { - "image_tag": "{{env `IMAGE_TAG`}}" - }, "builders": [ { - "type": "docker", + "changes": [ + "VOLUME /data", + "WORKDIR /data", + "ENTRYPOINT /bin/bash" + ], + "commit": true, "image": "toolisticon/base-builder-image", "pull": false, - "commit": true, - "changes": ["VOLUME /data", "WORKDIR /data", "ENTRYPOINT /bin/bash"] - } - ], - "provisioners": [ - { - "type": "ansible", - "user": "root", - "playbook_file": "ansible/playbook.yml", - "extra_arguments": ["-v"] + "type": "docker" } ], "post-processors": [ [ { - "type": "docker-tag", "repository": "toolisticon/nodejs-builder", - "tag": "{{user `image_tag`}}" + "tags": [ + "{{user `image_tag`}}" + ], + "type": "docker-tag" } ] - ] + ], + "provisioners": [ + { + "extra_arguments": [ + "-v" + ], + "playbook_file": "ansible/playbook.yml", + "type": "ansible", + "user": "root" + } + ], + "variables": { + "image_tag": "{{env `IMAGE_TAG`}}" + } } + diff --git a/docker/nodejs/roles/requirements.yml b/docker/nodejs/roles/requirements.yml index c557a51..97c2719 100644 --- a/docker/nodejs/roles/requirements.yml +++ b/docker/nodejs/roles/requirements.yml @@ -1,7 +1,7 @@ --- - src: geerlingguy.nodejs - version: "5.0.0" + version: "6.0.0" - src: stephdewit.nvm - version: "v3.2.0" + version: "v3.3.0" diff --git a/docker/terraform/build.json b/docker/terraform/build.json index 9c67b4e..692d3a6 100644 --- a/docker/terraform/build.json +++ b/docker/terraform/build.json @@ -1,31 +1,40 @@ { - "variables": { - "image_tag": "{{env `IMAGE_TAG`}}" - }, "builders": [ { - "type": "docker", + "changes": [ + "VOLUME /data", + "WORKDIR /data", + "ENTRYPOINT /bin/bash" + ], + "commit": true, "image": "toolisticon/base-builder-image", "pull": false, - "commit": true, - "changes": ["VOLUME /data", "WORKDIR /data", "ENTRYPOINT /bin/bash"] - } - ], - "provisioners": [ - { - "type": "ansible", - "user": "root", - "playbook_file": "ansible/playbook.yml", - "extra_arguments": ["-v"] + "type": "docker" } ], "post-processors": [ [ { - "type": "docker-tag", "repository": "toolisticon/terraform-builder", - "tag": "{{user `image_tag`}}" + "tags": [ + "{{user `image_tag`}}" + ], + "type": "docker-tag" } ] - ] + ], + "provisioners": [ + { + "extra_arguments": [ + "-v" + ], + "playbook_file": "ansible/playbook.yml", + "type": "ansible", + "user": "root" + } + ], + "variables": { + "image_tag": "{{env `IMAGE_TAG`}}" + } } +