generated from karsten.jeppesen/KAJE-Template
Initial commit
All checks were successful
DMA-CSD-CICD/oliver.thy/pipeline/head This commit looks good
All checks were successful
DMA-CSD-CICD/oliver.thy/pipeline/head This commit looks good
This commit is contained in:
34
.workflow/01_container_build.sh
Normal file
34
.workflow/01_container_build.sh
Normal file
@@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
/bin/echo "$0 - Building all containers [$(pwd)]"
|
||||
echo "USER: $UID"
|
||||
|
||||
# Parse owner/repo from GIT_URL
|
||||
: "${GIT_URL:?Missing GIT_URL in Jenkins env}"
|
||||
# Handle formats: https://gitea.example.com/owner/repo.git or git@gitea.example.com:owner/repo.git
|
||||
OWNER=""
|
||||
REPO=""
|
||||
if [[ "$GIT_URL" =~ [:\/]([^\/:]+)\/([^\/\.]+)(\.git)?$ ]]; then
|
||||
OWNER="${BASH_REMATCH[1]}"
|
||||
REPO="${BASH_REMATCH[2]}"
|
||||
fi
|
||||
if [[ -z "$OWNER" || -z "$REPO" ]]; then
|
||||
echo "[ERROR] Could not determine owner/repo from GIT_URL=$GIT_URL"
|
||||
exit 1
|
||||
fi
|
||||
echo "Will publish package at [$OWNER]"
|
||||
|
||||
echo "Will build:"
|
||||
/bin/find ./ -type f -name "*.csproj" | while read line; do
|
||||
solution=$(echo "$line" | cut -f 2 -d '/')
|
||||
project=$(echo "$line" | cut -f 3 -d '/')
|
||||
echo "[$solution]:[$project]"
|
||||
done
|
||||
|
||||
|
||||
/bin/find ./ -type f -name "*.csproj" | while read line; do
|
||||
solution=$(echo "$line" | cut -f 2 -d '/')
|
||||
project=$(echo "$line" | cut -f 3 -d '/')
|
||||
echo "Building [$solution] [$project]"
|
||||
.workflow/DotDockerbuilder10.sh --solution $solution --project $project --gituser $OWNER
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user