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