Skip to content

Commit

Permalink
New Jenkinsfile formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinBrack committed Jul 7, 2019
1 parent 0e96e25 commit 52ba6f8
Showing 1 changed file with 29 additions and 9 deletions.
38 changes: 29 additions & 9 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,39 @@ pipeline {
agent any

stages {
stage('Build') {
stage('BUILD EXPRESS') {
steps {
echo 'Building..',
docker "build -t express:mine ./express"
docker "build -t client:mine ./client"
echo 'BUILDING EXPRESS'
sh 'docker build -t express:mine ./express'
echo 'EXPRESS BUILD COMPLETE'
}
}
stage('Deploy') {
stage('BUILD NEXTJS') {
steps {
echo 'Deploying....',
docker "run -d -p 1337:1337 --name express express:mine"
docker "run -d -p 80:3000 --name nextjs client:mine"
docker "run -d -p 5432:5432 --name pg postgres"
echo 'BUILDING NEXTJS'
sh 'docker build -t client:mine ./client'
echo 'NEXTJS BUILD COMPLETE'
}
}
stage('LAUNCH EXPRESS') {
steps {
echo 'RUNNING EXPRESS CONTAINER'
sh 'docker run -d -p 1337:1337 --name express express:mine'
echo 'CONTAINER MOUNTED ON PORT 1337'
}
}
stage('LAUNCH NEXTJS') {
steps {
echo 'RUNNING NEXT CONTAINER'
sh 'docker run -d -p 80:3000 --name nextjs client:mine'
echo 'NEXTJS MOUNTED ON PORT 80'
}
}
stage('LAUNCH POSTGRES') {
steps {
echo 'LAUNCHING POSTGRES'
sh 'docker run -d -p 5432:5432 --name pg postgres'
echo 'POSTGRES MOUNTED ON PORT 5432'
}
}
}
Expand Down

0 comments on commit 52ba6f8

Please sign in to comment.