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

replaced dockle with hadolint #326

Merged
Merged
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
16 changes: 6 additions & 10 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ env:
DEV_REGISTRY_NAME: k8scc01covidacrdev
TRIVY_VERSION: "v0.43.1"
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
HADOLINT_VERSION: "2.12.0"

jobs:
build:
Expand Down Expand Up @@ -65,6 +66,11 @@ 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 ./Dockerfile --no-fail

- name: Build image locally
run: |
Expand All @@ -76,16 +82,6 @@ jobs:
run: |
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/jupyter-apis-aaw2:${{ github.sha }} --exit-code 1 --timeout=20m --security-checks vuln --severity CRITICAL

# Run Dockle -> Will need to be replace to hadolint but on hold
# - name: Run dockle
# uses: goodwithtech/dockle-action@main
# with:
# image: localhost:5000/jupyter-apis-aaw2:${{ github.sha }}
# format: 'list'
# exit-code: '0'
# exit-level: 'fatal'
# ignore: 'DKL-DI-0006'

# Container build and push to a Azure Container registry (ACR)
- name: Push to ACR if necessary
Expand Down
Loading