init
This commit is contained in:
parent
d2aca7883e
commit
f95425c582
@ -4,10 +4,6 @@ metadata:
|
|||||||
name: pypi
|
name: pypi
|
||||||
spec:
|
spec:
|
||||||
params:
|
params:
|
||||||
- name: home
|
|
||||||
type: string
|
|
||||||
description: home directory
|
|
||||||
|
|
||||||
- name: build-artifact-path
|
- name: build-artifact-path
|
||||||
type: string
|
type: string
|
||||||
description: Path to the built artifact directory from python-build
|
description: Path to the built artifact directory from python-build
|
||||||
@ -23,33 +19,17 @@ spec:
|
|||||||
default: https://upload.pypi.org/legacy/
|
default: https://upload.pypi.org/legacy/
|
||||||
|
|
||||||
workspaces:
|
workspaces:
|
||||||
- name: shared
|
|
||||||
description: Workspace containing the built artifacts
|
|
||||||
- name: nexus-credentials
|
- name: nexus-credentials
|
||||||
|
description: Workspace containing credentials for PyPI upload
|
||||||
steps:
|
steps:
|
||||||
- name: upload-to-pypi
|
- name: upload-to-pypi
|
||||||
image: $(params.pythonImageName)
|
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: |
|
script: |
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
ls -al $HOME
|
export TWINE_USERNAME=$(cat /workspace/nexus-credentials/username)
|
||||||
ls -al $HOME/.config/pypoetry/
|
export TWINE_PASSWORD=$(cat /workspace/nexus-credentials/password)
|
||||||
cat $HOME/.netrc
|
|
||||||
|
|
||||||
HOSTED_URL="$(params.pypi-hosted-url)"
|
HOSTED_URL="$(params.pypi-hosted-url)"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user