Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CH-122 fix stage template #733

Merged
merged 2 commits into from
Mar 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 25 additions & 4 deletions deployment-configuration/codefresh-template-stage.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
version: '1.0'
stages:
- prepare
- build
- deploy
- qa
- publish
steps:
main_clone:
Expand Down Expand Up @@ -30,7 +32,7 @@ steps:
working_directory: .
commands:
- bash cloud-harness/install.sh
- harness-deployment . cloud-harness -t $INCLUDE -n ${{NAMESPACE}} -t ${{DEPLOYMENT_TAG}} -d ${{DOMAIN}} -r ${{REGISTRY}} -rs ${{REGISTRY_SECRET}} -e $ENV -N
- harness-deployment $PATHS -t ${{DEPLOYMENT_TAG}} -d ${{DOMAIN}} -r ${{REGISTRY}} -rs ${{REGISTRY_SECRET}} -n ${{NAMESPACE}} -e $ENV $PARAMS
prepare_deployment_view:
commands:
- 'helm template ./deployment/helm --debug -n ${{NAMESPACE}}'
Expand All @@ -55,29 +57,48 @@ steps:
cmd_ps: --wait --timeout 600s --create-namespace
custom_value_files:
- ./deployment/helm/values.yaml
build_test_images:
title: Build test images
type: parallel
stage: qa
steps: []
when:
condition:
all:
whenVarExists: 'includes("${{SKIP_TESTS}}", "{{SKIP_TESTS}}") == true'
wait_deployment:
stage: qa
title: Wait deployment to be ready
image: codefresh/kubectl
commands:
- kubectl config use-context ${{CLUSTER_NAME}}
- kubectl config set-context --current --namespace=test-${{CF_REPO_NAME}}-${{CF_SHORT_REVISION}}
- kubectl config set-context --current --namespace=${{NAMESPACE}}
tests_api:
stage: qa
title: Api tests
working_directory: /home/test
image: "${{api-jest}}"
image: "${{test-api}}"
fail_fast: false
commands:
- echo $APP_NAME
scale: {}
when:
condition:
all:
whenVarExists: 'includes("${{SKIP_TESTS}}", "{{SKIP_TESTS}}") == true'
tests_e2e:
stage: qa
title: End to end tests
working_directory: /home/test
image: "${{jest-puppeteer}}"
image: "${{test-e2e}}"
fail_fast: false
commands:
- yarn test
scale: {}
when:
condition:
all:
whenVarExists: 'includes("${{SKIP_TESTS}}", "{{SKIP_TESTS}}") == true'
manual_tests:
type: pending-approval
stage: publish
Expand Down
Loading