Skip to content

Commit

Permalink
Explicity specify deployment order for queues and scheduler tasks (#2631
Browse files Browse the repository at this point in the history
)

If we deploy Nomulus, we should do that before queues and the scheduler
tasks are updated.
  • Loading branch information
jianglai authored Jan 8, 2025
1 parent e0bbff8 commit 1cbbc66
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions jetty/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ tasks.register('buildDeployer', Exec) {
commandLine 'go', 'build', '-o', "${buildDir}/deployer", 'deployCloudSchedulerAndQueue.go'
}

// Once GKE is the only option, we can use the same task in the root project instaead.
// Once GKE is the only option, we can use the same task in the root project instead.
tasks.register('deployCloudSchedulerAndQueue') {
dependsOn(tasks.named('deployCloudScheduler'), tasks.named('deployQueue'))
}
Expand All @@ -99,6 +99,8 @@ tasks.register('deployCloudScheduler', Exec) {
"${rootDir}/core/src/main/java/google/registry/config/files/nomulus-config-${rootProject.environment}.yaml",
"${rootDir}/core/src/main/java/google/registry/env/${rootProject.environment}/default/WEB-INF/cloud-scheduler-tasks.xml",
rootProject.gcpProject, '--gke'
// Only deploy the tasks after Nomulus itself is deployed.
mustRunAfter(tasks.named('deployToGke'))
}

tasks.register('deployQueue', Exec) {
Expand All @@ -108,14 +110,20 @@ tasks.register('deployQueue', Exec) {
"${rootDir}/core/src/main/java/google/registry/config/files/nomulus-config-${rootProject.environment}.yaml",
"${rootDir}/core/src/main/java/google/registry/env/common/default/WEB-INF/cloud-tasks-queue.xml",
rootProject.gcpProject, '--gke'
// Only deploy the queues after Nomulus itself is deployed.
mustRunAfter(tasks.named('deployToGke'))
}

tasks.register('deployNomulus', Exec) {
dependsOn('pushNomulusImage', ':proxy:pushProxyImage', 'deployCloudSchedulerAndQueue')
tasks.register('deployToGke', Exec) {
dependsOn('pushNomulusImage', ':proxy:pushProxyImage')
configure verifyDeploymentConfig
commandLine './deploy-nomulus-for-env.sh', "${rootProject.environment}", "${rootProject.baseDomain}"
}

tasks.register('deployNomulus') {
dependsOn('deployToGke', 'deployCloudSchedulerAndQueue')
}

tasks.register('getEndpoints', Exec) {
configure verifyDeploymentConfig
commandLine './get-endpoints.py', "${rootProject.gcpProject}"
Expand Down

0 comments on commit 1cbbc66

Please sign in to comment.