Skip to content

Commit

Permalink
Merge pull request #1553 from bdovaz/feature/arm-docker-image
Browse files Browse the repository at this point in the history
ARM64 docker images WIP merged into a dev branch, to continue development there.
  • Loading branch information
echoix authored Jan 17, 2023
2 parents 8b1ed86 + 29e2ac1 commit e223a1a
Show file tree
Hide file tree
Showing 88 changed files with 109,617 additions and 2,439 deletions.
10 changes: 8 additions & 2 deletions .automation/build_schemas_doc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
# Generate HTML documentation from JSON schemas, using json-schema-for-humans :)

generate-schema-doc ../megalinter/descriptors/schemas/megalinter-descriptor.jsonschema.json \
../docs/json-schemas/descriptor.html
../docs/json-schemas/descriptor.html \
--config minify=false \
--config expand_buttons=false \
--config link_to_reused_ref=false

generate-schema-doc ../megalinter/descriptors/schemas/megalinter-configuration.jsonschema.json \
../docs/json-schemas/configuration.html
../docs/json-schemas/configuration.html \
--config minify=false \
--config expand_buttons=false \
--config link_to_reused_ref=false
4 changes: 4 additions & 0 deletions .github/linters/.cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@
"Syft",
"Symlinks",
"Syntastic",
"TARGETPLATFORM",
"TEAMPROJECT",
"TEKTON",
"TERMIOS",
Expand Down Expand Up @@ -363,6 +364,7 @@
"Ywarn",
"Zepu",
"Zraku",
"aarch64",
"abefhkmnptuvx",
"abhith",
"absolutized",
Expand Down Expand Up @@ -392,6 +394,7 @@
"arctan",
"aren",
"argparse",
"armv6",
"arror",
"artefacts",
"asdict",
Expand Down Expand Up @@ -1095,6 +1098,7 @@
"returnrules",
"rexec",
"risd",
"riscv",
"rmfamily",
"rockspec",
"rockspecs",
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/auto-update-linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,14 @@ jobs:
run: echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> ${GITHUB_ENV}

###################################
# Build image locally for testing #
# Build images locally for testing #
###################################
- name: Build image
- name: Build images
shell: bash
run: docker buildx build --platform linux/amd64 --build-arg "BUILD_DATE=${BUILD_DATE}" --build-arg "BUILD_REVISION=auto_update_${GITHUB_SHA}" --build-arg "BUILD_VERSION=auto_update_${GITHUB_SHA}" --no-cache -t oxsecurity/megalinter:auto_update_${GITHUB_SHA} --load . | while read line ; do echo "$(date +'%H:%M:%S')| $line"; done;
run: |
docker buildx build --platform linux/amd64,linux/arm64 --build-arg "BUILD_DATE=${BUILD_DATE}" --build-arg "BUILD_REVISION=auto_update_${GITHUB_SHA}" --build-arg "BUILD_VERSION=auto_update_${GITHUB_SHA}" --no-cache -t oxsecurity/megalinter:auto_update_${GITHUB_SHA} .
docker buildx build --load --platform linux/amd64 -t oxsecurity/megalinter:auto_update_${GITHUB_SHA} .
docker buildx build --load --platform linux/arm64 -t oxsecurity/megalinter:auto_update_${GITHUB_SHA}:arm64 .
timeout-minutes: 60

