-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
21 lines (19 loc) · 922 Bytes
/
Jenkinsfile
File metadata and controls
21 lines (19 loc) · 922 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
pipeline {
agent any
stages {
stage ('checkout'){
steps{
checkout([$class: 'GitSCM', branches: [[name: '*/main']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://github.com/vbronfman/igentify_test.git']]])
}
}
stage('build') {
steps {
sh 'echo "Hello world from Jenkins within Docker job of ${BUILD_NUMBER} ${JOB_NAME} ${BUILD_DISPLAY_NAME}" > $(pwd)/index.html'
sh 'chmod 777 $(pwd)/index.html'
sh 'docker kill $(docker ps -l -q) || echo Ok'
sh 'docker run -d --rm -v $(pwd):/simplehttp -p 10000:10000 python:3.8 python -m http.server 10000 --directory /simplehttp'
sh 'docker cp $(pwd)/index.html $(docker ps -l -q):/simplehttp'
}
}
}
}