summaryrefslogtreecommitdiff
path: root/ci/mount-fileshare.sh
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2019-01-29 14:19:29 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-01-29 17:26:46 (GMT)
commit27be78173da3b11011f55061571d81ae006b8915 (patch)
treebe0f2a0fdddf32ea965bf0a90b344487294f6672 /ci/mount-fileshare.sh
parent6141a2edc9aa137d7c44a24791e50221c2ed8a5e (diff)
downloadgit-27be78173da3b11011f55061571d81ae006b8915.zip
git-27be78173da3b11011f55061571d81ae006b8915.tar.gz
git-27be78173da3b11011f55061571d81ae006b8915.tar.bz2
Add a build definition for Azure DevOps
This commit adds an azure-pipelines.yml file which is Azure DevOps' equivalent to Travis CI's .travis.yml. The main idea is to replicate the Travis configuration as faithfully as possible, to make it easy to compare the Azure Pipeline builds to the Travis ones (spoiler: some parts, especially the macOS jobs, are way faster in Azure Pileines). Meaning: the number and the order of the jobs added in this commit faithfully replicates what we have in .travis.yml. Note: Our .travis.yml configuration has a Windows part that is *not* replicated in the Azure Pipelines definition. The reason is easy to see: As Travis cannot support our Windws needs (even with the preliminary Windows support that was recently added to Travis after waiting for *years* for that feature, our test suite would simply hit Travis' timeout every single time). To make things a bit easier to understand, we refrain from using the `matrix` feature here because (while it is powerful) it can be a bit confusing to users who are not familiar with CI setups. Therefore, we use a separate phase even for similar configurations (such as GCC vs Clang on Linux, GCC vs Clang on macOS). Also, we make use of the shiny new feature we just introduced where the test suite can output JUnit-style .xml files. This information is made available in a nice UI that allows the viewer to filter by phase and/or test number, and to see trends such as: number of (failing) tests, time spent running the test suite, etc. (While this seemingly contradicts the intention to replicate the Travis configuration as faithfully as possible, it is just too nice to show off that capability here already.) Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'ci/mount-fileshare.sh')
-rwxr-xr-xci/mount-fileshare.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/ci/mount-fileshare.sh b/ci/mount-fileshare.sh
new file mode 100755
index 0000000..26b58a8
--- /dev/null
+++ b/ci/mount-fileshare.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+die () {
+ echo "$*" >&2
+ exit 1
+}
+
+test $# = 4 ||
+die "Usage: $0 <share> <username> <password> <mountpoint>"
+
+mkdir -p "$4" || die "Could not create $4"
+
+case "$(uname -s)" in
+Linux)
+ sudo mount -t cifs -o vers=3.0,username="$2",password="$3",dir_mode=0777,file_mode=0777,serverino "$1" "$4"
+ ;;
+Darwin)
+ pass="$(echo "$3" | sed -e 's/\//%2F/g' -e 's/+/%2B/g')" &&
+ mount -t smbfs,soft "smb://$2:$pass@${1#//}" "$4"
+ ;;
+*)
+ die "No support for $(uname -s)"
+ ;;
+esac ||
+die "Could not mount $4"