From c585faa61523631ea7acc16ab429855ed474477d Mon Sep 17 00:00:00 2001 From: Udo Waechter Date: Mon, 22 Feb 2021 18:47:45 +0100 Subject: [PATCH] removing zeroconf /etc/distcc/hosts --- Dockerfile | 3 +- kernel-build.yaml | 4 ++- tekton-debian-kernel-build-image.yaml | 50 +++++++++++---------------- 3 files changed, 26 insertions(+), 31 deletions(-) diff --git a/Dockerfile b/Dockerfile index 175a432..a1469db 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,5 +13,6 @@ RUN sed -i 's@deb.debian.org@apt-cache.lan/deb.debian.org@g' /etc/apt/sources.li apt-get autoremove --purge -y && \ apt-get clean -y && \ rm -rf /var/lib/apt/lists/* && \ - rm -rf /var/cache/apt/* + rm -rf /var/cache/apt/* && \ + rm /etc/distcc/hosts #no zeroconf for distcc diff --git a/kernel-build.yaml b/kernel-build.yaml index 3feb084..d08a4c2 100644 --- a/kernel-build.yaml +++ b/kernel-build.yaml @@ -37,7 +37,9 @@ spec: echo "res.input.ke...path: $(resources.inputs.kernel-configs.path)" cp $(resources.inputs.kernel-configs.path)/riotboard-5.7 /usr/src/linux-source-5.10/.config cd /usr/src/linux-source-5.10 - make ARCH=arm KBUILD_DEBARCH=armhf CROSS_COMPILE=arm-linux-gnueabihf- -j4 deb-pkg LOCALVERSION=-riot2 + make CC=distcc DISTCC_HOSTS="distcc-0.distcc distcc-1.distcc distcc-2.distcc distcc-3.distcc"\ + ARCH=arm KBUILD_DEBARCH=armhf CROSS_COMPILE=arm-linux-gnueabihf- \ + -j4 deb-pkg LOCALVERSION=-riot2 - name: cleanup-workspace-post image: alpine command: diff --git a/tekton-debian-kernel-build-image.yaml b/tekton-debian-kernel-build-image.yaml index c3dc40a..9122f3f 100644 --- a/tekton-debian-kernel-build-image.yaml +++ b/tekton-debian-kernel-build-image.yaml @@ -1,7 +1,7 @@ apiVersion: tekton.dev/v1alpha1 kind: PipelineResource metadata: - name: debian-kernel-build-git + name: chaos-kernel-configs-git spec: type: git params: @@ -13,7 +13,7 @@ spec: apiVersion: tekton.dev/v1alpha1 kind: PipelineResource metadata: - name: debian-kernel-build-image + name: img-debian-kernel-build spec: type: image params: @@ -23,47 +23,39 @@ spec: apiVersion: tekton.dev/v1beta1 kind: Task metadata: - name: build-debian-kernel-build-from-source + name: build-debian-kernel-build spec: params: - name: pathToContainerFile type: string - description: The path to the dockerfile to build - default: $(resources.inputs.kernel-configs.path)/Dockerfile + default: $(resources.inputs.source.path)/Dockerfile - name: pathToContext type: string - description: | - The build context used by Kaniko - (https://github.com/GoogleContainerTools/kaniko#kaniko-build-contexts) - default: $(resources.inputs.kernel-configs.path) + default: $(resources.inputs.source.path) resources: inputs: - - name: kernel-configs + - name: source type: git outputs: - - name: kernel-configs-builtImage + - name: builtImage type: image steps: - name: build-and-push image: gcr.io/kaniko-project/executor:arm64 - # specifying DOCKER_CONFIG is required to allow kaniko to detect docker credential - env: - - name: "DOCKER_CONFIG" - value: "/tekton/home/.docker/" command: - /kaniko/executor args: - --dockerfile=$(params.pathToContainerFile) - - --destination=$(resources.outputs.kernel-configs-builtImage.url) + - --destination=$(resources.outputs.builtImage.url) - --context=$(params.pathToContext) - --skip-tls-verify - - name: cleanup-workspace-post - image: alpine - command: - - rm - args: - - -rf - - /workspace/kernel-configs* + #- name: cleanup-workspace-post + # image: alpine + # command: + # - rm + # args: + # - -rf + # - /workspace/kernel-configs* #workspaces: # - name: workspace # mountPath: /workspace @@ -71,23 +63,23 @@ spec: apiVersion: tekton.dev/v1beta1 kind: TaskRun metadata: - name: build-container-image-from-git-source-task-run + name: img-debian-kernel-build spec: #serviceAccountName: dockerhub-service taskRef: - name: build-debian-kernel-build-from-source + name: build-debian-kernel-build params: - name: pathToContainerFile value: Dockerfile resources: inputs: - - name: kernel-configs + - name: source resourceRef: - name: debian-kernel-build-git + name: chaos-kernel-configs-git outputs: - - name: kernel-configs-builtImage + - name: builtImage resourceRef: - name: debian-kernel-build-image + name: img-debian-kernel-build # workspaces: # - name: workspace # persistentVolumeClaim: