Jenkins
This commit is contained in:
parent
e9aa15bbe1
commit
b87cd27ce2
|
@ -1,12 +1,13 @@
|
||||||
#!/usr/bin/env groovy
|
#!/usr/bin/env groovy
|
||||||
|
|
||||||
def branchName = "${env.BRANCH_NAME}";
|
def branchName = "${env.BRANCH_NAME}";
|
||||||
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}";
|
||||||
|
|
||||||
env.NODE_ENV = branchName;
|
env.NODE_ENV = branchName;
|
||||||
|
env.BRANCH_NAME = branchName;
|
||||||
|
env.TAG = "${env.BUILD_NUMBER}";
|
||||||
|
|
||||||
if (branchName == branchProduction)
|
if (branchName == branchProduction)
|
||||||
dockerHost = "tcp://172.16.255.29:2375";
|
dockerHost = "tcp://172.16.255.29:2375";
|
||||||
|
@ -14,7 +15,7 @@ if (branchName == branchProduction)
|
||||||
node
|
node
|
||||||
{
|
{
|
||||||
stage ('Print environment variables'){
|
stage ('Print environment variables'){
|
||||||
echo "Branch ${branchName}, Build ${buildNumber} en docker Host ${dockerHost}"
|
echo "Branch ${branchName}, Build ${env.TAG} en docker Host ${dockerHost}"
|
||||||
}
|
}
|
||||||
stage ('Checkout') {
|
stage ('Checkout') {
|
||||||
checkout scm
|
checkout scm
|
||||||
|
|
Loading…
Reference in New Issue