#####################################
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-ALPHA-flavors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
IMAGE_REPO: oxsecurity/megalinter-${{ matrix.flavor }}
IMAGE_VERSION: alpha
DOCKERFILE_PATH: flavors/${{ matrix.flavor }}/Dockerfile
DOCKER_BUILD_PLATFORMS: linux/amd64
DOCKER_BUILD_PLATFORMS: linux/amd64,linux/arm64
REGISTRY: Docker
SQUASH: "true"
shell: bash
Expand All @@ -106,7 +106,7 @@ jobs:
IMAGE_REPO: oxsecurity/megalinter-${{ matrix.flavor }}
IMAGE_VERSION: alpha
DOCKERFILE_PATH: flavors/${{ matrix.flavor }}/Dockerfile
DOCKER_BUILD_PLATFORMS: linux/amd64
DOCKER_BUILD_PLATFORMS: linux/amd64,linux/arm64
REGISTRY: GCR
SQUASH: "true"
shell: bash
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-ALPHA.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
IMAGE_REPO: oxsecurity/megalinter
IMAGE_VERSION: alpha
DOCKERFILE_PATH: Dockerfile
DOCKER_BUILD_PLATFORMS: linux/amd64
DOCKER_BUILD_PLATFORMS: linux/amd64,linux/arm64
REGISTRY: Docker
shell: bash
run: .automation/upload-docker.sh
Expand All @@ -86,7 +86,7 @@ jobs:
IMAGE_REPO: oxsecurity/megalinter
IMAGE_VERSION: alpha
DOCKERFILE_PATH: Dockerfile
DOCKER_BUILD_PLATFORMS: linux/amd64
DOCKER_BUILD_PLATFORMS: linux/amd64,linux/arm64
REGISTRY: GCR
shell: bash
run: .automation/upload-docker.sh
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-BETA-flavors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
IMAGE_REPO: oxsecurity/megalinter-${{ matrix.flavor }}
IMAGE_VERSION: beta
DOCKERFILE_PATH: flavors/${{ matrix.flavor }}/Dockerfile
DOCKER_BUILD_PLATFORMS: linux/amd64
DOCKER_BUILD_PLATFORMS: linux/amd64,linux/arm64
REGISTRY: Docker
shell: bash
run: .automation/upload-docker.sh
Expand All @@ -109,7 +109,7 @@ jobs:
IMAGE_REPO: oxsecurity/megalinter-${{ matrix.flavor }}
IMAGE_VERSION: beta
DOCKERFILE_PATH: flavors/${{ matrix.flavor }}/Dockerfile
DOCKER_BUILD_PLATFORMS: linux/amd64
DOCKER_BUILD_PLATFORMS: linux/amd64,linux/arm64
REGISTRY: GCR
shell: bash
run: .automation/upload-docker.sh
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/deploy-BETA-linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ jobs:
IMAGE_REPO: oxsecurity/megalinter-only-${{ matrix.linter }}
IMAGE_VERSION: beta
DOCKERFILE_PATH: linters/${{ matrix.linter }}/Dockerfile
DOCKER_BUILD_PLATFORMS: linux/amd64
DOCKER_BUILD_PLATFORMS: linux/amd64,linux/arm64
REGISTRY: Docker
shell: bash
run: .automation/upload-docker.sh
Expand All @@ -133,7 +133,7 @@ jobs:
IMAGE_REPO: oxsecurity/megalinter-only-${{ matrix.linter }}
IMAGE_VERSION: "${{ needs.prepare.outputs.unique_docker_image_name }}"
DOCKERFILE_PATH: linters/${{ matrix.linter }}/Dockerfile
DOCKER_BUILD_PLATFORMS: linux/amd64
DOCKER_BUILD_PLATFORMS: linux/amd64,linux/arm64
REGISTRY: Docker
ALWAYS_BUILD: force
shell: bash
Expand All @@ -150,7 +150,7 @@ jobs:
IMAGE_REPO: oxsecurity/megalinter-only-${{ matrix.linter }}
IMAGE_VERSION: beta
DOCKERFILE_PATH: linters/${{ matrix.linter }}/Dockerfile
DOCKER_BUILD_PLATFORMS: linux/amd64
DOCKER_BUILD_PLATFORMS: linux/amd64,linux/arm64
REGISTRY: GCR
shell: bash
run: .automation/upload-docker.sh
Expand All @@ -163,7 +163,7 @@ jobs:
IMAGE_REPO: oxsecurity/megalinter-only-${{ matrix.linter }}
IMAGE_VERSION: "${{ needs.prepare.outputs.unique_docker_image_name }}"
DOCKERFILE_PATH: linters/${{ matrix.linter }}/Dockerfile
DOCKER_BUILD_PLATFORMS: linux/amd64
DOCKER_BUILD_PLATFORMS: linux/amd64,linux/arm64
REGISTRY: GCR
ALWAYS_BUILD: force
shell: bash
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-BETA.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
IMAGE_REPO: oxsecurity/megalinter
IMAGE_VERSION: beta
DOCKERFILE_PATH: Dockerfile
DOCKER_BUILD_PLATFORMS: linux/amd64
DOCKER_BUILD_PLATFORMS: linux/amd64,linux/arm64
REGISTRY: Docker
shell: bash
run: .automation/upload-docker.sh
Expand All @@ -98,7 +98,7 @@ jobs:
IMAGE_REPO: oxsecurity/megalinter
IMAGE_VERSION: beta
DOCKERFILE_PATH: Dockerfile
DOCKER_BUILD_PLATFORMS: linux/amd64
DOCKER_BUILD_PLATFORMS: linux/amd64,linux/arm64
REGISTRY: GCR
shell: bash
run: .automation/upload-docker.sh
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-DEV-linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ jobs:
IMAGE_REPO: oxsecurity/megalinter-only-${{ matrix.linter }}
IMAGE_VERSION: ${{ needs.prepare.outputs.tag }}
DOCKERFILE_PATH: linters/${{ matrix.linter }}/Dockerfile
DOCKER_BUILD_PLATFORMS: linux/amd64
DOCKER_BUILD_PLATFORMS: linux/amd64,linux/arm64
REGISTRY: Docker
shell: bash
run: .automation/upload-docker.sh
Expand Down
21 changes: 13 additions & 8 deletions .github/workflows/deploy-DEV.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ jobs:
echo "tag=${TAG}" >>"$GITHUB_OUTPUT"
###################################
# Build image locally for testing #
# Build images locally for testing #
###################################
- name: Build image (quick)
- name: Build images (quick)
if: "contains(github.event.head_commit.message, 'quick build')"
id: docker_build_quick
shell: bash
Expand All @@ -94,7 +94,9 @@ jobs:
MEGA_LINTER_BASE_IMAGE="oxsecurity/megalinter:${{steps.image_tag.outputs.tag}}"
echo "Reusing previously built image as base for quick build: ${MEGA_LINTER_BASE_IMAGE}"
fi
docker buildx build --platform linux/amd64 --build-arg "BUILD_DATE=${BUILD_DATE}" --build-arg "BUILD_REVISION=${GITHUB_SHA}" --build-arg "BUILD_VERSION=${GITHUB_SHA}" --build-arg "MEGALINTER_BASE_IMAGE=${MEGA_LINTER_BASE_IMAGE}" --no-cache -f "Dockerfile-quick" -t oxsecurity/megalinter:${{steps.image_tag.outputs.tag}} --load . | while read line ; do echo "$(date +'%H:%M:%S')| $line"; done;
docker buildx build --platform linux/amd64,linux/arm64 --build-arg "BUILD_DATE=${BUILD_DATE}" --build-arg "BUILD_REVISION=${GITHUB_SHA}" --build-arg "BUILD_VERSION=${GITHUB_SHA}" --build-arg "MEGALINTER_BASE_IMAGE=${MEGA_LINTER_BASE_IMAGE}" --no-cache -f "Dockerfile-quick" -t oxsecurity/megalinter:${{steps.image_tag.outputs.tag}} .
docker buildx build --load --platform linux/amd64 -t oxsecurity/megalinter:${{steps.image_tag.outputs.tag}} .
docker buildx build --load --platform linux/arm64 -t oxsecurity/megalinter:${{steps.image_tag.outputs.tag}}:arm64 .
timeout-minutes: 60

