-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathJenkinsfile
More file actions
39 lines (39 loc) · 852 Bytes
/
Jenkinsfile
File metadata and controls
39 lines (39 loc) · 852 Bytes
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
pipeline {
agent any
options {
buildDiscarder(logRotator(numToKeepStr: '100', artifactNumToKeepStr: '100'))
}
triggers {
githubPush()
}
environment {
DOCKERHUB_PASSWORD = credentials('dockerhub-password')
DOCKERHUB_USERNAME = credentials('dockerhub-username')
}
stages {
stage('Docker build image') {
steps {
sh """
echo 'github action test'
echo $PATH
docker build -t podverse_web .
"""
}
}
stage('Docker login') {
steps {
sh """
docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASSWORD
"""
}
}
stage('Docker push images') {
steps {
sh """
docker tag podverse_web podverse/podverse_web:stage
docker push podverse/podverse_web:stage
"""
}
}
}
}