Added env variables
This commit is contained in:
@@ -1,11 +1,22 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
|
environment {
|
||||||
|
ENV = '$OS'
|
||||||
|
}
|
||||||
tools {
|
tools {
|
||||||
maven "maven_jenkins"
|
maven "maven_jenkins"
|
||||||
jdk "java_jenkins"
|
jdk "java_jenkins"
|
||||||
nodejs "nodejs"
|
nodejs "nodejs"
|
||||||
}
|
}
|
||||||
stages {
|
stages {
|
||||||
|
stage ('Deploy') {
|
||||||
|
when {
|
||||||
|
environment name: "ENV", value: "android"
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
echo 'Android execution'
|
||||||
|
}
|
||||||
|
}
|
||||||
stage('Checkout') {
|
stage('Checkout') {
|
||||||
steps {
|
steps {
|
||||||
git url: 'https://guillemhs@bitbucket.org/itnove/myexampleapp.git'
|
git url: 'https://guillemhs@bitbucket.org/itnove/myexampleapp.git'
|
||||||
|
|||||||
Reference in New Issue
Block a user