Merge "Add test to validate on-merge"
This commit is contained in:
commit
02e90bc91f
@ -15,12 +15,12 @@ data:
|
||||
"image_name": "mongodb-sharded",
|
||||
"project": "mongodb",
|
||||
"repo": "mongodb-sharded",
|
||||
"tag": "4.4.3",
|
||||
"image_fullname": "mongodb/mongodb-sharded:4.4.3",
|
||||
"tag": "4.4.4",
|
||||
"image_fullname": "mongodb/mongodb-sharded:4.4.4",
|
||||
"path": "",
|
||||
"build": {
|
||||
"git_repo": "docker.io/bitnami/mongodb-sharded",
|
||||
"tag": "4.4.3-debian-10-r44",
|
||||
"git_repo": "quay.io/slfletch/mongodb-sharded",
|
||||
"tag": "4.4.4-debian-10-r41",
|
||||
"user": "",
|
||||
"password": ""
|
||||
}
|
||||
@ -31,7 +31,7 @@ data:
|
||||
"chart_name": "mongodb-sharded",
|
||||
"project": "mongodb",
|
||||
"repo": "mongodb-sharded",
|
||||
"version": "3.3.3",
|
||||
"version": "3.4.4",
|
||||
"build_from_source": false,
|
||||
"path": "",
|
||||
"remote_namespace": "mongodb",
|
||||
@ -53,9 +53,9 @@ data:
|
||||
},
|
||||
"releases": {
|
||||
"image": {
|
||||
"registry": "docker.io",
|
||||
"repository": "bitnami/mongodb-sharded",
|
||||
"tag": "4.4.4-debian-10-r28"
|
||||
"registry": "quay.io",
|
||||
"repository": "slfletch/mongodb-sharded",
|
||||
"tag": "4.4.4-debian-10-r41"
|
||||
}
|
||||
}
|
||||
}]
|
||||
|
@ -81,14 +81,10 @@ EOF
|
||||
change_id=$(git log -1 | grep Change-Id: | awk '{print $2}')
|
||||
popd
|
||||
sleep 60
|
||||
if (( COUNTER == 0 ));
|
||||
then
|
||||
CHANGE_ID_COUNTER=$change_id
|
||||
fi
|
||||
COUNTER=$((COUNTER+1))
|
||||
|
||||
done
|
||||
|
||||
COUNTER=1
|
||||
voting_ci="false"
|
||||
for jarvis_project in $(find ./tools/gate/jarvis/5G-SA-core -maxdepth 1 -mindepth 1 -type d -printf '%f\n'); do
|
||||
echo "--- processing ${jarvis_project} with voting_ci = ${voting_ci}"
|
||||
@ -97,7 +93,7 @@ for jarvis_project in $(find ./tools/gate/jarvis/5G-SA-core -maxdepth 1 -mindept
|
||||
timeout="4000"
|
||||
end=$((end + timeout))
|
||||
while true; do
|
||||
result="$(curl -u jarvis:password -SsL https://gerrit.jarvis.local/a/changes/${CHANGE_ID_COUNTER}/revisions/1/checks | tail -1 | jq -r .[].state)"
|
||||
result="$(curl -u jarvis:password -SsL https://gerrit.jarvis.local/a/changes/${COUNTER}/revisions/1/checks | tail -1 | jq -r .[].state)"
|
||||
[ $result == "SUCCESSFUL" ] && break || true
|
||||
[ $result == "FAILED" ] && exit 1 || true
|
||||
sleep 25
|
||||
@ -114,8 +110,37 @@ for jarvis_project in $(find ./tools/gate/jarvis/5G-SA-core -maxdepth 1 -mindept
|
||||
end=$((end + timeout))
|
||||
while true; do
|
||||
# Check that Jarvis-System has reported the success of the pipeline run to Gerrit, by checking the value of the Verified label
|
||||
VERIFIED="$(curl -u jarvis:password -SsL https://gerrit.jarvis.local/a/changes/${CHANGE_ID_COUNTER}/revisions/1/review/ | tail -1 | jq -r .labels.Verified.all[0].value)"
|
||||
[ "$VERIFIED" == 1 ] && break || true
|
||||
VERIFIED="$(curl -u jarvis:password -SsL https://gerrit.jarvis.local/a/changes/${COUNTER}/revisions/1/review/ | tail -1 | jq -r .labels.Verified.all[0].value)"
|
||||
if [ "$VERIFIED" == 1 ] ; then
|
||||
if [ "${jarvis_project}" == "mongodb" ] ; then
|
||||
echo "Merging mongodb patchset"
|
||||
ssh -p 29418 jarvis@gerrit.jarvis.local gerrit review "${COUNTER}",1 --label Workflow=1 --label Code-Review=2
|
||||
sleep 60
|
||||
#Setting a longer timeout if it is going through the Merge pipeline.
|
||||
timeout="720"
|
||||
end=$((end + timeout))
|
||||
while true; do
|
||||
MERGED="$(curl -u jarvis:password -SsL https://gerrit.jarvis.local/a/changes/${COUNTER}/revisions/1/review/ | tail -1 | jq -r .status)"
|
||||
kubectl get pods -n "jarvis-${COUNTER}-1"
|
||||
if [ "$MERGED" == "MERGED" ] ; then
|
||||
break
|
||||
else
|
||||
sleep 20
|
||||
true
|
||||
fi
|
||||
now=$(date +%s)
|
||||
if [ "$now" -gt "$end" ] ; then
|
||||
echo "Jarvis-System has not merged the change"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
break
|
||||
else
|
||||
break
|
||||
fi
|
||||
else
|
||||
true
|
||||
fi
|
||||
sleep 5
|
||||
now=$(date +%s)
|
||||
if [ "$now" -gt "$end" ] ; then
|
||||
@ -123,5 +148,5 @@ for jarvis_project in $(find ./tools/gate/jarvis/5G-SA-core -maxdepth 1 -mindept
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
CHANGE_ID_COUNTER=$((CHANGE_ID_COUNTER+1))
|
||||
COUNTER=$((COUNTER+1))
|
||||
done
|
||||
|
@ -14,12 +14,23 @@
|
||||
shell: "jq -c '.[] | {repo: (\"https://{{ chart_registry_url }}/\"+.project+\"-staging\"), secret: \"{{ harbor_secret_mounted_path }}\", name: (.project+\"-staging\")}' {{ loop_source }} | sort | uniq"
|
||||
register: internal_repos
|
||||
|
||||
- name: Get list of nonstaging internal repos
|
||||
when: (stage == 'deploy')
|
||||
shell: "jq -c '.[] | {repo: (\"https://{{ chart_registry_url }}/\"+.project), secret: \"{{ harbor_secret_mounted_path }}\", name: (.project)}' {{ loop_source }} | sort | uniq"
|
||||
register: internal_nonstaging_repos
|
||||
|
||||
- include_tasks: ./roles/charts/tasks/setup_helm_repo.yaml
|
||||
when: (stage == 'deploy')
|
||||
loop: "{{ internal_repos.stdout_lines }}"
|
||||
vars:
|
||||
repo: "{{ item }}"
|
||||
|
||||
- include_tasks: ./roles/charts/tasks/setup_helm_repo.yaml
|
||||
when: (stage == 'deploy')
|
||||
loop: "{{ internal_nonstaging_repos.stdout_lines }}"
|
||||
vars:
|
||||
repo: "{{ item }}"
|
||||
|
||||
- include_tasks: ./roles/functional/tasks/main.yaml
|
||||
when: data.stdout_lines |length > 0
|
||||
loop: "{{ data.stdout_lines | map('from_json') | batch(chart_async_batch_size) | list }}"
|
||||
|
@ -32,6 +32,7 @@
|
||||
--kubeconfig="{{ cluster_kubeconfig_path }}/kubeconfig" \
|
||||
"{{ chart.release_name }}" "{{ chart.project }}/{{ chart.chart_name }}" \
|
||||
--version="{{ chart.version }}" \
|
||||
--create-namespace \
|
||||
--values="{{ datapath }}/{{ chart.chart_name }}-overrides.json" \
|
||||
--namespace="{{ chart.remote_namespace }}"
|
||||
args:
|
||||
|
Loading…
x
Reference in New Issue
Block a user