forked from FoundatioFx/Foundatio.Parsers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
25 lines (23 loc) · 1.03 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
pool:
vmImage: 'ubuntu-16.04'
steps:
- script: |
VERSION_PREFIX=$(sed -n 's/.*<VersionPrefix>\([^<]*\)<\/VersionPrefix>.*/\1/p' <<< cat ./build/common.props)
if [ $APPVEYOR_REPO_TAG != "true" ]; then
VERSION_SUFFIX="$BUILD_BUILDID-pre"
VERSION="$VERSION_PREFIX.$VERSION_SUFFIX"
echo "Version: $VERSION"
else
VERSION_SUFFIX=$BUILD_BUILDID
VERSION="$VERSION_PREFIX.$VERSION_SUFFIX"
echo "Version: $VERSION Tag: $BUILD_SOURCEBRANCEHNAME"
fi
docker run -d -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:6.5.1
docker build --target testrunner -t foundatio:test --build-arg VERSION_SUFFIX=${VERSION_SUFFIX} .
docker run --net=host -v $(pwd)/artifacts:/app/artifacts foundatio:test
docker build --target pack -t foundatio:pack --build-arg VERSION_SUFFIX=${VERSION_SUFFIX} .
docker run -v $(pwd)/artifacts:/app/artifacts foundatio:pack
- task: PublishTestResults@2
inputs:
testRunner: VSTest
testResultsFiles: '**/*.trx'