Я настроил webhook на сервере bitbucket, который указывает на Openshift.Я хочу получить URL репозитория GIT, ветку git и т. Д. Из полезных данных webhook в моем встроенном jenkinsfile, но я не знаю, как их получить.(Хотя Webhook запускает сборку).
Возможно ли это?
Вот мой BuildConfig
apiVersion: build.openshift.io/v1
kind: BuildConfig
metadata:
labels:
application: spring-demo
template: openjdk18-web-basic-s2i
name: spring-demo
spec:
output:
to:
kind: ImageStreamTag
name: 'spring--demo:latest'
runPolicy: Serial
source:
type: None
strategy:
jenkinsPipelineStrategy:
jenkinsfile: |-
pipeline {
agent {
label 'maven'
}
stages {
stage('Build') {
steps{
sh "echo ${env.BRANCH_NAME}" <<<<------------- this is null
}
}
}
}
type: JenkinsPipeline
triggers:
- bitbucket:
secretReference:
name: yoyo
type: Bitbucket
- Спасибо.