Skip to content

Commit 485e62e

Browse files
committed
updated the stages and flow
1 parent 14248d2 commit 485e62e

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

.gitlab-ci.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ stages:
66
- validate
77
- install
88
- preview
9-
- deploy
9+
- dev
1010

1111
cache:
1212
paths:
@@ -75,6 +75,8 @@ install:
7575
only:
7676
- branches
7777
when: always
78+
dependencies:
79+
- validate
7880

7981
preview:
8082
stage: preview
@@ -88,12 +90,13 @@ preview:
8890
- install
8991
only:
9092
- branches
91-
when: manual
93+
# Changed from 'manual' to 'on_success' to run automatically
94+
when: on_success
9295
needs:
9396
- install
9497

9598
deploy-to-dev:
96-
stage: deploy
99+
stage: dev
97100
script:
98101
- echo "Running Pulumi up"
99102
- pulumi stack select dev || pulumi stack init dev
@@ -102,14 +105,18 @@ deploy-to-dev:
102105
- main
103106
when: manual
104107
needs:
105-
- install
108+
- preview # Changed from install to preview to maintain proper flow
106109

107-
deployment-dev:
108-
stage: deploy
110+
destroy-dev:
111+
stage: dev
109112
script:
110113
- echo "Running Pulumi destroy for dev"
111114
- pulumi stack select dev || pulumi stack init dev
112115
- pulumi destroy --yes --non-interactive --color always
113116
only:
114117
- main
115-
when: manual
118+
when: manual
119+
dependencies:
120+
- deploy-to-dev
121+
needs:
122+
- deploy-to-dev

0 commit comments

Comments
 (0)