init
This commit is contained in:
parent
eb9b832225
commit
215f94fd73
@ -40,6 +40,8 @@ spec:
|
||||
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
|
||||
@ -74,16 +76,19 @@ spec:
|
||||
}
|
||||
EOF
|
||||
|
||||
- name: prepare-env
|
||||
- name: prepare-build-args
|
||||
image: alpine
|
||||
workingDir: /workspace/source
|
||||
script: |
|
||||
#!/bin/sh
|
||||
set -e
|
||||
echo "Preparing env vars..."
|
||||
export PYPI_USERNAME=$(cat /workspace/pypi-auth/username)
|
||||
export PYPI_PASSWORD=$(cat /workspace/pypi-auth/password)
|
||||
echo "$PYPI_USERNAME" > /workspace/source/.pypi_user
|
||||
echo "$PYPI_PASSWORD" > /workspace/source/.pypi_pass
|
||||
|
||||
if [ -n "$(params.subdirectory)" ]; then
|
||||
cd "$(params.subdirectory)"
|
||||
fi
|
||||
|
||||
cat $(workspaces.pypi-auth.path)/username > $(results._PYPI_USERNAME.path)
|
||||
cat $(workspaces.pypi-auth.path)/password > $(results._PYPI_PASSWORD.path)
|
||||
|
||||
- name: kaniko-build
|
||||
image: bitnami/kaniko:1.23.2
|
||||
@ -101,7 +106,6 @@ spec:
|
||||
- --reproducible
|
||||
- --verbosity=info
|
||||
- --build-arg
|
||||
- PYPI_USERNAME=$(cat /workspace/source/.pypi_user)
|
||||
- PYPI_USERNAME=$(results._PYPI_USERNAME)
|
||||
- --build-arg
|
||||
- PYPI_PASSWORD=$(cat /workspace/source/.pypi_pass)
|
||||
|
||||
- PYPI_PASSWORD=$(results._PYPI_PASSWORD)
|
||||
|
Loading…
x
Reference in New Issue
Block a user