Zaktualizuj 'jenkinsfile'
clone repo
This commit is contained in:
parent
08e91c1a10
commit
afaecaa22f
14
jenkinsfile
14
jenkinsfile
@ -1,10 +1,18 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
stage('Hello') {
|
stage('Checkout') {
|
||||||
steps {
|
steps {
|
||||||
echo 'Hello World'
|
script {
|
||||||
|
// The below will clone your repo and will be checked out to master branch by default.
|
||||||
|
git credentialsId: 'jenkins-user-github', url: 'https://git.wmi.amu.edu.pl/s478831/ium_478831.git'
|
||||||
|
// Do a ls -lart to view all the files are cloned. It will be clonned. This is just for you to be sure about it.
|
||||||
|
sh "ls -lart ./*"
|
||||||
|
// List all branches in your repo.
|
||||||
|
sh "git branch -a"
|
||||||
|
// Checkout to a specific branch in your repo.
|
||||||
|
sh "git checkout master"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user