@@ -87,7 +87,7 @@ tasks.register('buildDeployer', Exec) {
8787 commandLine ' go' , ' build' , ' -o' , " ${ buildDir} /deployer" , ' deployCloudSchedulerAndQueue.go'
8888}
8989
90- // Once GKE is the only option, we can use the same task in the root project instaead .
90+ // Once GKE is the only option, we can use the same task in the root project instead .
9191tasks. register(' deployCloudSchedulerAndQueue' ) {
9292 dependsOn(tasks. named(' deployCloudScheduler' ), tasks. named(' deployQueue' ))
9393}
@@ -99,6 +99,8 @@ tasks.register('deployCloudScheduler', Exec) {
9999 " ${ rootDir} /core/src/main/java/google/registry/config/files/nomulus-config-${ rootProject.environment} .yaml" ,
100100 " ${ rootDir} /core/src/main/java/google/registry/env/${ rootProject.environment} /default/WEB-INF/cloud-scheduler-tasks.xml" ,
101101 rootProject. gcpProject, ' --gke'
102+ // Only deploy the tasks after Nomulus itself is deployed.
103+ mustRunAfter(tasks. named(' deployToGke' ))
102104}
103105
104106tasks. register(' deployQueue' , Exec ) {
@@ -108,14 +110,20 @@ tasks.register('deployQueue', Exec) {
108110 " ${ rootDir} /core/src/main/java/google/registry/config/files/nomulus-config-${ rootProject.environment} .yaml" ,
109111 " ${ rootDir} /core/src/main/java/google/registry/env/common/default/WEB-INF/cloud-tasks-queue.xml" ,
110112 rootProject. gcpProject, ' --gke'
113+ // Only deploy the queues after Nomulus itself is deployed.
114+ mustRunAfter(tasks. named(' deployToGke' ))
111115}
112116
113- tasks. register(' deployNomulus ' , Exec ) {
114- dependsOn(' pushNomulusImage' , ' :proxy:pushProxyImage' , ' deployCloudSchedulerAndQueue ' )
117+ tasks. register(' deployToGke ' , Exec ) {
118+ dependsOn(' pushNomulusImage' , ' :proxy:pushProxyImage' )
115119 configure verifyDeploymentConfig
116120 commandLine ' ./deploy-nomulus-for-env.sh' , " ${ rootProject.environment} " , " ${ rootProject.baseDomain} "
117121}
118122
123+ tasks. register(' deployNomulus' ) {
124+ dependsOn(' deployToGke' , ' deployCloudSchedulerAndQueue' )
125+ }
126+
119127tasks. register(' getEndpoints' , Exec ) {
120128 configure verifyDeploymentConfig
121129 commandLine ' ./get-endpoints.py' , " ${ rootProject.gcpProject} "
0 commit comments