From 71bdde77860fe25d836b0aba1c300dac00ac7d08 Mon Sep 17 00:00:00 2001 From: Zach Dworkin Date: Tue, 17 Dec 2024 15:48:30 -0800 Subject: [PATCH] contrib/intel/jenkins: Do not run pipeline for unauthorized users Lookup a all teams and users in the ofiwg github team. If the submitter is not in the list of users then deny them Signed-off-by: Zach Dworkin --- contrib/intel/jenkins/Jenkinsfile | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/contrib/intel/jenkins/Jenkinsfile b/contrib/intel/jenkins/Jenkinsfile index b2a6d76a8b9..6397739e63f 100644 --- a/contrib/intel/jenkins/Jenkinsfile +++ b/contrib/intel/jenkins/Jenkinsfile @@ -399,6 +399,23 @@ pipeline { } } } + stage ('bootstrap-ci') { + steps { + script { + bootstrap_ci() + } + } + } + stage('check-authorization') { + steps { + script { + sh """source ${CI_LOCATION}/${env.CI_MODULE}/venv/bin/activate;\ + python ${CI_LOCATION}/authorize.py \ + --author=${env.CHANGE_AUTHOR} + """ + } + } + } stage ('opt-out') { steps { script { @@ -435,13 +452,6 @@ pipeline { } } } - stage ('bootstrap-ci') { - steps { - script { - bootstrap_ci() - } - } - } stage ('build-libfabric') { when { equals expected: true, actual: DO_RUN } parallel {