This commit is contained in:
Vicente Falco 2017-11-07 13:54:19 +01:00
parent e9aa15bbe1
commit b87cd27ce2
2 changed files with 3 additions and 2 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

5
Jenkinsfile vendored
View File

@ -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