Skip to content

Commit fa18671

Browse files
authored
Merge pull request #45 from y-first/add-only-tests-param-to-script
Adds tests-only flag to deploy-test-ros wrapper script
2 parents 82ab131 + 4ddad49 commit fa18671

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

scripts/ocp/deploy-test-ros.sh

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ set -euo pipefail
2525
# --use-local-chart Use local Helm chart instead of GitHub release
2626
# --verbose Enable verbose output
2727
# --dry-run Show what would be executed without running
28+
# --tests-only Run only JWT authentication tests (skip all deployments)
2829
# --help Display this help message
2930
#
3031
# Environment Variables:
@@ -75,6 +76,7 @@ IMAGE_TAG="${IMAGE_TAG:-latest}"
7576
USE_LOCAL_CHART="${USE_LOCAL_CHART:-false}"
7677
VERBOSE="${VERBOSE:-false}"
7778
DRY_RUN="${DRY_RUN:-false}"
79+
TESTS_ONLY="${TESTS_ONLY:-false}"
7880

7981
# OpenShift authentication
8082
KUBECONFIG="${KUBECONFIG:-${HOME}/.kube/config}"
@@ -666,6 +668,10 @@ main() {
666668
DRY_RUN=true
667669
shift
668670
;;
671+
--tests-only)
672+
TESTS_ONLY=true
673+
shift
674+
;;
669675
--help|-h)
670676
show_help
671677
;;
@@ -677,6 +683,16 @@ main() {
677683
esac
678684
done
679685

686+
# In tests-only mode, skip all deployment steps and run tests
687+
if [[ "${TESTS_ONLY}" == "true" ]]; then
688+
SKIP_RHBK=true
689+
SKIP_STRIMZI=true
690+
SKIP_HELM=true
691+
SKIP_TLS=true
692+
SKIP_IMAGE_OVERRIDE=true
693+
SKIP_TEST=false
694+
fi
695+
680696
# Show deployment summary
681697
print_summary
682698

@@ -688,7 +704,9 @@ main() {
688704
# Execute deployment steps
689705
check_prerequisites
690706
check_oc_connection
691-
create_namespace
707+
if [[ "${TESTS_ONLY}" != "true" ]]; then
708+
create_namespace
709+
fi
692710

693711
deploy_rhbk
694712
deploy_strimzi
@@ -709,5 +727,4 @@ main() {
709727
}
710728

711729
# Run main function
712-
main "$@"
713-
730+
main "$@"

0 commit comments

Comments
 (0)