From 3aa198784ca3ddda82302e0d24db4e254db196a6 Mon Sep 17 00:00:00 2001 From: gindibay Date: Fri, 24 Sep 2021 17:49:36 +0300 Subject: [PATCH] Downgrades postgres 13 and 12 image versions since latest versions are debian 11 --- .../workflows/publish_docker_images_on_push.yml | 14 +++++++++++--- Dockerfile | 14 ++++++++------ postgres-12/Dockerfile | 2 +- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/.github/workflows/publish_docker_images_on_push.yml b/.github/workflows/publish_docker_images_on_push.yml index 0c18916..140b5d7 100644 --- a/.github/workflows/publish_docker_images_on_push.yml +++ b/.github/workflows/publish_docker_images_on_push.yml @@ -12,12 +12,16 @@ on: - "**" jobs: build_and_publish_images: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest strategy: fail-fast: false matrix: image_type: - latest + - alpine + - postgres_12 + - postgres_14 + - nightly steps: - name: Checkout repository uses: actions/checkout@v2 @@ -26,7 +30,7 @@ jobs: run: git clone -b v0.8.4 --depth=1 https://github.com/citusdata/tools.git tools - name: Install package dependencies - run: sudo apt-get update && sudo apt install libcurl4-openssl-dev libssl-dev python3-testresources + run: sudo apt-get update && sudo apt install libcurl4-openssl-dev libssl-dev - name: Install python requirements run: python -m pip install -r tools/packaging_automation/requirements.txt @@ -35,4 +39,8 @@ jobs: run: docker login -u "${DOCKERHUB_USER_NAME}" -p "${DOCKERHUB_PASSWORD}" - name: Build and publish docker images - run: docker build -t citusdata/citus:pg13 . + run: | + python -m tools.packaging_automation.publish_docker \ + --github_ref "${GITHUB_REF}" \ + --pipeline_trigger_type "${GITHUB_EVENT_NAME}" \ + --image_type "${{ matrix.image_type }}" diff --git a/Dockerfile b/Dockerfile index 4c17978..c9d0af8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # This file is auto generated from it's template, # see citusdata/tools/packaging_automation/templates/docker/latest/latest.tmpl.dockerfile. -FROM postgres:13.4 +FROM postgres:13.3 ARG VERSION=10.2.0 LABEL maintainer="Citus Data https://citusdata.com" \ org.label-schema.name="Citus" \ @@ -17,11 +17,13 @@ ENV CITUS_VERSION ${VERSION}.citus-1 RUN apt-get update \ && apt-get install -y --no-install-recommends \ ca-certificates \ - curl - -RUN curl -s https://install.citusdata.com/community/deb.sh | bash - -RUN apt-get install -y postgresql-13-citus-10.2=10.2.0.citus-1 + curl \ + && curl -s https://install.citusdata.com/community/deb.sh | bash \ + && apt-get install -y postgresql-$PG_MAJOR-citus-10.2=$CITUS_VERSION \ + postgresql-$PG_MAJOR-hll=2.15.citus-1 \ + postgresql-$PG_MAJOR-topn=2.3.1 \ + && apt-get purge -y --auto-remove curl \ + && rm -rf /var/lib/apt/lists/* # add citus to default PostgreSQL config RUN echo "shared_preload_libraries='citus'" >> /usr/share/postgresql/postgresql.conf.sample diff --git a/postgres-12/Dockerfile b/postgres-12/Dockerfile index 1c7ca70..33f2a1f 100644 --- a/postgres-12/Dockerfile +++ b/postgres-12/Dockerfile @@ -1,6 +1,6 @@ # This file is auto generated from it's template, # see citusdata/tools/packaging_automation/templates/docker/postgres-12/postgres-12.tmpl.dockerfile. -FROM postgres:12.8 +FROM postgres:12.7 ARG VERSION=10.2.0 LABEL maintainer="Citus Data https://citusdata.com" \ org.label-schema.name="Citus" \