Sage-Bionetworks / sage-monorepo

Where OpenChallenges, Schematic, and other Sage open source apps are built
https://sage-bionetworks.github.io/sage-monorepo/
Apache License 2.0
21 stars 12 forks source link

[Story] Try removing `@nxrocks/nx-spring-boot` #2584

Closed tschaffter closed 3 months ago

tschaffter commented 3 months ago

What product(s) is this story for?

OpenChallenges

As a user, I want

No response

Description

I have trouble upgrading @nxrocks/nx-spring-boot, which is a requirement if we want to use the latest version of Nx. See #2583 for additional info on the issue encountered.

I gave a quick try to running directly gradlew commands instead of using the wrapper provided by @nxrocks/nx-spring-boot and all the tasks seem to work fine.

The goal of this ticket is to replace @nxrocks/nx-spring-boot tasks by nx:run-commands tasks that run gradlew.

Acceptance criteria

No response

Tasks

No response

Anything else?

No response

Have you linked this story to a GitHub Project?

tschaffter commented 3 months ago

Update build

Replace:

    "build": {
      "executor": "@nxrocks/nx-spring-boot:build",
      "options": {
        "root": "apps/openchallenges/api-gateway"
      },
      "outputs": ["{projectRoot}"],
      "dependsOn": ["^install"]
    },

by:

    "build": {
      "executor": "nx:run-commands",
      "outputs": ["{projectRoot}/build"],
      "options": {
        "command": "./gradlew build",
        "cwd": "{projectRoot}"
      },
      "dependsOn": ["^install"]
    },
tschaffter commented 3 months ago

Update test

Replace:

    "test": {
      "executor": "@nxrocks/nx-spring-boot:test",
      "options": {
        "root": "apps/openchallenges/api-gateway"
      }
    },

by

    "test": {
      "executor": "nx:run-commands",
      "outputs": ["{projectRoot}/build"],
      "options": {
        "command": "./gradlew test",
        "cwd": "{projectRoot}"
      },
     "dependsOn": ["^install"]
    },
tschaffter commented 3 months ago

There is an issue with openchallenges-edam-etl:

$ docker logs -f openchallenges-edam-etl
/docker-entrypoint.sh: line 6: exec: gosu: not found