diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 28339bc7..3916b423 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -9,7 +9,7 @@ on: workflow_dispatch: jobs: - buildDataEngine: + buildandDeployDataEngine: runs-on: [ self-hosted ] defaults: @@ -21,16 +21,26 @@ jobs: - name: Build with Maven run: mvn clean compile assembly:single -Dmaven.skip.test=true + +# #Deployment will fail if there are deployments which did not come from this workflow +# - name: Check if existing deployments +# run: pkill -f 'java -jar target/defi-data-engine-0.0.1-jar-with-dependencies.jar' + + - name: Deploy data engine + run: RUNNER_TRACKING_ID="" && java -jar target/defi-data-engine-0.0.1-jar-with-dependencies.jar & - # buildRestAPI: - # runs-on: [ self-hosted ] - # defaults: - # run: - # working-directory: "DeFi-Data-Engine/Rest Application/" + buildRestAPI: + runs-on: [ self-hosted ] + defaults: + run: + working-directory: "DeFi-Data-Engine/Rest Application/" - # steps: - # - uses: actions/checkout@v3 + steps: + - uses: actions/checkout@v3 - # - name: Build with Maven - # run: mvn -B package --file pom.xml + - name: Build with Maven + run: mvn clean compile assembly:single -Dmaven.skip.test=true + + - name: Deploy rest application + run: RUNNER_TRACKING_ID="" && java -jar target/rest-connection-4.3.3-jar-with-dependencies.jar &