This commit is contained in:
Sieciech 2021-07-27 14:19:14 +02:00
parent 797f83b777
commit 0a40523c2c
1 changed files with 10 additions and 10 deletions

20
Jenkinsfile vendored
View File

@ -37,7 +37,7 @@ pipeline {
parallel {
stage('Frontend') {
steps {
dir(path: 'frontend') {
dir(path: 'src/frontend') {
sh 'sed -i "s/-1001/${BUILD_ID}/g" src/environments/*.ts'
sh 'Timestamp=`php8.0 -r "echo time();"` && sed -i "s/-1002/${Timestamp}/g" src/environments/*.ts'
sh 'npm ci'
@ -48,7 +48,7 @@ pipeline {
stage('Backend') {
steps {
dir(path: 'backend') {
dir(path: 'src/backend') {
sh 'php8.0 /bin/composer install'
}
@ -62,7 +62,7 @@ pipeline {
parallel {
stage('Frontend') {
steps {
dir(path: 'frontend') {
dir(path: 'src/frontend') {
sh 'echo skip'
}
@ -71,7 +71,7 @@ pipeline {
stage('Backend') {
steps {
dir(path: 'backend') {
dir(path: 'src/backend') {
sh 'APP_SECRET=`php8.0 -r "echo md5(\\"branch=${BRANCH_NAME};\\");"` && sed -i "s/APP_SECRET=.*/APP_SECRET=${APP_SECRET}/g" .env'
sh 'sed -i "s/DATABASE_URL=.*/DATABASE_URL=${DatabaseUrl}/g" .env.dev'
sh 'composer dump-env dev'
@ -87,7 +87,7 @@ pipeline {
parallel {
stage('Frontend') {
steps {
dir(path: 'frontend') {
dir(path: 'src/frontend') {
sh 'ng lint'
}
@ -96,7 +96,7 @@ pipeline {
stage('Backend') {
steps {
dir(path: 'backend') {
dir(path: 'src/backend') {
sh 'php8.0 vendor/bin/phpunit'
}
@ -110,7 +110,7 @@ pipeline {
parallel {
stage('Frontend') {
steps {
dir(path: 'frontend') {
dir(path: 'src/frontend') {
sh 'ng b -c production'
}
@ -119,7 +119,7 @@ pipeline {
stage('Backend') {
steps {
dir(path: 'backend') {
dir(path: 'src/backend') {
sh 'echo skip'
}
@ -143,7 +143,7 @@ pipeline {
parallel {
stage('Frontend') {
steps {
dir(path: 'frontend') {
dir(path: 'src/frontend') {
sh 'ssh web@fufle.net touch /web/fufle.net/curenet/dev/frontend/REMOVEME'
sh 'ssh web@fufle.net rm -rf /web/fufle.net/curenet/dev/frontend/*'
sh 'scp -r dist/* web@fufle.net:/web/fufle.net/curenet/dev/frontend/'
@ -154,7 +154,7 @@ pipeline {
stage('Backend') {
steps {
dir(path: 'backend') {
dir(path: 'src/backend') {
sh 'ssh web@fufle.net touch /web/fufle.net/curenet/dev/backend/REMOVEME'
sh 'ssh web@fufle.net rm -rf /web/fufle.net/curenet/dev/backend/*'
sh 'scp -r ./ web@fufle.net:/web/fufle.net/curenet/dev/backend/'