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

migrate updater to use jinja templating #447

Merged
merged 6 commits into from
Oct 25, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix suggestions
gdams committed Oct 25, 2023
commit c257d901030452c3bbd29e94895b3c5329a076cf
2 changes: 1 addition & 1 deletion docker_templates/alpine-linux.Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@

FROM {{ base_image }}

{% include 'partials/header.j2' %}
{% include 'partials/nix-env.j2' %}

# fontconfig and ttf-dejavu added to support serverside image generation by Java programs
# java-cacerts added to support adding CA certificates to the Java keystore
2 changes: 1 addition & 1 deletion docker_templates/centos.Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@

FROM {{ base_image }}

{% include 'partials/header.j2' %}
{% include 'partials/nix-env.j2' %}

RUN yum install -y tzdata openssl curl wget ca-certificates fontconfig gzip tar {% if version|int >= 13 %}binutils {% endif %}\
&& yum clean all
File renamed without changes.
2 changes: 1 addition & 1 deletion docker_templates/ubi9-minimal.Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@

FROM {{ base_image }}

{% include 'partials/header.j2' %}
{% include 'partials/nix-env.j2' %}

RUN microdnf install -y binutils tzdata openssl wget ca-certificates fontconfig glibc-langpack-en gzip tar \
&& microdnf clean all
2 changes: 1 addition & 1 deletion docker_templates/ubuntu.Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@

FROM {{ base_image }}

{% include 'partials/header.j2' %}
{% include 'partials/nix-env.j2' %}

RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata curl wget ca-certificates fontconfig locales p11-kit {% if version|int >= 13 %}binutils {% endif %}\
21 changes: 21 additions & 0 deletions generate_dockerfiles.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Script that generates the `eclipse-temurin` config file for the official docker
# image github repo and the doc updates for the unofficial docker image repo.
# Process to update the official docker image repo
# 1. Run ./update_all.sh to update all the dockerfiles in the current repo.
# 2. Submit PR to push the newly generated dockerfiles to the current repo.
# 3. After above PR is merged, git pull the latest changes.
# 4. Run this command
#

import os

import requests
21 changes: 21 additions & 0 deletions test_generate_dockerfiles.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Script that generates the `eclipse-temurin` config file for the official docker
# image github repo and the doc updates for the unofficial docker image repo.
# Process to update the official docker image repo
# 1. Run ./update_all.sh to update all the dockerfiles in the current repo.
# 2. Submit PR to push the newly generated dockerfiles to the current repo.
# 3. After above PR is merged, git pull the latest changes.
# 4. Run this command
#

import unittest
from unittest.mock import Mock, mock_open, patch