Skip to content

Commit 0f4f2fe

Browse files
committed
feat: devtest using the pr number
1 parent d28c445 commit 0f4f2fe

1 file changed

Lines changed: 18 additions & 15 deletions

File tree

.github/workflows/stage-4-deploy-devtest.yaml

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@ jobs:
8585
env:
8686
COMMIT_SHA: ${{ inputs.commit_sha }}
8787
ENVIRONMENT_NAME: ${{ matrix.environment }}
88-
PR_NUMBER: ${{ inputs.pr_number }}
89-
#GH_TOKEN: ${{ github.token }}
88+
GH_TOKEN: ${{ github.token }}
9089
run: |
9190
set -euo pipefail
9291
# Define common variables
@@ -103,23 +102,27 @@ jobs:
103102
devtest_short_sha="devtest_${git_short_sha}"
104103
105104
# Get the PR Number tag
106-
#PR_NUM=$(gh api repos/${{ github.repository }}/commits/${{ github.sha }}/pulls --jq '.[0].number')
107-
#PR_NUM_TAG="pr${PR_NUM}"
108-
DEVTEST_PR_NUM_TAG="devtest_${PR_NUMBER}"
105+
PR_NUM=$(gh api repos/${{ github.repository }}/commits/${{ github.sha }}/pulls --jq '.[0].number')
106+
PR_NUM_TAG="pr${PR_NUM}"
107+
DEVTEST_PR_NUM_TAG="devtest_${PR_NUM_TAG}"
108+
echo "Devtest_PR_Num_tag: ${DEVTEST_PR_NUM_TAG}"
109109
110110
# Prepare parameters as separate key=value tokens
111111
param_image="dockerImageTag=${DEVTEST_PR_NUM_TAG}"
112112
param_tests="testTypes=[${test_types[$ENVIRONMENT_NAME]}]"
113113
114-
echo "Starting Azure devops pipeline \"Deploy to Azure - Core ${ENVIRONMENT_NAME}\"..."
115-
RUN_ID=$(az pipelines run \
116-
--commit-id "$COMMIT_SHA" \
117-
--name "Deploy to Azure - Core ${ENVIRONMENT_NAME}" \
118-
--org "${organisation}" \
119-
--project "${project_name}" \
120-
--parameters "$param_image" "$param_tests" \
121-
--output tsv --query id)
114+
echo "Pipeline params test:"
115+
echo "Param_image: ${param_image}"
122116
123-
echo "Click here to view the ADO pipeline: ${organisation}/${project_name}/_build/results?buildId=${RUN_ID}"
117+
# echo "Starting Azure devops pipeline \"Deploy to Azure - Core ${ENVIRONMENT_NAME}\"..."
118+
# RUN_ID=$(az pipelines run \
119+
# --commit-id "$COMMIT_SHA" \
120+
# --name "Deploy to Azure - Core ${ENVIRONMENT_NAME}" \
121+
# --org "${organisation}" \
122+
# --project "${project_name}" \
123+
# --parameters "$param_image" "$param_tests" \
124+
# --output tsv --query id)
124125
125-
scripts/bash/wait_ado_pipeline.sh "$RUN_ID" "${organisation}" "${project_name}" 1800
126+
# echo "Click here to view the ADO pipeline: ${organisation}/${project_name}/_build/results?buildId=${RUN_ID}"
127+
128+
# scripts/bash/wait_ado_pipeline.sh "$RUN_ID" "${organisation}" "${project_name}" 1800

0 commit comments

Comments
 (0)