Skip to content

Instantly share code, notes, and snippets.

@coolpalani
Forked from yershalom/Jenkinsfile-curl
Created September 6, 2019 13:04
Show Gist options
  • Save coolpalani/8c27fe75c975f2f4aa630dec067dd757 to your computer and use it in GitHub Desktop.
Save coolpalani/8c27fe75c975f2f4aa630dec067dd757 to your computer and use it in GitHub Desktop.
pipeline {
agent {
node {
label 'master'
}
}
stages {
stage('android') {
steps {
echo 'android..'
}
}
stage('iOS') {
steps {
echo 'iOS..'
}
}
stage('publish') {
environment {
ACCESS_KEY = credentials('my-prefined-secret-text')
USER_PASS = credentials('USERPASS')
}
steps {
echo 'publish....'
echo "${env.ACCESS_KEY}"
sh "curl -XGET http://ptsv2.com/t/jenkins_demo/post?ACCESS_KEY=${env.ACCESS_KEY}"
echo "${env.USER_PASS}"
sh "curl -XGET http://ptsv2.com/t/jenkins_demo/post?USER_PASS=${env.USER_PASS}"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment