Skip to content

Commit

Permalink
[hotfix] Stabilize python tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rmetzger committed Feb 22, 2020
1 parent aa048ae commit 24c9f2b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
14 changes: 10 additions & 4 deletions tools/azure-pipelines/jobs-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,16 @@ jobs:
path: $(CACHE_FLINK_DIR)
artifact: FlinkCompileCacheDir-${{parameters.stage_name}}

# recreate "build-target" symlink for python tests
- script: |
ln -snf $(CACHE_FLINK_DIR)/flink-dist/target/flink-*-SNAPSHOT-bin/flink-*-SNAPSHOT $(CACHE_FLINK_DIR)/build-target
displayName: Recreate 'build-target' symlink
# only for the python stage (which runs a full mvn install), download the cache
- task: Cache@2
condition: eq(variables['module'], 'python')
inputs:
key: $(CACHE_KEY)
restoreKeys: $(CACHE_FALLBACK_KEY)
path: $(MAVEN_CACHE_FOLDER)
continueOnError: true # continue the build even if the cache fails.
displayName: Cache Maven local repo

# Test
- script: STAGE=test ${{parameters.environment}} ./tools/azure_controller.sh $(module)
displayName: Test - $(module)
Expand Down
8 changes: 8 additions & 0 deletions tools/azure_controller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,14 @@ elif [ $STAGE != "$STAGE_CLEANUP" ]; then
PY_MVN="${MVN// clean/}"
PY_MVN="$PY_MVN -Drat.skip=true"
${PY_MVN}

if [ $EXIT_CODE != 0 ]; then
echo "=============================================================================="
echo "Compile error for python stage preparation. Exit code: $EXIT_CODE. Failing build"
echo "=============================================================================="
exit $EXIT_CODE
fi

echo "Done compiling ... "
fi

Expand Down

0 comments on commit 24c9f2b

Please sign in to comment.