Skip to content

Commit

Permalink
Comment jobs related to GitHub Worker images, as CodeTotal is not act…
Browse files Browse the repository at this point in the history
…ively maintained + Make gitpod job failure not blocking (#4242)

* Comment jobs related to GitHub Worker images, as CodeTotal is not actively maintained

* Make gitpod workflow not blocking until uv install is fixed
  • Loading branch information
nvuillam authored Nov 10, 2024
1 parent e1a9f2a commit df3d6c0
Show file tree
Hide file tree
Showing 12 changed files with 171 additions and 188 deletions.
38 changes: 18 additions & 20 deletions .github/workflows/deploy-ALPHA-flavors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,40 +110,38 @@ jobs:
BUILD_DATE=${{ env.BUILD_DATE }}
BUILD_REVISION=${{ github.sha }}
BUILD_VERSION=alpha
--squash # Enable image squashing to produce a single-layer image
load: false
push: true
secrets: |
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
tags: |
ghcr.io/oxsecurity/megalinter-${{ matrix.flavor }}:alpha
- name: Build Worker Image
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile-worker
platforms: linux/amd64
build-args: |
MEGALINTER_BASE_IMAGE=ghcr.io/oxsecurity/megalinter-${{ matrix.flavor }}:alpha
BUILD_DATE=${{ env.BUILD_DATE }}
BUILD_REVISION=${{ github.sha }}
BUILD_VERSION=alpha
--squash # Enable image squashing to produce a single-layer image
load: false
push: true
secrets: |
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
tags: |
ghcr.io/oxsecurity/megalinter-worker-${{ matrix.flavor }}:alpha
# - name: Build Worker Image
# uses: docker/build-push-action@v6
# with:
# context: .
# file: Dockerfile-worker
# platforms: linux/amd64
# build-args: |
# MEGALINTER_BASE_IMAGE=ghcr.io/oxsecurity/megalinter-${{ matrix.flavor }}:alpha
# BUILD_DATE=${{ env.BUILD_DATE }}
# BUILD_REVISION=${{ github.sha }}
# BUILD_VERSION=alpha
# load: false
# push: true
# secrets: |
# GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
# tags: |
# ghcr.io/oxsecurity/megalinter-worker-${{ matrix.flavor }}:alpha

##############################################
# Check Docker image security with Trivy #
##############################################
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: 'ghcr.io/oxsecurity/megalinter-worker-${{ matrix.flavor }}:alpha'
image-ref: ghcr.io/oxsecurity/megalinter-${{ matrix.flavor }}:alpha
format: 'table'
exit-code: '1'
ignore-unfixed: true
Expand Down
37 changes: 17 additions & 20 deletions .github/workflows/deploy-ALPHA.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ jobs:
BUILD_DATE=${{ env.BUILD_DATE }}
BUILD_REVISION=${{ github.sha }}
BUILD_VERSION=alpha
--squash # Enable image squashing to produce a single-layer image
load: false
push: true
secrets: |
Expand All @@ -118,7 +117,6 @@ jobs:
BUILD_DATE=${{ env.BUILD_DATE }}
BUILD_REVISION=${{ github.sha }}
BUILD_VERSION=alpha
--squash # Enable image squashing to produce a single-layer image
load: false
push: true
secrets: |
Expand All @@ -127,21 +125,20 @@ jobs:
ghcr.io/oxsecurity/megalinter:alpha
# ghcr.io/oxsecurity/megalinter:alpha-${{ github.sha }}

- name: Build & Push Worker Docker Image
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile-worker
platforms: linux/amd64
build-args: |
MEGALINTER_BASE_IMAGE=ghcr.io/oxsecurity/megalinter:alpha
BUILD_DATE=${{ env.BUILD_DATE }}
BUILD_REVISION=${{ github.sha }}
BUILD_VERSION=alpha
--squash # Enable image squashing to produce a single-layer image
load: false
push: true
secrets: |
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
tags: |
ghcr.io/oxsecurity/megalinter-worker:alpha
# - name: Build & Push Worker Docker Image
# uses: docker/build-push-action@v6
# with:
# context: .
# file: Dockerfile-worker
# platforms: linux/amd64
# build-args: |
# MEGALINTER_BASE_IMAGE=ghcr.io/oxsecurity/megalinter:alpha
# BUILD_DATE=${{ env.BUILD_DATE }}
# BUILD_REVISION=${{ github.sha }}
# BUILD_VERSION=alpha
# load: false
# push: true
# secrets: |
# GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
# tags: |
# ghcr.io/oxsecurity/megalinter-worker:alpha
68 changes: 33 additions & 35 deletions .github/workflows/deploy-BETA-flavors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,17 +127,17 @@ jobs:
tags: |
type=raw,value=
- name: Docker Metadata action (Worker Docker Hub)
uses: docker/[email protected]
id: meta-w-dhub
with:
images: |
name=docker.io/${{ github.repository }}-worker-${{ matrix.flavor }}
flavor: |
latest=false
prefix=beta
tags: |
type=raw,value=
# - name: Docker Metadata action (Worker Docker Hub)
# uses: docker/[email protected]
# id: meta-w-dhub
# with:
# images: |
# name=docker.io/${{ github.repository }}-worker-${{ matrix.flavor }}
# flavor: |
# latest=false
# prefix=beta
# tags: |
# type=raw,value=

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
Expand Down Expand Up @@ -170,7 +170,6 @@ jobs:
BUILD_DATE=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}
BUILD_VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
BUILD_REVISION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}
--squash # Enable image squashing to produce a single-layer image
load: false
push: ${{ github.event_name != 'pull_request' }}
secrets: |
Expand All @@ -183,29 +182,28 @@ jobs:
workflow: mirror-docker-image.yml
inputs: '{ "source-image": "${{ steps.meta.outputs.tags }}", "target-image": "${{ steps.meta-dhub.outputs.tags }}" }'

