-
Notifications
You must be signed in to change notification settings - Fork 2
/
bitbucket-pipelines.yml
42 lines (41 loc) · 1.78 KB
/
bitbucket-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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
image: mcr.microsoft.com/dotnet/sdk:5.0
pipelines:
default:
- parallel:
- step:
name: Build and Test
caches:
- dotnetcore
script:
- export SOLUTION_NAME=ErgCompetePM
- REPORTS_PATH=./test-reports/build_${BITBUCKET_BUILD_NUMBER}
- dotnet restore
- dotnet build --no-restore --configuration Release
- dotnet test --no-build --configuration Release --test-adapter-path:. --logger:"junit;LogFilePath=$REPORTS_PATH/junit.xml"
- dotnet publish $SOLUTION_NAME --runtime linux-arm --output ./publish
- cp Erg.service publish/Erg.service
- cp PostDeploy.sh publish/PostDeploy.sh
artifacts:
- publish/**
- step:
name: Lint the code
image: mcr.microsoft.com/dotnet/core/sdk:3.1
caches:
- dotnetcore
script:
- export SOLUTION_NAME=ErgCompetePM
- export REPORTS_PATH=linter-reports
#- dotnet new tool-manifest
#- dotnet tool install JetBrains.ReSharper.GlobalTools
#- dotnet tool restore
#- dotnet jb inspectcode ${SOLUTION_NAME}.sln --output="${REPORTS_PATH}/jb-${BITBUCKET_BUILD_NUMBER}.xml"
#artifacts:
#- linter-reports/**
- step:
name: Pack and Push to Octopus
image: octopusdeploy/octo:6.17.3-alpine
script:
- export VERSION=1.0.$BITBUCKET_BUILD_NUMBER
- cd publish
- octo pack --id $BITBUCKET_REPO_SLUG --version $VERSION --outFolder ./out --format zip
- octo push --package ./out/$BITBUCKET_REPO_SLUG.$VERSION.zip --server https://adamdixon.octopus.app --apiKey $Octopus_ApiKey