UNCLASSIFIED - NO CUI

Skip to content
Snippets Groups Projects
Commit 8bb1fd75 authored by joshwolf's avatar joshwolf
Browse files

Merge branch '79-pipelines-call-package-tests' into 'master'

Resolve "BigBang Pipelines should call Package tests"

Summary

Adding script in tests/scripts to search for "enabled: true" packages in tests/ci/k3d/values.yaml, and iterate through chart/values.yaml to pull in the repo to run cypress testing in each package's "tests" folder.

Script runs as part of "clean install" and "upgrade" pipeline stages.

Artifacts for clean install are saved only on success (because of previous setup with images.txt only on success) but upgrade artifacts are configured to save cypress testing output always.

Closes #79

See merge request platform-one/big-bang/bigbang!323
parents 46037e10 04ce52bf
No related branches found
No related tags found
1 merge request!323Resolve "BigBang Pipelines should call Package tests"
Pipeline #198870 failed
......@@ -118,7 +118,9 @@ clean install:
artifacts:
paths:
- images.txt
expire_in: 7 days
- "cypress-tests/*/tests/cypress/screenshots"
- "cypress-tests/*/tests/cypress/videos"
expire_in: 7 days
upgrade:
stage: smoke tests
......@@ -146,6 +148,12 @@ upgrade:
- git checkout ${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}
- *deploy_bigbang
- *test_bigbang
artifacts:
paths:
- "cypress-tests/*/tests/cypress/screenshots"
- "cypress-tests/*/tests/cypress/videos"
expire_in: 7 days
when: always
#-----------------------------------------------------------------------------------------------------------------------
......
......@@ -217,7 +217,7 @@ monitoring:
git:
repo: https://repo1.dso.mil/platform-one/big-bang/apps/core/monitoring.git
path: "./chart"
tag: "11.0.0-bb.13"
tag: "11.0.0-bb.15"
sso:
# -- Toggle SSO for monitoring components on and off
......@@ -276,7 +276,7 @@ addons:
git:
repo: https://repo1.dso.mil/platform-one/big-bang/apps/core/argocd.git
path: "./chart"
tag: "2.14.7-bb.0"
tag: "2.14.7-bb.1"
sso:
# -- Toggle SSO for ArgoCD on and off
enabled: false
......
#!/usr/bin/env bash
# exit on error
set -e
mkdir -p cypress-tests/
#Cloning core
yq e '. | keys | .[] | ... comments=""' "tests/ci/k3d/values.yaml" | while IFS= read -r package; do
if [[ "$(yq e ".${package}.enabled" "tests/ci/k3d/values.yaml")" == "true" ]]; then
#Checking for branch not tag
if [ "$(yq e ".${package}.git.tag" "chart/values.yaml")" != null ]; then
echo "Cloning ${package} into cypress-tests"
git -C cypress-tests/ clone -b $(yq e ".${package}.git.tag" "chart/values.yaml") $(yq e ".${package}.git.repo" "chart/values.yaml")
else
echo "Cloning ${package} into cypress-tests"
git -C cypress-tests/ clone -b $(yq e ".${package}.git.branch" "chart/values.yaml") $(yq e ".${package}.git.repo" "chart/values.yaml")
fi
fi
done
#Cloning addons
yq e '.addons | keys | .[] | ... comments=""' "tests/ci/k3d/values.yaml" | while IFS= read -r package; do
if [ "$(yq e ".addons.${package}.enabled" "tests/ci/k3d/values.yaml")" == "true" ]; then
#Checking for branch not tag
if [ "$(yq e ".addons.${package}.git.tag" "chart/values.yaml")" != null ]; then
echo "Cloning ${package} into cypress-tests"
git -C cypress-tests/ clone -b $(yq e ".addons.${package}.git.tag" "chart/values.yaml") $(yq e ".addons.${package}.git.repo" "chart/values.yaml")
else
echo "Cloning ${package} into cypress-tests"
git -C cypress-tests/ clone -b $(yq e ".addons.${package}.git.branch" "chart/values.yaml") $(yq e ".addons.${package}.git.repo" "chart/values.yaml")
fi
fi
done
#Running Cypress tests
for dir in cypress-tests/*/
do
if [ -f "${dir}tests/cypress.json" ]; then
echo "Running cypress tests in ${dir}"
cypress run --project "${dir}"tests
fi
done
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment