parent
0b977c975e
commit
df3f7da567
22
.github/workflows/server-build.yml
vendored
22
.github/workflows/server-build.yml
vendored
|
|
@ -87,7 +87,7 @@ jobs:
|
||||||
|
|
||||||
# In case this is second attempt try restoring status of the prior attempt from cache
|
# In case this is second attempt try restoring status of the prior attempt from cache
|
||||||
- name: Restore the previous run result
|
- name: Restore the previous run result
|
||||||
if: inputs.skip-tests != 'true' && steps.changed-files-specific.outputs.any_changed == 'true'
|
if: inputs.skip-tests != 'true' && (steps.changed-files-specific.outputs.any_changed == 'true' || github.event_name == 'push' || github.event_name == 'workflow_dispatch')
|
||||||
id: cache-appsmith
|
id: cache-appsmith
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
|
|
@ -97,7 +97,7 @@ jobs:
|
||||||
|
|
||||||
# Fetch prior run result
|
# Fetch prior run result
|
||||||
- name: Get the previous run result
|
- name: Get the previous run result
|
||||||
if: inputs.skip-tests != 'true' && steps.changed-files-specific.outputs.any_changed == 'true'
|
if: inputs.skip-tests != 'true' && (steps.changed-files-specific.outputs.any_changed == 'true' || github.event_name == 'push' || github.event_name == 'workflow_dispatch')
|
||||||
id: run_result
|
id: run_result
|
||||||
run: |
|
run: |
|
||||||
if [ -f ~/run_result ]; then
|
if [ -f ~/run_result ]; then
|
||||||
|
|
@ -107,7 +107,7 @@ jobs:
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Download the failed test artifact in case of rerun
|
- name: Download the failed test artifact in case of rerun
|
||||||
if: steps.run_result.outputs.run_result == 'failedtest' && steps.changed-files-specific.outputs.any_changed == 'true'
|
if: steps.run_result.outputs.run_result == 'failedtest' && (steps.changed-files-specific.outputs.any_changed == 'true' || github.event_name == 'push' || github.event_name == 'workflow_dispatch')
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: failed-server-tests
|
name: failed-server-tests
|
||||||
|
|
@ -122,12 +122,12 @@ jobs:
|
||||||
echo "tests=$failed_tests" >> $GITHUB_OUTPUT
|
echo "tests=$failed_tests" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
# In case of prior failure run the job
|
# In case of prior failure run the job
|
||||||
- if: steps.run_result.outputs.run_result != 'success' && steps.changed-files-specific.outputs.any_changed == 'true'
|
- if: steps.run_result.outputs.run_result != 'success' && (steps.changed-files-specific.outputs.any_changed == 'true' || github.event_name == 'push' || github.event_name == 'workflow_dispatch')
|
||||||
run: echo "I'm alive!" && exit 0
|
run: echo "I'm alive!" && exit 0
|
||||||
|
|
||||||
# Setup Java
|
# Setup Java
|
||||||
- name: Set up JDK 17
|
- name: Set up JDK 17
|
||||||
if: steps.run_result.outputs.run_result != 'success' && steps.changed-files-specific.outputs.any_changed == 'true'
|
if: steps.run_result.outputs.run_result != 'success' && (steps.changed-files-specific.outputs.any_changed == 'true' || github.event_name == 'push' || github.event_name == 'workflow_dispatch')
|
||||||
uses: actions/setup-java@v3
|
uses: actions/setup-java@v3
|
||||||
with:
|
with:
|
||||||
distribution: "temurin"
|
distribution: "temurin"
|
||||||
|
|
@ -135,7 +135,7 @@ jobs:
|
||||||
|
|
||||||
# Retrieve maven dependencies from cache. After a successful run, these dependencies are cached again
|
# Retrieve maven dependencies from cache. After a successful run, these dependencies are cached again
|
||||||
- name: Cache maven dependencies
|
- name: Cache maven dependencies
|
||||||
if: steps.run_result.outputs.run_result != 'success' && steps.changed-files-specific.outputs.any_changed == 'true'
|
if: steps.run_result.outputs.run_result != 'success' && (steps.changed-files-specific.outputs.any_changed == 'true' || github.event_name == 'push' || github.event_name == 'workflow_dispatch')
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
env:
|
env:
|
||||||
cache-name: cache-maven-dependencies
|
cache-name: cache-maven-dependencies
|
||||||
|
|
@ -150,7 +150,7 @@ jobs:
|
||||||
# Since this is an unreleased build, we get the latest released version number, increment the minor number in it,
|
# Since this is an unreleased build, we get the latest released version number, increment the minor number in it,
|
||||||
# append a `-SNAPSHOT` at it's end to prepare the snapshot version number. This is used as the project's version.
|
# append a `-SNAPSHOT` at it's end to prepare the snapshot version number. This is used as the project's version.
|
||||||
- name: Get the version to tag the Docker image
|
- name: Get the version to tag the Docker image
|
||||||
if: steps.run_result.outputs.run_result != 'success' && steps.changed-files-specific.outputs.any_changed == 'true'
|
if: steps.run_result.outputs.run_result != 'success' && (steps.changed-files-specific.outputs.any_changed == 'true' || github.event_name == 'push' || github.event_name == 'workflow_dispatch')
|
||||||
id: vars
|
id: vars
|
||||||
run: |
|
run: |
|
||||||
# Since this is an unreleased build, we set the version to incremented version number with a
|
# Since this is an unreleased build, we set the version to incremented version number with a
|
||||||
|
|
@ -164,7 +164,7 @@ jobs:
|
||||||
|
|
||||||
# Build the code
|
# Build the code
|
||||||
- name: Build
|
- name: Build
|
||||||
if: steps.run_result.outputs.run_result != 'success' && steps.changed-files-specific.outputs.any_changed == 'true'
|
if: steps.run_result.outputs.run_result != 'success' && (steps.changed-files-specific.outputs.any_changed == 'true' || github.event_name == 'push' || github.event_name == 'workflow_dispatch')
|
||||||
env:
|
env:
|
||||||
ACTIVE_PROFILE: test
|
ACTIVE_PROFILE: test
|
||||||
APPSMITH_MONGODB_URI: "mongodb://localhost:27017/mobtools"
|
APPSMITH_MONGODB_URI: "mongodb://localhost:27017/mobtools"
|
||||||
|
|
@ -184,7 +184,7 @@ jobs:
|
||||||
|
|
||||||
# Test the code
|
# Test the code
|
||||||
- name: Run only tests
|
- name: Run only tests
|
||||||
if: (inputs.skip-tests != 'true' || steps.run_result.outputs.run_result == 'failedtest') && steps.changed-files-specific.outputs.any_changed == 'true'
|
if: (inputs.skip-tests != 'true' || steps.run_result.outputs.run_result == 'failedtest') && (steps.changed-files-specific.outputs.any_changed == 'true' || github.event_name == 'push' || github.event_name == 'workflow_dispatch')
|
||||||
env:
|
env:
|
||||||
ACTIVE_PROFILE: test
|
ACTIVE_PROFILE: test
|
||||||
APPSMITH_MONGODB_URI: "mongodb://localhost:27017/mobtools"
|
APPSMITH_MONGODB_URI: "mongodb://localhost:27017/mobtools"
|
||||||
|
|
@ -229,7 +229,7 @@ jobs:
|
||||||
if-no-files-found: ignore
|
if-no-files-found: ignore
|
||||||
|
|
||||||
- name: Fetch server build from cache
|
- name: Fetch server build from cache
|
||||||
if: steps.changed-files-specific.outputs.any_changed == 'false' && success()
|
if: steps.changed-files-specific.outputs.any_changed == 'false' && success() && github.event_name != 'push' && github.event_name != 'workflow_dispatch'
|
||||||
env:
|
env:
|
||||||
cachetoken: ${{ secrets.CACHETOKEN }}
|
cachetoken: ${{ secrets.CACHETOKEN }}
|
||||||
reponame: ${{ github.event.repository.name }}
|
reponame: ${{ github.event.repository.name }}
|
||||||
|
|
@ -253,7 +253,7 @@ jobs:
|
||||||
|
|
||||||
# Restore the previous built bundle if present. If not push the newly built into the cache
|
# Restore the previous built bundle if present. If not push the newly built into the cache
|
||||||
- name: Restore the previous bundle
|
- name: Restore the previous bundle
|
||||||
if: steps.changed-files-specific.outputs.any_changed == 'true'
|
if: steps.changed-files-specific.outputs.any_changed == 'true' || github.event_name == 'push' || github.event_name == 'workflow_dispatch'
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user