-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathJenkinsfile
More file actions
47 lines (40 loc) · 1.03 KB
/
Jenkinsfile
File metadata and controls
47 lines (40 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
pipeline {
agent any
environment {
COMPOSE_PROJECT_NAME = "exam-app-project"
}
stages {
stage("Git Clone") {
steps {
echo "Cloning project from GitHub..."
git url: "https://github.com/VedTambe/Devops-Exam-App.git", branch: "main"
}
}
stage("Docker Image Build") {
steps {
echo "Building Docker images..."
sh "docker compose build"
}
}
stage("Start Application (Deploy)") {
steps {
echo "Starting application containers..."
sh "docker compose up -d"
}
}
stage("Verify Containers") {
steps {
echo "Checking running containers..."
sh "docker ps"
}
}
}
post {
always {
echo "Pipeline completed successfully!"
}
failure {
echo "Pipeline failed. Please check logs."
}
}
}