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