Skip to content

Commit

Permalink
Create gcp console service (#2433)
Browse files Browse the repository at this point in the history
  • Loading branch information
ptkach committed May 10, 2024
1 parent fd21fcd commit 3e77004
Show file tree
Hide file tree
Showing 13 changed files with 104 additions and 102 deletions.
7 changes: 2 additions & 5 deletions appengine_war.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@ war {

if (project.path == ":services:default") {
war {
from("${rootDir}/console-webapp/dist/console-webapp") {
include "**/*"
into("console")
}
from("${coreResourcesDir}/google/registry/ui") {
include "registrar_bin.js"
if (environment != "production") {
Expand Down Expand Up @@ -103,10 +99,11 @@ explodeWar.doLast {
file("${it.explodedAppDirectory}/WEB-INF/lib/tools.jar").setWritable(true)
}

appengineDeployAll.mustRunAfter ':console-webapp:deploy'
appengineDeployAll.finalizedBy ':deployCloudSchedulerAndQueue'
rootProject.deploy.dependsOn appengineDeployAll

rootProject.stage.dependsOn appengineStage
tasks['war'].dependsOn ':console-webapp:buildConsoleWebappProd'
tasks['war'].dependsOn ':core:compileProdJS'
tasks['war'].dependsOn ':core:processResources'
tasks['war'].dependsOn ':core:jar'
Expand Down
2 changes: 0 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -539,8 +539,6 @@ task coreDev {
dependsOn 'javadoc'
dependsOn 'checkDependenciesDotGradle'
dependsOn 'checkLicense'
// TODO: @ptkach reenable after console design merged
// dependsOn ':console-webapp:runConsoleWebappUnitTests'
dependsOn ':core:check'
dependsOn 'assemble'
}
Expand Down
3 changes: 3 additions & 0 deletions console-webapp/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,6 @@ testem.log
# System files
.DS_Store
Thumbs.db

# Build artifact
/staged/dist
12 changes: 9 additions & 3 deletions console-webapp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

def consoleDir = "${rootDir}/console-webapp"
def projectParam = "--project=${rootProject.gcpProject}"

clean {
delete "${consoleDir}/node_modules"
delete "${consoleDir}/dist"
delete "${consoleDir}/staged/dist"
}

task npmInstallDeps(type: Exec) {
Expand Down Expand Up @@ -62,8 +62,14 @@ task checkFormatting(type: Exec) {
args 'run', 'prettify:check'
}

tasks.runConsoleWebappUnitTests.dependsOn(tasks.npmInstallDeps)
task deploy(type: Exec) {
workingDir "${consoleDir}/staged"
executable 'gcloud'
args 'app', 'deploy', "${projectParam}", '--quiet'
}

tasks.buildConsoleWebappProd.dependsOn(tasks.npmInstallDeps)
tasks.applyFormatting.dependsOn(tasks.npmInstallDeps)
tasks.checkFormatting.dependsOn(tasks.npmInstallDeps)
tasks.build.dependsOn(tasks.checkFormatting)
tasks.deploy.dependsOn(tasks.buildConsoleWebappProd)

0 comments on commit 3e77004

Please sign in to comment.