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

added hadolint to build pipelines #78

Merged
merged 1 commit into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 5 additions & 0 deletions .github/workflows/confbatstest-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ jobs:
TAGS+=($(grep "LABEL version" confbatstest/Dockerfile_build | cut -d '"' -f 2))
echo "${TAGS[*]}"

- uses: hadolint/[email protected]
with:
dockerfile: confbatstest/Dockerfile_build
ignore: DL3041 # https://github.com/hadolint/hadolint/wiki/DL3041

- name: Build image
id: build_image
uses: redhat-actions/buildah-build@v2
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/disconnected-csv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- uses: hadolint/[email protected]
with:
dockerfile: disconnected-csv/Dockerfile
ignore: DL3013 # https://github.com/hadolint/hadolint/wiki/DL3013

- uses: ./disconnected-csv
with:
CSV_FILE: ./disconnected-csv/tests/sample-clusterserviceversion.yaml
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/github-dispatches-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ jobs:
TAGS+=($(grep "LABEL version" github-dispatches/Dockerfile_build | cut -d '"' -f 2))
echo "${TAGS[*]}"

- uses: hadolint/[email protected]
with:
dockerfile: github-dispatches/Dockerfile_build

- name: Build image
id: build_image
uses: redhat-actions/buildah-build@v2
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/kyverno-cli-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ jobs:
TAGS+=($(grep "LABEL version" kyverno-cli/Dockerfile_build | cut -d '"' -f 2))
echo "${TAGS[*]}"

- uses: hadolint/[email protected]
with:
dockerfile: kyverno-cli/Dockerfile_build
ignore: DL3041 # https://github.com/hadolint/hadolint/wiki/DL3041

- name: Build image
id: build_image
uses: redhat-actions/buildah-build@v2
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/redhat-csp-download-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ jobs:
TAGS+=($(grep "LABEL version" redhat-csp-download/Dockerfile_build | cut -d '"' -f 2))
echo "${TAGS[*]}"

- uses: hadolint/[email protected]
with:
dockerfile: redhat-csp-download/Dockerfile_build

- name: Build image
id: build_image
uses: redhat-actions/buildah-build@v2
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/set-helm-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- uses: hadolint/[email protected]
with:
dockerfile: set-helm-version/Dockerfile

- name: set-helm-version
uses: ./set-helm-version
with:
Expand Down
2 changes: 1 addition & 1 deletion confbatstest/Dockerfile_build
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ RUN export BATS_VERSION=master && \
USER 1001

COPY requirements.txt /requirements.txt
RUN pip3 install -r /requirements.txt && \
RUN pip3 install --no-cache-dir -r /requirements.txt && \
yq --version

COPY entrypoint.sh /entrypoint.sh
Expand Down
3 changes: 2 additions & 1 deletion disconnected-csv/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@ COPY ./add_related_image.py /add_related_image.py
RUN curl -sL https://github.com/mikefarah/yq/releases/download/v4.35.2/yq_linux_amd64 -o /usr/bin/yq && chmod +x /usr/bin/yq && \
curl -sL https://github.com/stedolan/jq/releases/download/jq-1.7/jq-linux64 -o /usr/bin/jq && chmod +x /usr/bin/jq && \
dnf install -qy python3-pip && \
dnf clean all && \
useradd -m github -d /home/github -u 1001 -g 0 && \
chmod +x /attach_image_digests.sh

USER 1001

RUN pip3 install --user ruamel.yaml
RUN pip3 install --no-cache-dir --user ruamel.yaml

WORKDIR /github/workspace

Expand Down
2 changes: 1 addition & 1 deletion kyverno-cli/Dockerfile_build
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ RUN export BATS_VERSION=master && \
USER 1001

COPY requirements.txt /requirements.txt
RUN pip3 install -r /requirements.txt && \
RUN pip3 install --no-cache-dir -r /requirements.txt && \
yq --version

COPY entrypoint.sh /entrypoint.sh
Expand Down
2 changes: 1 addition & 1 deletion redhat-csp-download/Dockerfile_build
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ LABEL "com.github.actions.branding.icon"="monitor"
LABEL "com.github.actions.branding.color"="purple"

COPY ansible /ansible
RUN pip3 install -r /ansible/requirements.txt && \
RUN pip3 install --no-cache-dir -r /ansible/requirements.txt && \
ansible --version && \
ansible-galaxy --version && \
ansible-playbook --version
Expand Down
3 changes: 2 additions & 1 deletion set-helm-version/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ LABEL "com.github.actions.description"="Sets the Helm chart version and appVersi
LABEL "com.github.actions.icon"="package"
LABEL "com.github.actions.color"="purple"

WORKDIR /
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt

ADD entrypoint.py /entrypoint.py
COPY entrypoint.py /entrypoint.py
ENTRYPOINT [ "python", "/entrypoint.py" ]