Skip to content

Commit

Permalink
added feature to run network audit on demand
Browse files Browse the repository at this point in the history
  • Loading branch information
mihaiplesa committed Feb 6, 2020
1 parent 46730b6 commit a652c48
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,7 @@ pipeline {
}
stage("sccache") {
when {
allOf {
expression { !DISABLE_SCCACHE }
}
expression { !DISABLE_SCCACHE }
}
steps {
script {
Expand Down Expand Up @@ -351,9 +349,7 @@ pipeline {
}
stage("sccache") {
when {
allOf {
expression { !DISABLE_SCCACHE }
}
expression { !DISABLE_SCCACHE }
}
steps {
script {
Expand All @@ -370,6 +366,9 @@ pipeline {
}
}
stage("audit-network") {
when {
expression { RUN_NETWORK_AUDIT }
}
steps {
timeout(time: 4, unit: "MINUTES") {
catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') {
Expand Down Expand Up @@ -497,9 +496,7 @@ pipeline {
}
stage("sccache") {
when {
allOf {
expression { !DISABLE_SCCACHE }
}
expression { !DISABLE_SCCACHE }
}
steps {
script {
Expand All @@ -520,6 +517,9 @@ pipeline {
}
}
stage("audit-network") {
when {
expression { RUN_NETWORK_AUDIT }
}
steps {
timeout(time: 4, unit: "MINUTES") {
catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') {
Expand Down Expand Up @@ -689,9 +689,7 @@ pipeline {
}
stage("sccache") {
when {
allOf {
expression { !DISABLE_SCCACHE }
}
expression { !DISABLE_SCCACHE }
}
steps {
script {
Expand All @@ -715,6 +713,9 @@ pipeline {
}
}
stage("audit-network") {
when {
expression { RUN_NETWORK_AUDIT }
}
steps {
timeout(time: 4, unit: "MINUTES") {
catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') {
Expand Down Expand Up @@ -837,6 +838,7 @@ def setEnv() {
SKIP_LINUX = bbPrDetails.labels.count { label -> label.name.equalsIgnoreCase("CI/skip-linux") }.equals(1)
SKIP_MACOS = bbPrDetails.labels.count { label -> label.name.equalsIgnoreCase("CI/skip-macos") }.equals(1)
SKIP_WINDOWS = bbPrDetails.labels.count { label -> label.name.equalsIgnoreCase("CI/skip-windows") }.equals(1)
RUN_NETWORK_AUDIT = bbPrDetails.labels.count { label -> label.name.equalsIgnoreCase("CI/run-network-audit") }.equals(1)
env.SLACK_USERNAME = readJSON(text: SLACK_USERNAME_MAP)[bbPrDetails.user.login]
env.BRANCH_PRODUCTIVITY_HOMEPAGE = "https://github.com/brave/brave-browser/pull/${bbPrNumber}"
env.BRANCH_PRODUCTIVITY_NAME = "Brave Browser PR #${bbPrNumber}"
Expand All @@ -856,6 +858,7 @@ def setEnv() {
SKIP_LINUX = SKIP_LINUX || bcPrDetails.labels.count { label -> label.name.equalsIgnoreCase("CI/skip-linux") }.equals(1)
SKIP_MACOS = SKIP_MACOS || bcPrDetails.labels.count { label -> label.name.equalsIgnoreCase("CI/skip-macos") }.equals(1)
SKIP_WINDOWS = SKIP_WINDOWS || bcPrDetails.labels.count { label -> label.name.equalsIgnoreCase("CI/skip-windows") }.equals(1)
RUN_NETWORK_AUDIT = RUN_NETWORK_AUDIT || bcPrDetails.labels.count { label -> label.name.equalsIgnoreCase("CI/run-network-audit") }.equals(1)
env.SLACK_USERNAME = readJSON(text: SLACK_USERNAME_MAP)[bcPrDetails.user.login]
env.BRANCH_PRODUCTIVITY_HOMEPAGE = "https://github.com/brave/brave-core/pull/${bcPrDetails.number}"
env.BRANCH_PRODUCTIVITY_NAME = "Brave Core PR #${bcPrDetails.number}"
Expand Down

0 comments on commit a652c48

Please sign in to comment.