-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update to align with other docker release pipelines
- Loading branch information
1 parent
acf410d
commit 938fc07
Showing
10 changed files
with
114 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,6 @@ jobs: | |
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | ||
outputs: | ||
version: ${{ steps.release-inputs.outputs.version }} | ||
is-docker-release: ${{ steps.semver.outputs.is-pre-release == 0 }} | ||
|
||
steps: | ||
- name: Check out repository | ||
|
@@ -48,12 +47,6 @@ jobs: | |
echo "archive-name=$archive_name" >> $GITHUB_OUTPUT | ||
echo "version=version" >> $GITHUB_OUTPUT | ||
- name: Audit version to determine if it is a pre-release | ||
id: semver | ||
uses: dbt-labs/actions/[email protected] | ||
with: | ||
version: ${{ steps.release-inputs.outputs.version }} | ||
|
||
- name: Build `dbt-postgres` | ||
uses: dbt-labs/dbt-adapters/.github/actions/build-hatch@main | ||
with: | ||
|
@@ -68,10 +61,11 @@ jobs: | |
docker-release: | ||
name: "Docker Release" | ||
needs: [release] | ||
if: ${{ needs.release.outputs.is-docker-release }} | ||
if: ${{ !failure() && !cancelled() }} | ||
permissions: | ||
packages: write | ||
uses: dbt-labs/dbt-release/.github/workflows/release-docker.yml@main | ||
uses: dbt-labs/dbt-release/.github/workflows/release-docker.yml@docker-release | ||
with: | ||
package: "dbt-postgres" | ||
package: ${{ github.event.repository.name }} | ||
version_number: ${{ needs.release.outputs.version }} | ||
test_run: ${{ inputs.deploy-to == 'test' }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,18 @@ | ||
ARG build_for=linux/amd64 | ||
# this image gets published to GHCR for production use | ||
ARG py_version=3.10.7 | ||
|
||
FROM --platform=$build_for python:3.10.7-slim-bullseye as base | ||
|
||
# ref is updated automatically every final release via bumpversion | ||
ARG [email protected] | ||
FROM python:$py_version-slim-bullseye as base | ||
|
||
RUN apt-get update \ | ||
&& apt-get dist-upgrade -y \ | ||
&& apt-get install -y --no-install-recommends \ | ||
git \ | ||
ssh-client \ | ||
software-properties-common \ | ||
make \ | ||
build-essential \ | ||
ca-certificates \ | ||
libpq-dev \ | ||
build-essential=12.9 \ | ||
ca-certificates=20210119 \ | ||
git=1:2.30.2-1+deb11u2 \ | ||
libpq-dev=13.14-0+deb11u1 \ | ||
make=4.3-4.1 \ | ||
openssh-client=1:8.4p1-5+deb11u3 \ | ||
software-properties-common=0.96.20.2-2.1 \ | ||
&& apt-get clean \ | ||
&& rm -rf \ | ||
/var/lib/apt/lists/* \ | ||
|
@@ -24,10 +22,16 @@ RUN apt-get update \ | |
ENV PYTHONIOENCODING=utf-8 | ||
ENV LANG=C.UTF-8 | ||
|
||
RUN python -m pip install --upgrade pip setuptools wheel --no-cache-dir | ||
RUN python -m pip install --upgrade "pip==24.0" "setuptools==69.2.0" "wheel==0.43.0" --no-cache-dir | ||
|
||
|
||
FROM base as dbt-postgres | ||
Check failure on line 28 in docker/Dockerfile Wiz Inc. (266a8a9c32) / Wiz IaC ScannerMissing User Instruction
Raw output
|
||
|
||
ARG commit_ref=main | ||
|
||
HEALTHCHECK CMD dbt --version || exit 1 | ||
|
||
WORKDIR /usr/app/dbt/ | ||
ENTRYPOINT ["dbt"] | ||
|
||
FROM base as dbt-postgres | ||
RUN python -m pip install --no-cache-dir "dbt-postgres @ git+https://github.com/dbt-labs/${dbt_postgres_ref}" | ||
RUN python -m pip install --no-cache-dir "dbt-postgres @ git+https://github.com/dbt-labs/dbt-postgres@${commit_ref}" | ||
Check warning on line 37 in docker/Dockerfile Wiz Inc. (266a8a9c32) / Wiz IaC ScannerUnpinned Package Version in Pip Install
Raw output
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# this image does not get published, it is intended for local development only, see `Makefile` for usage | ||
FROM ubuntu:22.04 as base | ||
|
||
# prevent python installation from asking for time zone region | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
|
||
# add python repository | ||
RUN apt-get update \ | ||
Check notice on line 8 in docker/dev.Dockerfile Wiz Inc. (266a8a9c32) / Wiz IaC ScannerAPT-GET Not Avoiding Additional Packages
Raw output
|
||
&& apt-get install -y software-properties-common=0.99.22.9 \ | ||
&& add-apt-repository -y ppa:deadsnakes/ppa \ | ||
&& apt-get clean \ | ||
&& rm -rf \ | ||
/var/lib/apt/lists/* \ | ||
/tmp/* \ | ||
/var/tmp/* | ||
|
||
# install python | ||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
build-essential=12.9ubuntu3 \ | ||
git-all=1:2.34.1-1ubuntu1.10 \ | ||
libpq-dev=14.11-0ubuntu0.22.04.1 \ | ||
python3.8=3.8.19-1+jammy1 \ | ||
python3.8-dev=3.8.19-1+jammy1 \ | ||
python3.8-distutils=3.8.19-1+jammy1 \ | ||
python3.8-venv=3.8.19-1+jammy1 \ | ||
python3-pip=22.0.2+dfsg-1ubuntu0.4 \ | ||
python3-wheel=0.37.1-2ubuntu0.22.04.1 \ | ||
&& apt-get clean \ | ||
&& rm -rf \ | ||
/var/lib/apt/lists/* \ | ||
/tmp/* \ | ||
/var/tmp/* | ||
|
||
# update the default system interpreter to the newly installed version | ||
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1 | ||
|
||
# install python dependencies | ||
RUN python3 -m pip install --upgrade --no-cache-dir "hatch==1.9.1" | ||
|
||
|
||
FROM base as dbt-postgres-dev | ||
Check failure on line 42 in docker/dev.Dockerfile Wiz Inc. (266a8a9c32) / Wiz IaC ScannerMissing User Instruction
Raw output
|
||
|
||
HEALTHCHECK CMD python3 --version || exit 1 | ||
|
||
# send stdout/stderr to terminal | ||
ENV PYTHONUNBUFFERED=1 | ||
|
||
# setup mount for local code | ||
WORKDIR /opt/code | ||
VOLUME /opt/code | ||
|
||
# create a virtual environment | ||
RUN python3 -m venv /opt/venv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters