updated manifest and added jenkinsfile
Signed-off-by: Pascal Syma <pascal@syma.dev>
This commit is contained in:
Vendored
+48
@@ -0,0 +1,48 @@
|
||||
pipeline {
|
||||
agent {
|
||||
label 'node&&windows'
|
||||
}
|
||||
|
||||
stages {
|
||||
stage ('Initialize') {
|
||||
steps {
|
||||
echo 'Initializing..'
|
||||
}
|
||||
}
|
||||
stage('Build') {
|
||||
steps {
|
||||
echo 'Building..'
|
||||
bat 'npm install'
|
||||
bat 'npm run build'
|
||||
}
|
||||
}
|
||||
stage('Test') {
|
||||
steps {
|
||||
echo 'Testing..'
|
||||
}
|
||||
}
|
||||
stage('Archive') {
|
||||
when {
|
||||
branch 'master'
|
||||
expression {
|
||||
currentBuild.result == null || currentBuild.result == 'SUCCESS'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
echo 'Deploying....'
|
||||
dir("dist") {
|
||||
bat 'git init'
|
||||
bat 'git add .'
|
||||
bat 'git config --global user.email "jenkins@bosym.de"'
|
||||
bat 'git config --global user.name "Jenkins"'
|
||||
bat 'git commit -m "Deploy by Jenkins"'
|
||||
withCredentials([usernamePassword(credentialsId: 'e3d97a6f-476f-489f-a207-4766a1c420cf', usernameVariable: 'username', passwordVariable: 'password')])
|
||||
{
|
||||
bat "git push --force --quiet \"https://$username:$password@git.bosym.de/Pascal/realtime-oepnv-tracker.git\" master:gh-pages"
|
||||
}
|
||||
}
|
||||
deleteDir()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user