- name: Build Worker Image
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile-worker
platforms: linux/amd64
build-args: |
MEGALINTER_BASE_IMAGE=${{ fromJson(steps.meta-w.outputs.json).tags[0]}}
BUILD_DATE=${{ fromJSON(steps.meta-w.outputs.json).labels['org.opencontainers.image.created'] }}
BUILD_VERSION=${{ fromJSON(steps.meta-w.outputs.json).labels['org.opencontainers.image.version'] }}
BUILD_REVISION=${{ fromJSON(steps.meta-w.outputs.json).labels['org.opencontainers.image.revision'] }}
--squash # Enable image squashing to produce a single-layer image
load: false
push: ${{ github.event_name != 'pull_request' }}
secrets: |
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
tags: ${{ steps.meta-w.outputs.tags }}

- name: Invoke Mirror docker image workflow (Main image)
uses: benc-uk/workflow-dispatch@v1
with:
workflow: mirror-docker-image.yml
inputs: '{ "source-image": "${{ steps.meta-w.outputs.tags }}", "target-image": "${{ steps.meta-w-dhub.outputs.tags }}" }'
# - name: Build Worker Image
# uses: docker/build-push-action@v6
# with:
# context: .
# file: Dockerfile-worker
# platforms: linux/amd64
# build-args: |
# MEGALINTER_BASE_IMAGE=${{ fromJson(steps.meta-w.outputs.json).tags[0]}}
# BUILD_DATE=${{ fromJSON(steps.meta-w.outputs.json).labels['org.opencontainers.image.created'] }}
# BUILD_VERSION=${{ fromJSON(steps.meta-w.outputs.json).labels['org.opencontainers.image.version'] }}
# BUILD_REVISION=${{ fromJSON(steps.meta-w.outputs.json).labels['org.opencontainers.image.revision'] }}
# load: false
# push: ${{ github.event_name != 'pull_request' }}
# secrets: |
# GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
# tags: ${{ steps.meta-w.outputs.tags }}

# - name: Invoke Mirror docker image workflow (Main image)
# uses: benc-uk/workflow-dispatch@v1
# with:
# workflow: mirror-docker-image.yml
# inputs: '{ "source-image": "${{ steps.meta-w.outputs.tags }}", "target-image": "${{ steps.meta-w-dhub.outputs.tags }}" }'

##############################################
# Check Docker image security with Trivy #
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/deploy-BETA-linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,6 @@ jobs:
BUILD_DATE=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}
BUILD_VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
BUILD_REVISION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}
--squash # Enable image squashing to produce a single-layer image
load: false
push: ${{ github.event_name != 'pull_request' }}
secrets: |
Expand Down Expand Up @@ -277,7 +276,7 @@ jobs:
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: "${{ fromJson(steps.meta-dhub.outputs.json).tags[0]}}"
image-ref: "${{ fromJson(steps.meta.outputs.json).tags[0]}}"
format: "table"
exit-code: "1"
ignore-unfixed: true
Expand Down
65 changes: 31 additions & 34 deletions .github/workflows/deploy-BETA.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,14 @@ jobs:
tags: |
type=raw,value=beta
- name: Docker Metadata action (Worker)
uses: docker/[email protected]
id: meta-w
with:
images: |
name=ghcr.io/${{ github.repository }}-worker
tags: |
type=raw,value=beta
# - name: Docker Metadata action (Worker)
# uses: docker/[email protected]
# id: meta-w
# with:
# images: |
# name=ghcr.io/${{ github.repository }}-worker
# tags: |
# type=raw,value=beta

