Skip to content

Commit d44a327

Browse files
author
Oleg Sucharevich
committed
fix agent test yaml
1 parent 70510f3 commit d44a327

File tree

1 file changed

+21
-10
lines changed

1 file changed

+21
-10
lines changed

.codefresh/test-agent.yaml

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,48 +4,59 @@ stages:
44
- Test
55
- Notification
66

7+
mode: parallel
8+
79
steps:
810

911
create_namespace:
10-
stage: Notification
12+
stage: Test
1113
title: 'Create namespace in Kuberentes'
1214
image: codefresh/kube-helm
1315
commands:
14-
- kubectl config set-context $KUEB_CONTEXT
16+
- kubectl config set-context $KUBE_CONTEXT
1517
- kubectl create namespace $KUBE_NAMESPACE
1618

1719
install_agent:
18-
stage: Notification
20+
stage: Test
1921
title: 'Install agent'
2022
image: codefresh/cli
2123
commands:
2224
# Install agent, runtime and attach it
23-
- codefresh install agent --name $AGENT_NAME --kube-namespace $KUBE_NAMESPACE --install-runtime --kube-context-name $KUEB_CONTEXT --kube-config-path $KUBECONFIG
25+
- codefresh install agent --name $AGENT_NAME --kube-namespace $KUBE_NAMESPACE --install-runtime --kube-context-name $KUBE_CONTEXT --kube-config-path $KUBECONFIG
2426
- codefresh run $TEST_PIPELINE_ID
27+
when:
28+
steps:
29+
- name: create_namespace
30+
on:
31+
- success
2532

2633
uninstall_agent:
27-
stage: Notification
34+
stage: Test
2835
title: 'Uninstall agent'
2936
image: codefresh/cli
3037
commands:
3138
# Uninstall agent, runtime
3239
- codefresh uninstall agent --name $AGENT_NAME --kube-namespace $KUBE_NAMESPACE
33-
- codefresh uninstall runtime --runtime-name $KUEB_CONTEXT/$KUBE_NAMESPACE --kube-namespace $KUBE_NAMESPACE --kube-context-name $KUEB_CONTEXT --kube-config-path $KUBECONFIG
34-
- echo "removed"
40+
- codefresh uninstall runtime --runtime-name $KUBE_CONTEXT/$KUBE_NAMESPACE --kube-namespace $KUBE_NAMESPACE --kube-context-name $KUBE_CONTEXT --kube-config-path $KUBECONFIG
41+
when:
42+
steps:
43+
- name: install_agent
44+
on:
45+
- success
3546

3647
delete_namespace:
37-
stage: Notification
48+
stage: Test
3849
title: 'Create namespace in Kuberentes'
3950
image: codefresh/kube-helm
4051
commands:
4152
- kubectl delete namespace $KUBE_NAMESPACE
42-
4353
when:
4454
steps:
45-
- name: create_namespace
55+
- name: uninstall_agent
4656
on:
4757
- success
4858

59+
4960
reported_failure:
5061
stage: Notification
5162
title: Report failure to Slack

0 commit comments

Comments
 (0)