Skip to content

Instantly share code, notes, and snippets.

@Mishco
Created March 8, 2023 20:16
Show Gist options
  • Save Mishco/e343a39c7409284d4b06bb8f42401917 to your computer and use it in GitHub Desktop.
Save Mishco/e343a39c7409284d4b06bb8f42401917 to your computer and use it in GitHub Desktop.
- task: Docker@2
displayName: 'Build an image'
inputs:
repository: 'sparktest'
command: 'build'
Dockerfile: '**/Dockerfile'
tags: 'latest'
- script: |
docker run -e PYTHONPATH=./src -v :/app --name sparktest sparktest
CONTAINER_ID=`docker ps -aqf "name=sparktest"`
docker cp $CONTAINER_ID:/app/coverage.xml test-coverage.xml
displayName: "Image unittest by Docker"
workingDirectory: ${{ parameters.appPath }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment