Skip to content

Commit

Permalink
Merge branch 'contrib/PaloAltoNetworks_EXPANDR-4821' into EXPANDR-4821
Browse files Browse the repository at this point in the history
  • Loading branch information
BigEasyJ committed Sep 12, 2023
2 parents d26acdf + b3f4b73 commit 6da8cee
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
Empty file modified Utils/gitlab_triggers/trigger_build_url.sh
100644 → 100755
Empty file.
3 changes: 2 additions & 1 deletion Utils/gitlab_triggers/trigger_build_with_ttl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ if [ -z "$_ci_token" ]; then
exit 1
fi

source Utils/gitlab_triggers/trigger_build_url.sh
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
source ${SCRIPT_DIR}/trigger_build_url.sh

curl -k --request POST \
--form token="${_ci_token}" \
Expand Down
10 changes: 5 additions & 5 deletions Utils/gitlab_triggers/trigger_content_instance_testing_build.sh
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
c# !/usr/bin/env bash
#!/usr/bin/env bash
# This script triggers an instance-testing job in gitlab-CI.

# For this script to work you will need to use a trigger token (see here for more about that: https://code.pan.run/help/ci/triggers/README#trigger-token) # disable-secrets-detection

# This script takes the gitlab-ci trigger token as first parameter and the branch name as an optional second parameter (the default is the current branch).

# Ways to run this script are:
# 1. Utils/gitlab_triggers/trigger_content_nightly_build.sh <trigger-token> <branch-name>
# 2. Utils/gitlab_triggers/trigger_content_nightly_build.sh <trigger-token>
trigger_content_nightly_build.sh <trigger-token> [<branch-name>]
if [[ "$#" -lt 1 ]]; then
echo "Usage: $0 <trigger-token> <branch-name>[current-branch as default]"
echo "Get the trigger token from here https://vault.paloaltonetworks.local/home#R2VuZXJpY1NlY3JldERldGFpbHM6RGF0YVZhdWx0OmIyMzJiNDU0LWEzOWMtNGY5YS1hMTY1LTQ4YjRlYzM1OTUxMzpSZWNvcmRJbmRleDowOklzVHJ1bmNhdGVk" # disable-secrets-detection
exit 1
fi
_gitlab_token=$1

[ -n "$2" ] && _branch="$2" || _branch="$(git branch --show-current)"
[ -n "$2" ] && _branch="$2" || _branch="$(git branch --show-current)"

source Utils/gitlab_triggers/trigger_build_url.sh
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
source ${SCRIPT_DIR}/trigger_build_url.sh

curl "$BUILD_TRIGGER_URL" -F "ref=$_branch" -F "token=$_gitlab_token" -F "variables[INSTANCE_TESTS]=true" -F "variables[IFRA_ENV_TYPE]=Server 5.5" | jq
6 changes: 3 additions & 3 deletions Utils/gitlab_triggers/trigger_content_nightly_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
# This script requires the gitlab-ci trigger token. The branch to run against is an optional second parameter (the default is the current branch). The slack channel to send messages to is an optional third parameter (the default is the 'dmst-build-test')

# Ways to run this script are:
# 1. Utils/gitlab_triggers/trigger_content_nightly_build.sh -ct <trigger-token> -b <branch-name> -ch <slack-channel-name>
# 2. Utils/gitlab_triggers/trigger_content_nightly_build.sh -ct <trigger-token>
trigger_content_nightly_build.sh -ct <trigger-token> [-b <branch-name> -ch <slack-channel-name>]
if [ "$#" -lt "1" ]; then
echo "Usage:
$0 -ct <token>
Expand Down Expand Up @@ -61,7 +60,8 @@ if [ -z "$_ci_token" ]; then
exit 1
fi

source Utils/gitlab_triggers/trigger_build_url.sh
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
source ${SCRIPT_DIR}/trigger_build_url.sh

curl "$BUILD_TRIGGER_URL" --form "ref=${_branch}" --form "token=${_ci_token}" \
--form "variables[OVERRIDE_SDK_REF]=${DEMISTO_SDK_NIGHTLY}" \
Expand Down
3 changes: 2 additions & 1 deletion Utils/gitlab_triggers/trigger_upload_flow_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ if [ -n "$_force" ]; then
_variables="variables[FORCE_BUCKET_UPLOAD]=true"
fi

source Utils/gitlab_triggers/trigger_build_url.sh
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
source ${SCRIPT_DIR}/trigger_build_url.sh

curl -k -v --request POST \
--form token="${_ci_token}" \
Expand Down

0 comments on commit 6da8cee

Please sign in to comment.