##########################
Expand All @@ -109,15 +111,15 @@ jobs:
IMAGE_REPO: oxsecurity/megalinter
IMAGE_VERSION: ${{steps.image_tag.outputs.tag}}
DOCKERFILE_PATH: Dockerfile-quick
DOCKER_BUILD_PLATFORMS: linux/amd64
DOCKER_BUILD_PLATFORMS: linux/amd64,linux/arm64
REGISTRY: Docker
shell: bash
run: .automation/upload-docker.sh || true

#######################################
# Build image (full for forked repos) #
# Build images (full for forked repos) #
#######################################
- name: Build image (full from forks)
- name: Build images (full from forks)
if: |
(
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) ||
Expand All @@ -127,7 +129,10 @@ jobs:
!contains(github.event.head_commit.message, 'quick build')
id: docker_build
shell: bash
run: docker buildx build --platform linux/amd64 --build-arg "BUILD_DATE=${BUILD_DATE}" --build-arg "BUILD_REVISION=${GITHUB_SHA}" --build-arg "BUILD_VERSION=${GITHUB_SHA}" --no-cache -t oxsecurity/megalinter:${{steps.image_tag.outputs.tag}} --load . | while read line ; do echo "$(date +'%H:%M:%S')| $line"; done;
run: |
docker buildx build --platform linux/amd64,linux/arm64 --build-arg "BUILD_DATE=${BUILD_DATE}" --build-arg "BUILD_REVISION=${GITHUB_SHA}" --build-arg "BUILD_VERSION=${GITHUB_SHA}" --no-cache -t oxsecurity/megalinter:${{steps.image_tag.outputs.tag}} .
docker buildx build --load --platform linux/amd64 -t oxsecurity/megalinter:${{steps.image_tag.outputs.tag}} .
docker buildx build --load --platform linux/arm64 -t oxsecurity/megalinter:${{steps.image_tag.outputs.tag}}:arm64 .
timeout-minutes: 90

