Skip to content

Commit

Permalink
replaced dockle with hadolint 2.0 (#211)
Browse files Browse the repository at this point in the history
* replaced dockle with hadolint

---------

Co-authored-by: Mathis Marcotte <[email protected]>
  • Loading branch information
mathis-marcotte and Mathis Marcotte authored Jul 3, 2024
1 parent a2e109a commit 1933a58
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 17 deletions.
23 changes: 6 additions & 17 deletions .github/workflows/build-centraldashboard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ jobs:
username: ${{ secrets.DEV_REGISTRY_USERNAME }}
password: ${{ secrets.DEV_REGISTRY_PASSWORD }}

- name: Run Hadolint
run: |
sudo curl -L https://github.com/hadolint/hadolint/releases/download/v${{ env.HADOLINT_VERSION }}/hadolint-Linux-x86_64 --output hadolint
sudo chmod +x hadolint
./hadolint ./components/centraldashboard/Dockerfile --no-fail
# Container build to a Azure Container registry (ACR)
- name: Docker build
run: |
Expand All @@ -73,23 +79,6 @@ jobs:
curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin ${{ env.TRIVY_VERSION }}
trivy image localhost:5000/kubeflow/centraldashboard-aaw2:${{ github.sha }} --exit-code 1 --timeout=20m --security-checks vuln --severity CRITICAL
# Run Dockle
# - name: Run dockle
# uses: goodwithtech/dockle-action@main
# with:
# image: localhost:5000/kubeflow/centraldashboard-aaw2:${{ github.sha }}
# format: 'list'
# exit-code: '0'
# exit-level: 'fatal'
# ignore: 'DKL-DI-0006'

# On hold to replace dockle
# - name: Run Hadolint
# run: |
# sudo curl -L https://github.com/hadolint/hadolint/releases/download/v${{ env.HADOLINT_VERSION }}/hadolint-Linux-x86_64 --output hadolint
# sudo chmod +x hadolint
# ./hadolint localhost:5000/kubeflow/centraldashboard-aaw2 --no-fail

# Pushes if this is a push to master or an update to a PR that has auto-deploy label
- name: Test if we should push to ACR
id: should-i-push
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/build-kfam.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ env:
CLUSTER_RESOURCE_GROUP: k8s-cancentral-01-covid-aks
TRIVY_VERSION: "v0.43.1"
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
HADOLINT_VERSION: "2.12.0"

jobs:
build-push:
Expand Down Expand Up @@ -57,6 +58,12 @@ jobs:
username: ${{ secrets.DEV_REGISTRY_USERNAME }}
password: ${{ secrets.DEV_REGISTRY_PASSWORD }}

- name: Run Hadolint
run: |
sudo curl -L https://github.com/hadolint/hadolint/releases/download/v${{ env.HADOLINT_VERSION }}/hadolint-Linux-x86_64 --output hadolint
sudo chmod +x hadolint
./hadolint ./components/access-management/Dockerfile --no-fail
# Container build to a Azure Container registry (ACR)
- name: Docker build
run: |
Expand Down

0 comments on commit 1933a58

Please sign in to comment.