@@ -6,7 +6,7 @@ includes:
66
77vars :
88 # Application configuration
9- APP_NAME : ' {{.REPLICATED_APP | default "wg-easy"}}'
9+ APP_SLUG : ' {{.REPLICATED_APP | default "wg-easy"}}'
1010
1111 # Cluster configuration
1212 CLUSTER_NAME : ' {{.CLUSTER_NAME | default "test-cluster"}}'
@@ -126,6 +126,7 @@ tasks:
126126 dependencies-update :
127127 desc : Update Helm dependencies for all charts
128128 silent : false
129+ run : once
129130 cmds :
130131 - echo "Updating Helm dependencies for all charts..."
131132 - |
@@ -276,20 +277,24 @@ tasks:
276277 done
277278
278279 - echo "Release files prepared in ./release/ directory"
280+ deps :
281+ - dependencies-update
279282
280283 release-create :
281284 desc : Create and promote a release using the Replicated CLI
282285 silent : false
283286 vars :
284287 CHANNEL : ' {{.CHANNEL | default "Unstable"}}'
285288 RELEASE_NOTES : ' {{.RELEASE_NOTES | default "Release created via task release-create"}}'
289+ requires :
290+ vars : [APP_SLUG, VERSION]
286291 cmds :
287- - echo "Creating and promoting release for $APP_NAME to channel $ CHANNEL..."
292+ - echo "Creating and promoting release for {{.APP_SLUG}} to channel {{. CHANNEL}} ..."
288293 - |
289294 # Create and promote the release in one step
290295 echo "Creating release from files in ./release directory..."
291- replicated release create --app $APP_NAME --yaml-dir ./release --release-notes "$ RELEASE_NOTES" --promote $ CHANNEL --version $ VERSION
292- echo "Release version $ VERSION created and promoted to channel $ CHANNEL"
296+ replicated release create --app {{.APP_SLUG}} --yaml-dir ./release --release-notes "{{. RELEASE_NOTES}} " --promote {{. CHANNEL}} --version {{. VERSION}}
297+ echo "Release version {{. VERSION}} created and promoted to channel {{. CHANNEL}} "
293298 deps :
294299 - release-prepare
295300
@@ -338,12 +343,12 @@ tasks:
338343 status :
339344 - |
340345 # Check if the application tarball has already been downloaded and extracted
341- gcloud compute ssh {{.VM_NAME}} --project={{.GCP_PROJECT}} --zone={{.GCP_ZONE}} --command="test -d ./{{.APP_NAME }}" &>/dev/null
346+ gcloud compute ssh {{.VM_NAME}} --project={{.GCP_PROJECT}} --zone={{.GCP_ZONE}} --command="test -d ./{{.APP_SLUG }}" &>/dev/null
342347 cmds :
343348 - task : utils:gcp-operations
344349 vars :
345350 OPERATION : " setup-embedded"
346- APP_NAME : ' {{.APP_NAME }}'
351+ APP_SLUG : ' {{.APP_SLUG }}'
347352 CHANNEL : ' {{.CHANNEL}}'
348353 AUTH_TOKEN : ' {{.AUTH_TOKEN}}'
349354 GCP_PROJECT : ' {{.GCP_PROJECT}}'
0 commit comments