mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-22 17:31:03 +01:00
45 lines
1.0 KiB
Groovy
45 lines
1.0 KiB
Groovy
pipeline {
|
|
agent {
|
|
node {
|
|
label 'crawlab'
|
|
}
|
|
}
|
|
|
|
stages {
|
|
stage('Setup') {
|
|
steps {
|
|
echo "Running Setup..."
|
|
script {
|
|
if (env.GIT_BRANCH == 'develop') {
|
|
env.MODE = 'test'
|
|
} else if (env.GIT_BRANCH == 'master') {
|
|
env.MODE = 'production'
|
|
} else {
|
|
env.MODE = 'test'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
stage('Build') {
|
|
steps {
|
|
echo "Building..."
|
|
sh """
|
|
docker build -t tikazyq/crawlab:latest -f Dockerfile.local .
|
|
"""
|
|
}
|
|
}
|
|
stage('Test') {
|
|
steps {
|
|
echo 'Testing..'
|
|
}
|
|
}
|
|
stage('Deploy') {
|
|
steps {
|
|
echo 'Deploying....'
|
|
sh """
|
|
docker-compose up
|
|
"""
|
|
}
|
|
}
|
|
}
|
|
} |