mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
Resolve merge conflict
This commit is contained in:
@@ -27,3 +27,7 @@ package-lock.json
|
||||
public/*
|
||||
/public/*
|
||||
storage/framework/laravel-excel/*
|
||||
.vapor/
|
||||
.env.production
|
||||
.env.staging
|
||||
.env.development
|
||||
|
||||
Vendored
+91
@@ -0,0 +1,91 @@
|
||||
// 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 {
|
||||
script{
|
||||
switch(GIT_BRANCH) {
|
||||
case "vapor/production":
|
||||
case "vapor/staging":
|
||||
case "vapor/development":
|
||||
git(
|
||||
url: 'https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git',
|
||||
credentialsId: 'gitlab-jenkins-localhost',
|
||||
branch: GIT_BRANCH
|
||||
)
|
||||
case "origin/dillon/34-jenkins-vapor":
|
||||
git(
|
||||
url: 'https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git',
|
||||
credentialsId: 'gitlab-jenkins-localhost',
|
||||
branch: 'dillon/34-jenkins-vapor'
|
||||
)
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Install') {
|
||||
steps {
|
||||
sh 'composer update'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Tests') {
|
||||
steps {
|
||||
sh 'vendor/bin/phpunit tests/Unit'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Deploy') {
|
||||
steps {
|
||||
script{
|
||||
String gitCommitMessage = getCommitMessage()
|
||||
println("GIT CommitMessage: " + gitCommitMessage)
|
||||
println("GIT GIT_BRANCH: " + GIT_BRANCH)
|
||||
switch(GIT_BRANCH) {
|
||||
case "vapor/production":
|
||||
sh "vendor/bin/vapor deploy production --message='${gitCommitMessage}'"
|
||||
break
|
||||
case "vapor/staging":
|
||||
sh "vendor/bin/vapor deploy staging --message='${gitCommitMessage}'"
|
||||
break
|
||||
case "vapor/development":
|
||||
sh "vendor/bin/vapor deploy development --message='${gitCommitMessage}'"
|
||||
break
|
||||
case "origin/dillon/34-jenkins-vapor":
|
||||
sh "vendor/bin/vapor deploy development --message='${gitCommitMessage}'"
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@NonCPS
|
||||
String getCommitMessage(){
|
||||
commitMessage = " "
|
||||
for ( changeLogSet in currentBuild.changeSets){
|
||||
for (entry in changeLogSet.getItems()){
|
||||
commitMessage = entry.msg
|
||||
}
|
||||
}
|
||||
return commitMessage
|
||||
}
|
||||
@@ -22,6 +22,8 @@
|
||||
"laravel/legacy-factories": "^1.3",
|
||||
"laravel/tinker": "^2.5",
|
||||
"league/fractal": "^0.20.1",
|
||||
"laravel/vapor-cli": "^1.60",
|
||||
"laravel/vapor-core": "^2.33",
|
||||
"maatwebsite/excel": "^3.1",
|
||||
"predis/predis": "^2.1",
|
||||
"rinvex/countries": "^6.1",
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
FROM laravelphp/vapor:php74
|
||||
|
||||
COPY . /var/task
|
||||
@@ -0,0 +1,3 @@
|
||||
FROM laravelphp/vapor:php74
|
||||
|
||||
COPY . /var/task
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.6 MiB |
@@ -125,4 +125,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@endsection
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
FROM laravelphp/vapor:php74
|
||||
|
||||
COPY . /var/task
|
||||
@@ -0,0 +1,49 @@
|
||||
id: 52493
|
||||
name: shipping-portal
|
||||
environments:
|
||||
production:
|
||||
domain: production.portal.izyim.com
|
||||
memory: 1024
|
||||
cli-memory: 512
|
||||
database: cief-rds-mysql
|
||||
storage: shipping-portal-production
|
||||
runtime: 'docker'
|
||||
timeout: 180
|
||||
build:
|
||||
- 'composer update'
|
||||
- 'npm install'
|
||||
- 'npm run dev'
|
||||
- 'gulp build'
|
||||
deploy:
|
||||
- 'php artisan migrate --force'
|
||||
staging:
|
||||
domain: staging.portal.izyim.com
|
||||
memory: 1024
|
||||
cli-memory: 512
|
||||
database: cief-rds-mysql
|
||||
storage: shipping-portal-staging
|
||||
runtime: 'docker'
|
||||
timeout: 180
|
||||
build:
|
||||
- 'composer update'
|
||||
- 'npm install'
|
||||
- 'npm run dev'
|
||||
- 'gulp build'
|
||||
deploy:
|
||||
- 'php artisan migrate --force'
|
||||
development:
|
||||
domain: dev.portal.izyim.com
|
||||
memory: 1024
|
||||
cli-memory: 512
|
||||
database: cief-rds-mysql
|
||||
storage: shipping-portal-development
|
||||
runtime: 'docker'
|
||||
timeout: 180
|
||||
build:
|
||||
- 'composer update'
|
||||
- 'npm install'
|
||||
- 'npm run dev'
|
||||
- 'gulp build'
|
||||
deploy:
|
||||
- 'php artisan migrate --force'
|
||||
|
||||
Reference in New Issue
Block a user