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