####################################
Expand All @@ -148,7 +153,7 @@ jobs:
IMAGE_REPO: oxsecurity/megalinter
IMAGE_VERSION: ${{steps.image_tag.outputs.tag}}
DOCKERFILE_PATH: Dockerfile
DOCKER_BUILD_PLATFORMS: linux/amd64
DOCKER_BUILD_PLATFORMS: linux/amd64,linux/arm64
REGISTRY: Docker
shell: bash
run: .automation/upload-docker.sh
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-RELEASE-flavors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
IMAGE_REPO: oxsecurity/megalinter-${{ matrix.flavor }}
IMAGE_VERSION: ${{ github.event.release.tag_name }}
DOCKERFILE_PATH: flavors/${{ matrix.flavor }}/Dockerfile
DOCKER_BUILD_PLATFORMS: linux/amd64
DOCKER_BUILD_PLATFORMS: linux/amd64,linux/arm64
REGISTRY: Docker
shell: bash
run: .automation/upload-docker.sh
Expand All @@ -98,7 +98,7 @@ jobs:
IMAGE_REPO: oxsecurity/megalinter-${{ matrix.flavor }}
IMAGE_VERSION: ${{ github.event.release.tag_name }}
DOCKERFILE_PATH: flavors/${{ matrix.flavor }}/Dockerfile
DOCKER_BUILD_PLATFORMS: linux/amd64
DOCKER_BUILD_PLATFORMS: linux/amd64,linux/arm64
REGISTRY: GCR
shell: bash
run: .automation/upload-docker.sh
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-RELEASE-linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:
IMAGE_REPO: oxsecurity/megalinter-only-${{ matrix.linter }}
IMAGE_VERSION: "${{ github.event.release.tag_name }}"
DOCKERFILE_PATH: linters/${{ matrix.linter }}/Dockerfile
DOCKER_BUILD_PLATFORMS: linux/amd64
DOCKER_BUILD_PLATFORMS: linux/amd64,linux/arm64
REGISTRY: Docker
ALWAYS_BUILD: force
shell: bash
Expand All @@ -113,7 +113,7 @@ jobs:
IMAGE_REPO: oxsecurity/megalinter-only-${{ matrix.linter }}
IMAGE_VERSION: "${{ github.event.release.tag_name }}"
DOCKERFILE_PATH: linters/${{ matrix.linter }}/Dockerfile
DOCKER_BUILD_PLATFORMS: linux/amd64
DOCKER_BUILD_PLATFORMS: linux/amd64,linux/arm64
REGISTRY: GCR
ALWAYS_BUILD: force
shell: bash
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-RELEASE.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
IMAGE_REPO: oxsecurity/megalinter
IMAGE_VERSION: ${{ github.event.release.tag_name }}
DOCKERFILE_PATH: Dockerfile
DOCKER_BUILD_PLATFORMS: linux/amd64
DOCKER_BUILD_PLATFORMS: linux/amd64,linux/arm64
REGISTRY: Docker
shell: bash
run: .automation/upload-docker.sh
Expand All @@ -88,7 +88,7 @@ jobs:
IMAGE_REPO: oxsecurity/megalinter
IMAGE_VERSION: ${{ github.event.release.tag_name }}
DOCKERFILE_PATH: Dockerfile
DOCKER_BUILD_PLATFORMS: linux/amd64
DOCKER_BUILD_PLATFORMS: linux/amd64,linux/arm64
REGISTRY: GCR
shell: bash
run: .automation/upload-docker.sh
Expand Down
Loading

0 comments on commit e223a1a

Please sign in to comment.