mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/vapor-laravel-poc.git
synced 2026-08-19 04:13:55 +00:00
Setup playground for laravel vapor with jenkins
This commit is contained in:
+1
-1
@@ -12,4 +12,4 @@ deploy:
|
||||
- npm run build
|
||||
- vapor deploy production --message="$CI_COMMIT_MESSAGE"
|
||||
only:
|
||||
- development
|
||||
- master
|
||||
|
||||
Vendored
+49
@@ -0,0 +1,49 @@
|
||||
// Webhook + Gitlab git pull + Vapor
|
||||
|
||||
def payload = readJSON text: "${payload}"
|
||||
String userName = payload.user_name
|
||||
String userEmail = payload.user_email
|
||||
String httpUrl = payload.project.http_url
|
||||
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
docker {
|
||||
image 'dillonngo/docker-based-image:poc'
|
||||
args "--group-add 992 -v /var/run/docker.sock:/var/run/docker.sock"
|
||||
}
|
||||
}
|
||||
environment {
|
||||
HOME = '.'
|
||||
}
|
||||
stages {
|
||||
stage('Download source code from Git') {
|
||||
steps {
|
||||
git(
|
||||
url: httpUrl,
|
||||
credentialsId: 'gitlab-jenkins-localhost',
|
||||
branch: 'test'
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
stage('Install') {
|
||||
steps {
|
||||
sh 'composer update'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Tests') {
|
||||
steps {
|
||||
sh 'vendor/bin/phpunit tests/Unit'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Deploy') {
|
||||
steps {
|
||||
sh 'vendor/bin/vapor deploy production --message="Test Jenkins"'
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,18 @@
|
||||
id: 46540
|
||||
id: 48019
|
||||
name: vapor-laravel-poc
|
||||
separate-vendor: true
|
||||
environments:
|
||||
production:
|
||||
memory: 1024
|
||||
cli-memory: 512
|
||||
database: vapor-laravel-poc-db
|
||||
runtime: 'php-8.2:al2'
|
||||
storage: vapor-laravel-poc
|
||||
runtime: 'docker'
|
||||
timeout: 180
|
||||
build:
|
||||
- 'composer install --no-dev'
|
||||
- 'php artisan event:cache'
|
||||
- 'composer update'
|
||||
- 'npm install'
|
||||
- 'npm run dev'
|
||||
# - 'gulp build'
|
||||
deploy:
|
||||
- 'php artisan migrate --force'
|
||||
|
||||
Reference in New Issue
Block a user