This commit is contained in:
병준 박 2025-04-16 01:30:31 +00:00
parent d2aca7883e
commit f95425c582

View File

@ -4,10 +4,6 @@ metadata:
name: pypi
spec:
params:
- name: home
type: string
description: home directory
- name: build-artifact-path
type: string
description: Path to the built artifact directory from python-build
@ -23,33 +19,17 @@ spec:
default: https://upload.pypi.org/legacy/
workspaces:
- name: shared
description: Workspace containing the built artifacts
- name: nexus-credentials
description: Workspace containing credentials for PyPI upload
steps:
- name: upload-to-pypi
image: $(params.pythonImageName)
env:
- name: HOME
value: /workspace/shared/$(params.home)
- name: TWINE_USERNAME
valueFrom:
secretKeyRef:
name: nexus-credentials
key: username
- name: TWINE_PASSWORD
valueFrom:
secretKeyRef:
name: nexus-credentials
key: password
script: |
#!/usr/bin/env bash
set -e
ls -al $HOME
ls -al $HOME/.config/pypoetry/
cat $HOME/.netrc
export TWINE_USERNAME=$(cat /workspace/nexus-credentials/username)
export TWINE_PASSWORD=$(cat /workspace/nexus-credentials/password)
HOSTED_URL="$(params.pypi-hosted-url)"