Initial commit - DevOps test project

This commit is contained in:
sacha 2026-01-20 22:50:07 +00:00
commit c9121b4d5c
3 changed files with 109 additions and 0 deletions

55
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,55 @@
pipeline {
agent any
environment {
APP_NAME = 'devops-test'
VERSION = '1.0.0'
}
stages {
stage('Checkout') {
steps {
echo "📦 Cloning repository..."
checkout scm
}
}
stage('Validate') {
steps {
echo "🔍 Validating scripts..."
sh 'ls -la'
sh 'chmod +x app.sh'
sh 'bash -n app.sh' // Syntax check
}
}
stage('Test') {
steps {
echo "🧪 Running tests..."
sh './app.sh'
}
}
stage('Build Info') {
steps {
echo "📊 Build Information:"
echo " App: ${APP_NAME}"
echo " Version: ${VERSION}"
echo " Build: ${BUILD_NUMBER}"
echo " Branch: ${GIT_BRANCH}"
}
}
}
post {
success {
echo "✅ Pipeline completed successfully!"
}
failure {
echo "❌ Pipeline failed!"
}
always {
echo "🏁 Pipeline finished at ${new Date()}"
}
}
}

28
README.md Normal file
View File

@ -0,0 +1,28 @@
# DevOps Test Project 🧪
Un simple projet pour tester la chaîne CI/CD : Gitea → Jenkins → Rundeck
## Structure
```
devops-test/
├── app.sh # Script simple à déployer
├── Jenkinsfile # Pipeline CI/CD
└── README.md # Ce fichier
```
## Comment tester
1. **Push vers Gitea** → déclenche webhook
2. **Jenkins** → build et test automatique
3. **Rundeck** → déploiement (optionnel)
## Commandes
```bash
# Clone
git clone https://gitea.sta4ck.eu/admin/devops-test.git
# Push
git add . && git commit -m "test" && git push
```

26
app.sh Normal file
View File

@ -0,0 +1,26 @@
#!/bin/bash
# app.sh - Simple test application
echo "================================"
echo " DevOps Test Application"
echo " Version: 1.0.0"
echo " Date: $(date)"
echo "================================"
# Simulate some work
echo "[INFO] Starting application checks..."
sleep 1
echo "[OK] Configuration validated"
sleep 1
echo "[OK] Dependencies checked"
sleep 1
echo "[OK] Application ready!"
# Show environment
echo ""
echo "Environment:"
echo " Hostname: $(hostname)"
echo " User: $(whoami)"
echo " PWD: $(pwd)"
exit 0