Skip to content

Commit

Permalink
fix oss compliance generation
Browse files Browse the repository at this point in the history
  • Loading branch information
BigBoot committed Sep 14, 2023
1 parent d74337c commit 4b8dcef
Show file tree
Hide file tree
Showing 9 changed files with 70 additions and 54 deletions.
1 change: 1 addition & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ variables:

include:
- local: .gitlab/rules.yml
- local: .gitlab/configs.yml
- local: .gitlab/docker_config.yml
- local: .gitlab/update_version.yml
- local: .gitlab/check.yml
Expand Down
46 changes: 11 additions & 35 deletions .gitlab/build_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build:linux:
variables:
BASE_IMAGE: ubuntu:18.04
image:
name: gcr.io/kaniko-project/executor:v1.9.0-debug
name: gcr.io/kaniko-project/executor:v1.15.0-debug
entrypoint: [""]
script:
- !reference [.docker-config, script]
Expand All @@ -22,30 +22,25 @@ build:linux:
build:linux:docker:
stage: build
parallel:
matrix:
- RUNNER: shared_docker
BASE_IMAGE: ubuntu:20.04
TAG_POSTFIX: -ubuntu-amd64
- RUNNER: shared_docker_aarch64
BASE_IMAGE: ubuntu:20.04
TAG_POSTFIX: -ubuntu-arm64
- RUNNER: shared_docker_aarch64
BASE_IMAGE: nvcr.io/nvidia/l4t-base:r32.4.3
TAG_POSTFIX: -l4t-arm64
matrix: !reference [.configs, docker-matrix]
tags:
- ${RUNNER}
image:
name: gcr.io/kaniko-project/executor:v1.9.0-debug
name: gcr.io/kaniko-project/executor:v1.15.0-debug
entrypoint: [""]
script:
- !reference [.docker-config, script]
- mkdir -p /kaniko/.docker
- echo "${DOCKER_CFG}" > /kaniko/.docker/config.json
- /kaniko/executor --context ${CI_PROJECT_DIR}
--dockerfile docker/ifm-robotics/docker/Dockerfile
--digest-file ${CI_PROJECT_DIR}/digest/${TAG_POSTFIX}
${KANIKO_BUILD_ARGS}
${KANIKO_PUSH_ARGS}
${DOCKER_BUILD_ARGS}
artifacts:
paths:
- digest/*
rules:
- !reference [.tagged, rules]
- !reference [.nightly, rules]
Expand All @@ -54,24 +49,11 @@ build:linux:docker:
build:linux:deb:
stage: build
parallel:
matrix:
- RUNNER: shared_docker_aarch64
PLATFORM: linux/aarch64
BASE_IMAGE:
- nvcr.io/nvidia/l4t-base:r32.4.3
- ubuntu:22.04
- ubuntu:20.04
- ubuntu:18.04
- RUNNER: shared_docker
PLATFORM: linux/amd64
BASE_IMAGE:
- ubuntu:22.04
- ubuntu:20.04
- ubuntu:18.04
matrix: !reference [.configs, deb-matrix]
tags:
- ${RUNNER}
image:
name: gcr.io/kaniko-project/executor:v1.9.0-debug
name: gcr.io/kaniko-project/executor:v1.15.0-debug
entrypoint: [""]
script:
- !reference [.docker-config, script]
Expand All @@ -97,13 +79,7 @@ build:linux:python_wheel:
image: ${IMAGE}
stage: build
parallel:
matrix:
- RUNNER: shared_docker
IMAGE: quay.io/pypa/manylinux2014_x86_64:latest
PYTHON_VERSION: ["cp38-cp38", "cp39-cp39", "cp310-cp310", "cp311-cp311"]
- RUNNER: shared_docker_aarch64
IMAGE: quay.io/pypa/manylinux2014_aarch64:latest
PYTHON_VERSION: ["cp38-cp38", "cp39-cp39", "cp310-cp310", "cp311-cp311"]
matrix: !reference [.configs, python-linux-matrix]
tags:
- ${RUNNER}
script:
Expand All @@ -127,7 +103,7 @@ build:linux:docs:
tags:
- shared_docker
image:
name: gcr.io/kaniko-project/executor:v1.9.0-debug
name: gcr.io/kaniko-project/executor:v1.15.0-debug
entrypoint: [""]
script:
- !reference [.docker-config, script]
Expand Down
7 changes: 1 addition & 6 deletions .gitlab/build_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,7 @@ build:windows_2019:python_wheel:
name: ${DOCKER_IMAGE_WINDOWS_BUILDER}
entrypoint: ["cmd", "/S", "/C"]
parallel:
matrix:
- PYTHON_VERSION:
- "3.8.10"
- "3.9.13"
- "3.10.11"
- "3.11.3"
matrix: !reference [.configs, python-windows-matrix]
variables:
IFM3D_CMAKE_GENERATOR: "Visual Studio 16 2019"
CONFIG: Release
Expand Down
2 changes: 1 addition & 1 deletion .gitlab/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ check:clang-format:
tags:
- shared_docker
image:
name: gcr.io/kaniko-project/executor:v1.9.0-debug
name: gcr.io/kaniko-project/executor:v1.15.0-debug
entrypoint: [""]
script:
- !reference [.docker-config, script]
Expand Down
41 changes: 41 additions & 0 deletions .gitlab/configs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
.configs:
docker-matrix:
- RUNNER: shared_docker
BASE_IMAGE: ubuntu:20.04
TAG_POSTFIX: -ubuntu-amd64
- RUNNER: shared_docker_aarch64
BASE_IMAGE: ubuntu:20.04
TAG_POSTFIX: -ubuntu-arm64
- RUNNER: shared_docker_aarch64
BASE_IMAGE: nvcr.io/nvidia/l4t-base:r32.4.3
TAG_POSTFIX: -l4t-arm64

deb-matrix:
- RUNNER: shared_docker_aarch64
PLATFORM: linux/aarch64
BASE_IMAGE:
- nvcr.io/nvidia/l4t-base:r32.4.3
- ubuntu:22.04
- ubuntu:20.04
- ubuntu:18.04
- RUNNER: shared_docker
PLATFORM: linux/amd64
BASE_IMAGE:
- ubuntu:22.04
- ubuntu:20.04
- ubuntu:18.04

python-linux-matrix:
- RUNNER: shared_docker
IMAGE: quay.io/pypa/manylinux2014_x86_64:latest
PYTHON_VERSION: ["cp38-cp38", "cp39-cp39", "cp310-cp310", "cp311-cp311"]
- RUNNER: shared_docker_aarch64
IMAGE: quay.io/pypa/manylinux2014_aarch64:latest
PYTHON_VERSION: ["cp38-cp38", "cp39-cp39", "cp310-cp310", "cp311-cp311"]

python-windows-matrix:
- PYTHON_VERSION:
- "3.8.10"
- "3.9.13"
- "3.10.11"
- "3.11.3"
2 changes: 1 addition & 1 deletion .gitlab/deploy_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
stage: deploy
tags:
- shared_docker
image: toolhippie/manifest-tool:20210830
image: mplatform/manifest-tool:alpine-v2.0.8
before_script:
- !reference [.docker-config, script]
- mkdir -p $HOME/.docker
Expand Down
4 changes: 2 additions & 2 deletions .gitlab/docker_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
fi
DOCKER_CFG="${DOCKER_CFG} }"
KANIKO_BUILD_ARGS="--reproducible --snapshotMode time --cache --cache-repo ${GHCR_REPO}/cache"
KANIKO_BUILD_ARGS="--reproducible --snapshot-mode time --use-new-run --cache --cache-repo ${GHCR_REPO}/cache"
KANIKO_PUSH_ARGS="\
--destination ${DOCKERHUB_REPO}:${DOCKER_TAG}${TAG_POSTFIX}\
--destination ${GHCR_REPO}:${DOCKER_TAG}${TAG_POSTFIX}\
"
REGISTRIES="DOCKERHUB GHCR"
REGISTRIES="DOCKERHUB GHCR"
19 changes: 11 additions & 8 deletions .gitlab/oss_compilance.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@
# oss_compilance
deploy:oss_compilance:
stage: deploy
parallel:
matrix: !reference [.configs, docker-matrix]
needs:
- job: build:linux:docker
parallel:
matrix: !reference [.configs, docker-matrix]
- job: deploy:start
artifacts: false
- job: deploy:linux:docker_tagged
artifacts: false
image:
name: nexus.ifm.com:20443/ifm-robotics/docker-oss-compliance
name: nexus.ifm.com:20443/ifm-robotics/docker-oss-compliance:v0.0.1
entrypoint: [""]
tags:
- shared_docker
cache:
- key: ifm3d-oss-compliance-release
paths:
- $CI_PROJECT_DIR/cache
script:
- !reference [.docker-config, script]
- mkdir -p $CI_PROJECT_DIR/oss-compliance
- IMAGE_SHA=$(cat digest/${TAG_POSTFIX})
- cd /app
- python generate_html.py --cache $CI_PROJECT_DIR/cache --out $CI_PROJECT_DIR/oss-compliance ghcr.io/ifm/ifm3d:$DOCKER_TAG ifm3d
- python oss-compliance.py --cache $CI_PROJECT_DIR/cache --out $CI_PROJECT_DIR/oss-compliance ifm3d image ghcr.io/ifm/ifm3d@${IMAGE_SHA}
artifacts:
paths:
- $CI_PROJECT_DIR/oss-compliance
expire_in: 1 week
- $CI_PROJECT_DIR/oss-compliance/*
timeout: 3h
rules:
- !reference [.tagged, rules]

2 changes: 1 addition & 1 deletion .gitlab/test_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ test:linux:
variables:
BASE_IMAGE: ubuntu:18.04
image:
name: gcr.io/kaniko-project/executor:v1.9.0-debug
name: gcr.io/kaniko-project/executor:v1.15.0-debug
entrypoint: [""]
script:
- !reference [.docker-config, script]
Expand Down

0 comments on commit 4b8dcef

Please sign in to comment.