-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add telcov10n config for project2. (#59714)
Signed-off-by: Semih Kisa <[email protected]>
- Loading branch information
Showing
14 changed files
with
327 additions
and
5 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
...fig/openshift-kni/eco-ci-cd/openshift-kni-eco-ci-cd-main__slcm-gitlab-project2-site3.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
build_root: | ||
image_stream_tag: | ||
name: release | ||
namespace: openshift | ||
tag: golang-1.20 | ||
resources: | ||
'*': | ||
limits: | ||
memory: 4Gi | ||
requests: | ||
cpu: 100m | ||
memory: 200Mi | ||
tests: | ||
- as: eco-ci-cd | ||
cluster: build05 | ||
cron: 00 12 * * 1 | ||
steps: | ||
env: | ||
DCI_PIPELINE_FILES: du-deployment.yml | ||
DU_PROFILE: lb | ||
ECO_GOTESTS_CONTAINER: NOT_REQUIRED | ||
EDU_CLUSTER: cloudransno-site3 | ||
GITLAB_BRANCH: dev | ||
OCP_VERSION: "4.16" | ||
SITE_NAME: cloudransno-site3 | ||
SPIRENT_PORT: "41" | ||
STAMP: tb1slcm1 | ||
ZTP_SITES_LIST: cloudransno-site3 | ||
workflow: telcov10n-slcm-gitlab-project2 | ||
zz_generated_metadata: | ||
branch: main | ||
org: openshift-kni | ||
repo: eco-ci-cd | ||
variant: slcm-gitlab-project2-site3 |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ approvers: | |
- natifridman | ||
- shaior | ||
- ccardenosa | ||
- cplacani | ||
- cplacani |
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
approvers: | ||
- natifridman | ||
- shaior | ||
- ccardenosa | ||
- cplacani | ||
- semihkisa |
1 change: 1 addition & 0 deletions
1
ci-operator/step-registry/telcov10n/slcm/gitlab-project2/OWNERS
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../OWNERS |
12 changes: 12 additions & 0 deletions
12
...stry/telcov10n/slcm/gitlab-project2/telcov10n-slcm-gitlab-project2-workflow.metadata.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"path": "telcov10n/slcm/gitlab-project2/telcov10n-slcm-gitlab-project2-workflow.yaml", | ||
"owners": { | ||
"approvers": [ | ||
"natifridman", | ||
"shaior", | ||
"ccardenosa", | ||
"cplacani", | ||
"semihkisa" | ||
] | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
...step-registry/telcov10n/slcm/gitlab-project2/telcov10n-slcm-gitlab-project2-workflow.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
workflow: | ||
as: telcov10n-slcm-gitlab-project2 | ||
steps: | ||
# pre: | ||
# - ref: telco5g-jobs-router | ||
# - ref: telco5g-cluster-setup | ||
test: | ||
- ref: telcov10n-slcm-gitlab-project2-tests | ||
env: | ||
DEBUG_MODE: false | ||
RUN_EDU_TESTS: true | ||
EDU_PTP: true | ||
# post: | ||
# - ref: telco5g-log-gather | ||
# - chain: gather | ||
# - ref: telco5g-release-cluster | ||
documentation: |- | ||
Run telco QE-SLCM eDU tests. |
6 changes: 6 additions & 0 deletions
6
ci-operator/step-registry/telcov10n/slcm/gitlab-project2/tests/OWNERS
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
approvers: | ||
- natifridman | ||
- shaior | ||
- ccardenosa | ||
- cplacani | ||
- semihkisa |
111 changes: 111 additions & 0 deletions
111
...try/telcov10n/slcm/gitlab-project2/tests/telcov10n-slcm-gitlab-project2-tests-commands.sh
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
set -o pipefail | ||
|
||
|
||
CREDENTIALS_PATH=/var/run/project-02 | ||
CI_PROJECT_ID=`cat $CREDENTIALS_PATH/ci-project-id/CI_PROJECT_ID` | ||
DCI_REMOTE_CI=`cat $CREDENTIALS_PATH/dci-remote-ci/DCI_REMOTE_CI` | ||
ECO_VALIDATION_CONTAINER=`cat $CREDENTIALS_PATH/eco-validation-container/ECO_VALIDATION_CONTAINER` | ||
ECO_GOTESTS_CONTAINER=`cat $CREDENTIALS_PATH/eco-gotests-container/ECO_GOTESTS_CONTAINER` | ||
GITLAB_TOKEN=`cat $CREDENTIALS_PATH/gitlab-token/GITLAB_TOKEN` | ||
GITLAB_URL=`cat $CREDENTIALS_PATH/gitlab-url/GITLAB_URL` | ||
GITLAB_API_TOKEN=`cat $CREDENTIALS_PATH/gitlab-api-token/GITLAB_API_TOKEN` | ||
|
||
|
||
echo "Start" | ||
echo "SITE_NAME $SITE_NAME" | ||
echo "GITLAB_BRANCH $GITLAB_BRANCH" | ||
|
||
# TRIGGER PIPELINE | ||
# | ||
|
||
response=$(curl -X POST \ | ||
-s \ | ||
--fail \ | ||
-F token="$GITLAB_TOKEN" \ | ||
-F "ref=$GITLAB_BRANCH" \ | ||
-F "variables[DU_PROFILE]=$DU_PROFILE" \ | ||
-F "variables[SITE_NAME]=$SITE_NAME" \ | ||
-F "variables[DCI_REMOTE_CI]=$DCI_REMOTE_CI" \ | ||
-F "variables[RUN_EDU_TESTS]=true" \ | ||
-F "variables[STAMP]=$STAMP" \ | ||
-F "variables[OCP_VERSION]=$OCP_VERSION" \ | ||
-F "variables[SPIRENT_PORT]=$SPIRENT_PORT" \ | ||
-F "variables[EDU_PTP]=$EDU_PTP" \ | ||
-F "variables[DEBUG_MODE]=$DEBUG_MODE" \ | ||
-F "variables[DCI_PIPELINE_FILES]=$DCI_PIPELINE_FILES" \ | ||
-F "variables[ECO_VALIDATION_CONTAINER]=$ECO_VALIDATION_CONTAINER" \ | ||
-F "variables[ECO_GOTESTS_CONTAINER]=$ECO_GOTESTS_CONTAINER" \ | ||
$GITLAB_URL/api/v4/projects/$CI_PROJECT_ID/trigger/pipeline) | ||
|
||
echo "response:" | ||
echo $response | ||
|
||
PIPELINE_ID=$(echo $response | jq -r '.id') | ||
|
||
echo "PIPELINE_ID:" | ||
echo $PIPELINE_ID | ||
|
||
sleep 5 | ||
|
||
# POLLING LOOP FOR PIPELINE STATUS | ||
# | ||
|
||
# URL of the API endpoint | ||
API_URL="$GITLAB_URL/api/v4/projects/$CI_PROJECT_ID/pipelines/$PIPELINE_ID" | ||
|
||
# Function to check the status field in the JSON response | ||
check_status() { | ||
response=$(curl -s --header "PRIVATE-TOKEN:$GITLAB_API_TOKEN" $API_URL) | ||
status=$(echo $response | jq -r '.status') | ||
|
||
echo "Status: $status" | ||
|
||
if [[ "$status" == "success" || "$status" == "failed" ]]; then | ||
# Exit the loop if status is success or failure | ||
return 0 | ||
else | ||
# Continue the loop otherwise | ||
return 1 | ||
fi | ||
} | ||
|
||
# Maximum number of retries (18 hours) | ||
MAX_RETRIES=6480 | ||
|
||
# Initialize retry counter | ||
retry_count=0 | ||
|
||
# Loop until the status is success or failed, or until retries are exhausted | ||
while [[ "$retry_count" -lt "$MAX_RETRIES" ]]; do | ||
if check_status; then | ||
echo "Exiting loop. Status is $status." | ||
break | ||
else | ||
echo "Status is not success or failed, checking again..." | ||
retry_count=$((retry_count + 1)) | ||
echo "Retry count: $retry_count/$MAX_RETRIES" | ||
# Wait for 10 seconds before making the next API call | ||
sleep 10 | ||
fi | ||
done | ||
|
||
return_code=0 | ||
|
||
if [[ "$retry_count" -eq "$MAX_RETRIES" ]]; then | ||
echo "Maximum retries reached. Exiting loop." | ||
return_code=1 | ||
fi | ||
|
||
if [[ "$status" == "failed" ]]; then | ||
echo "Pipeline failed." | ||
return_code=1 | ||
fi | ||
|
||
if [[ "$status" == "success" ]]; then | ||
echo "Pipeline success." | ||
fi | ||
|
||
exit $return_code |
12 changes: 12 additions & 0 deletions
12
...lcov10n/slcm/gitlab-project2/tests/telcov10n-slcm-gitlab-project2-tests-ref.metadata.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"path": "telcov10n/slcm/gitlab-project2/tests/telcov10n-slcm-gitlab-project2-tests-ref.yaml", | ||
"owners": { | ||
"approvers": [ | ||
"natifridman", | ||
"shaior", | ||
"ccardenosa", | ||
"cplacani", | ||
"semihkisa" | ||
] | ||
} | ||
} |
52 changes: 52 additions & 0 deletions
52
...gistry/telcov10n/slcm/gitlab-project2/tests/telcov10n-slcm-gitlab-project2-tests-ref.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
ref: | ||
as: telcov10n-slcm-gitlab-project2-tests | ||
from_image: | ||
namespace: ci | ||
name: telco-bastion | ||
tag: latest | ||
commands: telcov10n-slcm-gitlab-project2-tests-commands.sh | ||
timeout: 4h | ||
resources: | ||
requests: | ||
cpu: 100m | ||
memory: 200Mi | ||
env: | ||
- name: ZTP_SITES_LIST | ||
- name: DCI_PIPELINE_FILES | ||
- name: DEBUG_MODE | ||
- name: DU_PROFILE | ||
- name: ECO_GOTESTS_CONTAINER | ||
- name: EDU_CLUSTER | ||
- name: EDU_PTP | ||
- name: GITLAB_BRANCH | ||
- name: OCP_VERSION | ||
- name: RUN_EDU_TESTS | ||
- name: SITE_NAME | ||
- name: SPIRENT_PORT | ||
- name: STAMP | ||
- name: CREDENTIALS_PATH | ||
default: /var/run/project-02 | ||
credentials: | ||
- namespace: test-credentials | ||
name: slcm-project-02-ci-project-id | ||
mount_path: /var/run/project-02/ci-project-id | ||
- namespace: test-credentials | ||
name: slcm-project-02-dci-remote-ci | ||
mount_path: /var/run/project-02/dci-remote-ci | ||
- namespace: test-credentials | ||
name: slcm-project-02-eco-validation-container | ||
mount_path: /var/run/project-02/eco-validation-container | ||
- namespace: test-credentials | ||
name: slcm-project-02-eco-gotests-container | ||
mount_path: /var/run/project-02/eco-gotests-container | ||
- namespace: test-credentials | ||
name: slcm-project-02-gitlab-token | ||
mount_path: /var/run/project-02/gitlab-token | ||
- namespace: test-credentials | ||
name: slcm-project-02-gitlab-url | ||
mount_path: /var/run/project-02/gitlab-url | ||
- namespace: test-credentials | ||
name: slcm-project-02-gitlab-api-token | ||
mount_path: /var/run/project-02/gitlab-api-token | ||
documentation: |- | ||
Run telco QE-SLCM eDU tests. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,8 @@ | |
"natifridman", | ||
"shaior", | ||
"ccardenosa", | ||
"cplacani" | ||
"cplacani", | ||
"semihkisa" | ||
] | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,8 @@ | |
"natifridman", | ||
"shaior", | ||
"ccardenosa", | ||
"cplacani" | ||
"cplacani", | ||
"semihkisa" | ||
] | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,8 @@ | |
"natifridman", | ||
"shaior", | ||
"ccardenosa", | ||
"cplacani" | ||
"cplacani", | ||
"semihkisa" | ||
] | ||
} | ||
} |