We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 26c4437 commit e3647eeCopy full SHA for e3647ee
1 file changed
JenkinsPipeline
@@ -0,0 +1,35 @@
1
+pipeline {
2
+ agent any
3
+
4
+ environment {
5
+ DOCKERHUB_CREDENTIALS=credentials('docker-key')
6
+ }
7
+ parameters {
8
+ string(name: 'dockerUser', defaultValue: 'None', description: 'Enter Docker user name ')
9
10
+ stages {
11
+ stage('Clone') {
12
+ steps {
13
+ git branch: 'main', url: 'https://github.com/rajpalsinghsaini/pythoncode.git'
14
15
16
+ stage('Build') {
17
18
+ sh 'docker ps'
19
+ sh "echo $DOCKERHUB_CREDENTIALS_PSW | docker login --username ${dockerUser} --password-stdin"
20
21
22
23
+ stage('Test') {
24
25
+ sh 'docker build /var/lib/jenkins/workspace/${JOB_NAME} -t ${dockerUser}/pythoncode'
26
27
28
29
+ stage('Deploy') {
30
31
32
33
34
35
+}
0 commit comments