Skip to content

Commit

Permalink
contrib/intel/jenkins: Do not run pipeline for unauthorized users
Browse files Browse the repository at this point in the history
Lookup a all teams and users in the ofiwg github team.
If the submitter is not in the list of users then deny them
If they are, lookup their email address (required to be publicly available)
and if their email address matches the PR submitter's address then allow them.
All other cases are denied.

Signed-off-by: Zach Dworkin <zachary.dworkin@intel.com>
  • Loading branch information
zachdworkin committed Dec 18, 2024
1 parent 9b7f27c commit d77f8d5
Showing 1 changed file with 21 additions and 7 deletions.
28 changes: 21 additions & 7 deletions contrib/intel/jenkins/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,27 @@ 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} \
--email=${env.CHANGE_AUTHOR_EMAIL} \
--root_ca_path=${env.ROOT_CA_PATH} \
--priv_key_path=${env.PRIV_KEY_PATH} \
--pub_key_path=${env.PUB_KEY_PATH} \
"""
}
}
}
stage ('opt-out') {
steps {
script {
Expand Down Expand Up @@ -433,13 +454,6 @@ pipeline {
}
}
}
stage ('bootstrap-ci') {
steps {
script {
bootstrap_ci()
}
}
}
stage ('build-libfabric') {
when { equals expected: true, actual: DO_RUN }
parallel {
Expand Down

0 comments on commit d77f8d5

Please sign in to comment.