-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathJenkinsfile
28 lines (27 loc) · 939 Bytes
/
Jenkinsfile
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
pipeline {
agent any
stages {
stage('Docker Push') {
steps {
script {
withCredentials([usernamePassword(credentialsId: 'DockerHub-mosazhaw', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) {
sh '''
export DOCKER_HOST=tcp://host.docker.internal:2375
docker login -u $USERNAME -p $PASSWORD
docker push mosazhaw/node-web-app
'''
}
}
}
}
stage('Trigger Render Deployment') {
steps {
script {
withCredentials([string(credentialsId: 'RenderDeployKey', variable: 'KEY')]) {
sh "curl https://api.render.com/deploy/$KEY"
}
}
}
}
}
}