Skip to content

Commit 0ab293b

Browse files
committed
FE-1409: Adds slack notification for release pipeline (#174)
1 parent dcb498e commit 0ab293b

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

concourse/pipeline.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
---
2+
resource_types:
3+
- name: slack-notification
4+
type: docker-image
5+
source:
6+
repository: cfcommunity/slack-notification-resource
7+
28
resources:
9+
- name: notify
10+
type: slack-notification
11+
source:
12+
url: ((slack-webhook))
13+
314
- name: fauna-csharp-repository
415
type: git
516
icon: github
@@ -37,6 +48,10 @@ jobs:
3748
file: fauna-csharp-repository/concourse/tasks/publish.yml
3849
params:
3950
NUGET_API_KEY: ((nuget_api_key))
51+
on_success:
52+
put: notify
53+
params:
54+
text_file: slack-message/publish
4055

4156
- task: publish-docs
4257
file: fauna-csharp-repository/concourse/tasks/publish-docs.yml

concourse/scripts/publish.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,14 @@ set -eou
44

55
cd ./fauna-csharp-repository
66

7+
apk add xmlstarlet
8+
PACKAGE_VERSION=$(xml sel -t -v "/Project/PropertyGroup/Version" ./FaunaDB.Client/FaunaDB.Client.csproj)
9+
710
dotnet clean
811
dotnet restore
912
dotnet build ./FaunaDB.Client --configuration Release
1013
dotnet pack ./FaunaDB.Client/FaunaDB.Client.csproj --no-build --no-restore --include-symbols -p:SymbolPackageFormat=snupkg --include-source --configuration Release
1114

1215
dotnet nuget push ./FaunaDB.Client/bin/Release/*.nupkg -s https://api.nuget.org/v3/index.json -k $NUGET_API_KEY
16+
17+
echo "faunadb-csharp@$PACKAGE_VERSION has been published into nuget [fyi <@ewan.edwards>]" > ../slack-message/publish

concourse/tasks/publish.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,8 @@ params:
1212
inputs:
1313
- name: fauna-csharp-repository
1414

15+
outputs:
16+
- name: slack-message
17+
1518
run:
1619
path: ./fauna-csharp-repository/concourse/scripts/publish.sh

0 commit comments

Comments
 (0)