- name: Docker Metadata action (Worker Server)
uses: docker/[email protected]
Expand Down Expand Up @@ -157,7 +157,6 @@ jobs:
BUILD_DATE=${{ fromJSON(steps.meta-s.outputs.json).labels['org.opencontainers.image.created'] }}
BUILD_VERSION=${{ fromJSON(steps.meta-s.outputs.json).labels['org.opencontainers.image.version'] }}
BUILD_REVISION=${{ fromJSON(steps.meta-s.outputs.json).labels['org.opencontainers.image.revision'] }}
--squash # Enable image squashing to produce a single-layer image
load: false
push: ${{ github.event_name != 'pull_request' }}
secrets: |
Expand All @@ -180,7 +179,6 @@ jobs:
BUILD_DATE=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}
BUILD_VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
BUILD_REVISION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}
--squash # Enable image squashing to produce a single-layer image
load: false
push: ${{ github.event_name != 'pull_request' }}
secrets: |
Expand All @@ -193,29 +191,28 @@ jobs:
workflow: mirror-docker-image.yml
inputs: '{ "source-image": "${{ steps.meta.outputs.tags }}", "target-image": "${{ steps.meta-dhub.outputs.tags }}" }'

- name: Build & Push Docker Worker Image
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile-worker
platforms: linux/amd64
build-args: |
MEGALINTER_BASE_IMAGE=${{ fromJson(steps.meta-w.outputs.json).tags[0]}}
BUILD_DATE=${{ fromJSON(steps.meta-w.outputs.json).labels['org.opencontainers.image.created'] }}
BUILD_VERSION=${{ fromJSON(steps.meta-w.outputs.json).labels['org.opencontainers.image.version'] }}
BUILD_REVISION=${{ fromJSON(steps.meta-w.outputs.json).labels['org.opencontainers.image.revision'] }}
--squash # Enable image squashing to produce a single-layer image
load: false
push: ${{ github.event_name != 'pull_request' }}
secrets: |
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
tags: ${{ steps.meta-w.outputs.tags }}

- name: Invoke Mirror docker image workflow (Worker image)
uses: benc-uk/workflow-dispatch@v1
with:
workflow: mirror-docker-image.yml
inputs: '{ "source-image": "${{ steps.meta-w.outputs.tags }}", "target-image": "${{ steps.meta-w-dhub.outputs.tags }}" }'
# - name: Build & Push Docker Worker Image
# uses: docker/build-push-action@v6
# with:
# context: .
# file: Dockerfile-worker
# platforms: linux/amd64
# build-args: |
# MEGALINTER_BASE_IMAGE=${{ fromJson(steps.meta-w.outputs.json).tags[0]}}
# BUILD_DATE=${{ fromJSON(steps.meta-w.outputs.json).labels['org.opencontainers.image.created'] }}
# BUILD_VERSION=${{ fromJSON(steps.meta-w.outputs.json).labels['org.opencontainers.image.version'] }}
# BUILD_REVISION=${{ fromJSON(steps.meta-w.outputs.json).labels['org.opencontainers.image.revision'] }}
# load: false
# push: ${{ github.event_name != 'pull_request' }}
# secrets: |
# GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
# tags: ${{ steps.meta-w.outputs.tags }}

# - name: Invoke Mirror docker image workflow (Worker image)
# uses: benc-uk/workflow-dispatch@v1
# with:
# workflow: mirror-docker-image.yml
# inputs: '{ "source-image": "${{ steps.meta-w.outputs.tags }}", "target-image": "${{ steps.meta-w-dhub.outputs.tags }}" }'

# ###############################
# # Run tests for code coverage #
Expand All @@ -234,7 +231,7 @@ jobs:
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: "${{ steps.meta-dhub.outputs.tags }}"
image-ref: "${{ steps.meta.outputs.tags }}"
format: 'table'
exit-code: '1'
ignore-unfixed: true
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/deploy-DEV-linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ jobs:
BUILD_DATE=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}
BUILD_VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
BUILD_REVISION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}
--squash # Enable image squashing to produce a single-layer image
load: true
push: false
secrets: |
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/deploy-DEV.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ jobs:
BUILD_VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
BUILD_REVISION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}
MEGA_LINTER_BASE_IMAGE="oxsecurity/megalinter:beta"
--squash # Enable image squashing to produce a single-layer image
load: true
push: false
secrets: |
Expand Down Expand Up @@ -121,7 +120,6 @@ jobs:
BUILD_DATE=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}
BUILD_VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
BUILD_REVISION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}
--squash # Enable image squashing to produce a single-layer image
load: true
push: false
secrets: |
Expand Down Expand Up @@ -149,7 +147,6 @@ jobs:
BUILD_DATE=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}
BUILD_VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
BUILD_REVISION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}
--squash # Enable image squashing to produce a single-layer image
load: true
push: false
secrets: |
Expand Down
Loading

0 comments on commit df3d6c0

Please sign in to comment.