commit e9f780badab812acf900a5892d498c14f030cb3e Author: Automation Admin Date: Thu Aug 14 22:05:00 2025 +0000 Initial commit: Hello World Woodpecker CI/CD Test mit Podman diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..27f1a60 --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,30 @@ +branches: + include: + - main + - master + +steps: + hello-world: + image: alpine:latest + commands: + - echo "Starte Hello World Test in Podman Container..." + - apk add --no-cache bash + - chmod +x hello.sh + - ./hello.sh + - echo "Container-Info:" + - cat /etc/os-release | head -5 + - echo "Verfügbare Ressourcen:" + - df -h / + - free -h + - echo "Pipeline erfolgreich abgeschlossen!" + + test-environment: + image: alpine:latest + commands: + - echo "=== Container Environment Test ===" + - echo "Alpine Version: $(cat /etc/alpine-release)" + - echo "Shell: $SHELL" + - echo "Path: $PATH" + - echo "Environment Variables:" + - env | grep -E "(CI_|WOODPECKER_)" | sort + - echo "=== Environment Test abgeschlossen ===" diff --git a/README.md b/README.md new file mode 100644 index 0000000..b782a92 --- /dev/null +++ b/README.md @@ -0,0 +1,34 @@ +# Hello World Woodpecker CI/CD Test + +Dieses Projekt testet eine einfache Woodpecker CI/CD-Pipeline mit Podman-Integration. + +## Struktur + +- `hello.sh` - Einfaches Hello World Script +- `.woodpecker.yml` - Woodpecker Pipeline-Konfiguration +- `README.md` - Diese Dokumentation + +## Pipeline Features + +- Verwendet Alpine Linux Container +- Zwei Test-Steps: + 1. `hello-world` - Führt das Hello World Script aus + 2. `test-environment` - Zeigt Container-Environment-Informationen + +## Funktionsweise + +Die Pipeline wird automatisch bei Push auf `main` oder `master` Branch ausgelöst und: +1. Erstellt einen neuen Podman Container (Alpine Linux) +2. Führt das Hello World Script aus +3. Zeigt System- und Environment-Informationen +4. Bestätigt die erfolgreiche Ausführung + +## Testing + +```bash +# Lokaler Test des Scripts +./hello.sh + +# Pipeline wird automatisch bei Git Push ausgelöst +git push origin main +``` diff --git a/hello.sh b/hello.sh new file mode 100755 index 0000000..950e684 --- /dev/null +++ b/hello.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +echo "=== Woodpecker CI/CD Hello World Test ===" +echo "Pipeline läuft erfolgreich in Podman Container!" +echo "Datum: $(date)" +echo "Hostname: $(hostname)" +echo "User: $(whoami)" +echo "Working Directory: $(pwd)" +echo "=== Test erfolgreich abgeschlossen ==="