mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
Jenkins Vapor initial commit
This commit is contained in:
@@ -25,3 +25,6 @@ package-lock.json
|
||||
public/*
|
||||
/public/*
|
||||
storage/framework/laravel-excel/*
|
||||
.vapor/
|
||||
.env.production
|
||||
.env.staging
|
||||
|
||||
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: 'dillon/34-jenkins-vapor'
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
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"'
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -17,6 +17,7 @@
|
||||
"intervention/image": "^2.5",
|
||||
"laravel/framework": "^8.40",
|
||||
"laravel/tinker": "^2.5",
|
||||
"laravel/vapor-core": "^2.33",
|
||||
"maatwebsite/excel": "^3.1",
|
||||
"rinvex/countries": "^6.1",
|
||||
"spatie/laravel-activitylog": "^3.14",
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
FROM laravelphp/vapor:php74
|
||||
|
||||
COPY . /var/task
|
||||
@@ -0,0 +1,3 @@
|
||||
FROM laravelphp/vapor:php74
|
||||
|
||||
COPY . /var/task
|
||||
@@ -0,0 +1,25 @@
|
||||
id: 52493
|
||||
name: shipping-portal
|
||||
environments:
|
||||
production:
|
||||
memory: 1024
|
||||
cli-memory: 512
|
||||
database: vapor-laravel-poc-db
|
||||
storage: shipping-portal-production
|
||||
runtime: 'docker'
|
||||
timeout: 180
|
||||
build:
|
||||
- 'composer update'
|
||||
- 'npm install'
|
||||
- 'npm run dev'
|
||||
- 'gulp build'
|
||||
deploy:
|
||||
- 'php artisan migrate --force'
|
||||
# staging:
|
||||
# memory: 1024
|
||||
# cli-memory: 512
|
||||
# runtime: 'php-8.2:al2'
|
||||
# build:
|
||||
# - 'COMPOSER_MIRROR_PATH_REPOS=1 composer install'
|
||||
# - 'php artisan event:cache'
|
||||
# - 'npm ci && npm run dev && rm -rf node_modules'
|
||||
Reference in New Issue
Block a user