init
This commit is contained in:
parent
b493675656
commit
98e136a291
@ -26,14 +26,16 @@ spec:
|
||||
description: Build context path (relative to subdirectory)
|
||||
type: string
|
||||
default: .
|
||||
- name: PYPI_USERNAME
|
||||
description: Build context path (relative to subdirectory)
|
||||
|
||||
- name: pypiUsername
|
||||
description: PyPI username
|
||||
type: string
|
||||
default: "gitops-bot"
|
||||
- name: PYPI_PASSWORD
|
||||
description: Build context path (relative to subdirectory)
|
||||
default: ""
|
||||
|
||||
- name: pypiPassword
|
||||
description: PyPI password
|
||||
type: string
|
||||
default: "qwer5795QWER"
|
||||
default: ""
|
||||
|
||||
workspaces:
|
||||
- name: source
|
||||
@ -42,14 +44,9 @@ spec:
|
||||
- name: docker-auth
|
||||
description: Docker registry credentials (username + password)
|
||||
|
||||
- name: pypi-auth
|
||||
description: PyPI credentials (username + password)
|
||||
|
||||
results:
|
||||
- name: imageUrl
|
||||
description: Final pushed image URL with tag (e.g. registry/app:v0.2.0)
|
||||
- name: PYPI_USERNAME
|
||||
- name: PYPI_PASSWORD
|
||||
|
||||
steps:
|
||||
- name: write-docker-config
|
||||
@ -85,29 +82,21 @@ spec:
|
||||
EOF
|
||||
|
||||
- name: kaniko-build
|
||||
image: docker.unbox-x.net/registry/tools/kaniko:v1.23.2-r1
|
||||
image: gcr.io/kaniko-project/executor:v1.23.2
|
||||
workingDir: /workspace/source
|
||||
script: |
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
if [[ -n "$(params.subdirectory)" ]]; then
|
||||
cd "$(params.subdirectory)"
|
||||
fi
|
||||
|
||||
PYPI_USERNAME=$(cat /workspace/pypi-auth/username)
|
||||
PYPI_PASSWORD=$(cat /workspace/pypi-auth/password)
|
||||
|
||||
/kaniko/executor \
|
||||
--dockerfile=$(params.dockerfile) \
|
||||
--context=$(params.context) \
|
||||
--destination=$(params.imageName):$(params.tag) \
|
||||
--skip-tls-verify \
|
||||
--verbosity=info \
|
||||
--reproducible \
|
||||
--build-arg PYPI_USERNAME=$PYPI_USERNAME \
|
||||
--build-arg PYPI_PASSWORD=$PYPI_PASSWORD
|
||||
|
||||
# 🔒 보안: 메모리에서 민감 정보 제거
|
||||
unset PYPI_USERNAME
|
||||
unset PYPI_PASSWORD
|
||||
env:
|
||||
- name: DOCKER_CONFIG
|
||||
value: /tekton/home/.docker
|
||||
command:
|
||||
- /kaniko/executor
|
||||
args:
|
||||
- --dockerfile=$(params.subdirectory)/$(params.dockerfile)
|
||||
- --context=$(params.subdirectory)/$(params.context)
|
||||
- --destination=$(params.imageName):$(params.tag)
|
||||
- --skip-tls-verify
|
||||
- --verbosity=info
|
||||
- --reproducible
|
||||
- --build-arg
|
||||
- PYPI_USERNAME=$(params.pypiUsername)
|
||||
- --build-arg
|
||||
- PYPI_PASSWORD=$(params.pypiPassword)
|
Loading…
x
Reference in New Issue
Block a user