Created
August 13, 2019 09:34
-
-
Save geekodour/f4cb24582398c37892b8c8669cd8c135 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# NOTE: This is the trimmed down main.workflow for prometheus/prometheus | |
workflow "Start benchmark" { | |
on = "issue_comment" | |
resolves = ["start_benchmark"] | |
} | |
workflow "Cancel benchmark" { | |
on = "issue_comment" | |
resolves = ["cancel_benchmark"] | |
} | |
action "start_benchmark_validate" { | |
uses = "docker://prombench/comment-monitor:latest" | |
args = ["(?mi)^/benchmark\\s*(master|[0-9]+\\.[0-9]+\\.[0-9]+\\S*)?\\s*$"] | |
secrets = ["GITHUB_TOKEN"] | |
env = { | |
COMMENT_TEMPLATE="Starting benchmark" | |
} | |
} | |
action "cancel_benchmark_validate" { | |
uses = "docker://prombench/comment-monitor:latest" | |
args = ["(?mi)^/benchmark\\s+cancel\\s*$"] | |
secrets = ["GITHUB_TOKEN"] | |
env = { | |
COMMENT_TEMPLATE="Cancelling benchmark" | |
} | |
} | |
action "start_benchmark" { | |
needs = ["start_benchmark_validate"] | |
uses = "docker://prombench/prombench:2.0.2" | |
# TODO: Remove v after we enforce adding v in the comment | |
args = [ | |
"export RELEASE=$(cat /github/home/ARG_0) && if [ -z $RELEASE ]; then export RELEASE=master; else export RELEASE=v$RELEASE; fi;" | |
"export PR_NUMBER=$(cat /github/home/ARG_1);", | |
"make", | |
"create_test_ss" | |
] | |
secrets = ["AUTH_FILE"] | |
env = { | |
PROJECT_ID="prombench-example", | |
CLUSTER_NAME="prombench", | |
ZONE="us-central1-a", | |
DOMAIN_NAME="http://prombench.prometheus.io", | |
PROMBENCH_REPO="https://github.com/prometheus/prombench.git" | |
} | |
} | |
action "cancel_benchmark" { | |
needs = ["cancel_benchmark_validate"] | |
uses = "docker://prombench/prombench:2.0.2" | |
args = [ | |
"export PR_NUMBER=$(cat /github/home/ARG_0);", | |
"make", | |
"delete_test_ss" | |
] | |
secrets = ["AUTH_FILE"] | |
env = { | |
PROJECT_ID="prombench-example", | |
CLUSTER_NAME="prombench", | |
ZONE="us-central1-a", | |
PROMBENCH_REPO="https://github.com/prometheus/prombench.git" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment