This commit is contained in:
병준 박 2025-04-12 15:03:35 +00:00
parent 4f97c75ee1
commit b8a89c4c3e

View File

@ -51,12 +51,12 @@ spec:
script: | script: |
#!/bin/sh #!/bin/sh
set -e set -e
mkdir -p /tekton/env mkdir -p /custom-env
echo "PYPI_USERNAME=$(cat /workspace/pypi-auth/username)" > /tekton/env/.env echo "PYPI_USERNAME=$(cat /workspace/pypi-auth/username)" > /custom-env/.env
echo "PYPI_PASSWORD=$(cat /workspace/pypi-auth/password)" >> /tekton/env/.env echo "PYPI_PASSWORD=$(cat /workspace/pypi-auth/password)" >> /custom-env/.env
volumeMounts: volumeMounts:
- name: env - name: env
mountPath: /tekton/env mountPath: /custom-env
- name: write-docker-config - name: write-docker-config
image: alpine:3.21.3 image: alpine:3.21.3
@ -88,7 +88,7 @@ spec:
EOF EOF
volumeMounts: volumeMounts:
- name: env - name: env
mountPath: /tekton/env mountPath: /custom-env
- name: kaniko-build - name: kaniko-build
image: gcr.io/kaniko-project/executor:v1.23.2 image: gcr.io/kaniko-project/executor:v1.23.2
@ -98,7 +98,7 @@ spec:
- -c - -c
- | - |
set -e set -e
. /tekton/env/.env . /custom-env/.env
/kaniko/executor \ /kaniko/executor \
--dockerfile=$(params.subdirectory)/$(params.dockerfile) \ --dockerfile=$(params.subdirectory)/$(params.dockerfile) \
@ -114,4 +114,4 @@ spec:
value: /tekton/home/.docker value: /tekton/home/.docker
volumeMounts: volumeMounts:
- name: env - name: env
mountPath: /tekton/env mountPath: /custom-env