init
This commit is contained in:
parent
2dbe116301
commit
d9064d1343
@ -40,16 +40,19 @@ spec:
|
||||
|
||||
steps:
|
||||
- name: build-and-push
|
||||
image: bash:5
|
||||
image: alpine:3.21.3
|
||||
workingDir: /workspace/source
|
||||
env:
|
||||
- name: DOCKER_CONFIG
|
||||
value: /tekton/home/.docker
|
||||
script: |
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
if [[ -n "$(params.subdirectory)" ]]; then
|
||||
echo "📦 Installing curl and tar..."
|
||||
apk add --no-cache curl tar
|
||||
|
||||
if [ -n "$(params.subdirectory)" ]; then
|
||||
cd "$(params.subdirectory)"
|
||||
fi
|
||||
|
||||
@ -59,7 +62,7 @@ spec:
|
||||
|
||||
USERNAME=$(cat /workspace/docker-auth/username)
|
||||
PASSWORD=$(cat /workspace/docker-auth/password)
|
||||
REGISTRY=$(cut -d/ -f1 <<< "$IMAGE")
|
||||
REGISTRY=$(echo "$IMAGE" | cut -d/ -f1)
|
||||
|
||||
echo "🔐 Writing Docker config for $REGISTRY..."
|
||||
mkdir -p "$DOCKER_CONFIG"
|
||||
|
Loading…
x
Reference in New Issue
Block a user