Jenkins
This commit is contained in:
parent
ffed7dc666
commit
2a6e707ae3
|
@ -1,17 +1,21 @@
|
||||||
#!/usr/bin/env groovy
|
#!/usr/bin/env groovy
|
||||||
|
|
||||||
def branchName = "${env.BRANCH_NAME}";
|
def branchName = "${env.BRANCH_NAME}";
|
||||||
def buildNumber = "${env.BUILD_NUMBER}";
|
def TAG = "${env.BUILD_NUMBER}";
|
||||||
def branchProduction = "master"
|
def branchProduction = "master"
|
||||||
def branchTest = "test";
|
def branchTest = "test";
|
||||||
def dockerHost = "${env.DOCKER_HOST}";
|
def dockerHost = "${env.DOCKER_HOST}";
|
||||||
|
|
||||||
|
def env.NODE_ENV = branchName;
|
||||||
|
|
||||||
if (branchName == branchProduction)
|
if (branchName == branchProduction)
|
||||||
dockerHost = "tcp://172.16.255.29:2375";
|
dockerHost = "tcp://172.16.255.29:2375";
|
||||||
|
|
||||||
node
|
node
|
||||||
{
|
{
|
||||||
|
stage ('Print environment variables'){
|
||||||
|
echo "Branch ${branchName}, Build ${buildNumber} en docker Host ${dockerHost}"
|
||||||
|
}
|
||||||
stage ('Checkout') {
|
stage ('Checkout') {
|
||||||
checkout scm
|
checkout scm
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue