-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile-v2
39 lines (33 loc) · 874 Bytes
/
Jenkinsfile-v2
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
@Library("jenkins-stdlib") _
pipeline {
agent { label "aws" }
stages {
stage('Git: Code Checkout') {
steps {
script{
gitClone("https://github.com/amaan-igs/webdocs.git", "main")
}
}
}
stage('Docker Build') {
steps {
script{
docker_build("webdocs","latest","")
}
}
}
stage('Docker Hub Push') {
steps {
script {
docker_push("webdocs", "latest", "amaanulhaq30")
}
}
}
stage('Docker Compose') {
steps {
echo "Launching services with docker-compose..."
sh "docker-compose up -d"
}
}
}
}