Skip to content

Commit a9a6c40

Browse files
kobymeirkobymeir
and
kobymeir
authored
Trigger content nightly build sdk ref (#29184)
* trying to fix cache warnings * trying to fix cache warnings * trying to fix cache warnings * adding support for SDK ref when triggering nightly build * adding support for SDK ref when triggering nightly build --------- Co-authored-by: kobymeir <[email protected]>
1 parent 709e18a commit a9a6c40

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

Diff for: Utils/gitlab_triggers/trigger_content_nightly_build.sh

+10-2
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ if [ "$#" -lt "1" ]; then
1212
echo "Usage:
1313
$0 -ct <token>
1414
15-
-ct, --ci-token The ci gitlab trigger token.
15+
[-ct, --ci-token] The ci gitlab trigger token.
1616
[-b, --branch] The branch name. Default is the current branch.
1717
[-ch, --slack-channel] A slack channel to send notifications to. Default is dmst-build-test.
18+
[-s, --sdk-ref] The sdk ref to use. Default is the latest nightly.
1819
"
1920
echo "Get the trigger token from here https://vault.paloaltonetworks.local/home#R2VuZXJpY1NlY3JldERldGFpbHM6RGF0YVZhdWx0OmIyMzJiNDU0LWEzOWMtNGY5YS1hMTY1LTQ4YjRlYzM1OTUxMzpSZWNvcmRJbmRleDowOklzVHJ1bmNhdGVk" # disable-secrets-detection
2021
exit 1
@@ -39,6 +40,9 @@ while [[ "$#" -gt 0 ]]; do
3940
-ch|--slack-channel) _slack_channel="$2"
4041
shift
4142
shift;;
43+
-s|--sdk-ref) DEMISTO_SDK_NIGHTLY="$2"
44+
shift
45+
shift;;
4246

4347
*) # unknown option.
4448
shift;;
@@ -53,4 +57,8 @@ fi
5357

5458
source Utils/gitlab_triggers/trigger_build_url.sh
5559

56-
curl "$BUILD_TRIGGER_URL" -F "ref=$_branch" -F "token=$_ci_token" -F "variables[NIGHTLY]=true" -F "variables[IFRA_ENV_TYPE]=Nightly" -F "variables[SLACK_CHANNEL]=$_slack_channel" | jq
60+
curl "$BUILD_TRIGGER_URL" --form "ref=${_branch}" --form "token=${_ci_token}" \
61+
--form "variables[OVERRIDE_SDK_REF]=${DEMISTO_SDK_NIGHTLY}" \
62+
--form "variables[NIGHTLY]=true" \
63+
--form "variables[IFRA_ENV_TYPE]=Nightly" \
64+
--form "variables[SLACK_CHANNEL]=${_slack_channel}" | jq

0 commit comments

Comments
 (0)