Skip to content

Commit

Permalink
azdevops: xamarin#73.
Browse files Browse the repository at this point in the history
  • Loading branch information
rolfbjarne committed Apr 5, 2019
1 parent 1e4662d commit f04f88f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions tools/devops/build-samples-report-to-github.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

env | sort

TOKEN=$1
shift
STEPS="$*"

EMOJII=""
Expand All @@ -22,9 +24,9 @@ for STEP in $STEPS; do
echo "* $STEPEMOJII $STEPNAME: $STEPSTATUS" >> "$FILE"
done

echo "$EMOJII Status for '$BUILD_DEFINITIONNAME': $GH_STATE. [View results]($AZURE_BUILD_URL)\n" | cat - "$FILE" > "$FILE.tmp"
printf "%s" "$EMOJII Status for '$BUILD_DEFINITIONNAME': $GH_STATE. [View results]($AZURE_BUILD_URL)\n\n" | cat - "$FILE" > "$FILE.tmp"
mv "$FILE.tmp" "$FILE"

./jenkins/add-commit-comment.sh "--token=$(github-pat)" "--hash=$(Build.SourceVersion)" "--file=$FILE"
./jenkins/add-commit-status.sh "--token=$(github-pat)" "--hash=$(Build.SourceVersion)" "--state=$GH_STATE" --target-url="$AZURE_BUILD_URL" --description="$GH_STATE" --context="$BUILD_DEFINITIONNAME"
./jenkins/add-commit-comment.sh "--token=$TOKEN" "--hash=$BUILD_SOURCEVERSION" "--file=$FILE"
./jenkins/add-commit-status.sh "--token=$TOKEN" "--hash=$BUILD_SOURCEVERSION" "--state=$GH_STATE" --target-url="$AZURE_BUILD_URL" --description="$GH_STATE" --context="$BUILD_DEFINITIONNAME"
rm -f "$FILE"
2 changes: 1 addition & 1 deletion tools/devops/build-samples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ jobs:
jobResultReleaseMac: $[ dependencies.macOS.outputs['Release|Mac.ExportedVariables.JobStatus'] ]
steps:
- bash: |
./tools/devops/build-samples-report-to-github.sh \
./tools/devops/build-samples-report-to-github.sh "$(github-pat)" \
"Debug|iPhone|A-F" "Debug|iPhone|G-R" "Debug|iPhone|S-Z" \
"Debug|iPhoneSimulator" \
"Release|iPhone|A-F" "Release|iPhone|G-R" "Release|iPhone|S-Z" \
Expand Down

0 comments on commit f04f88f

Please sign in to comment.