forked from gabrie30/ghorg
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbitbucket_integration_tests.sh
More file actions
executable file
·33 lines (24 loc) · 1.01 KB
/
bitbucket_integration_tests.sh
File metadata and controls
executable file
·33 lines (24 loc) · 1.01 KB
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
#!/bin/bash
set -euo pipefail
echo "Running BitBucket Integration Tests"
cp ./ghorg /usr/local/bin
BITBUCKET_WORKSPACE=ghorg
ghorg version
# clone an org with no config file
ghorg clone $BITBUCKET_WORKSPACE --token="${BITBUCKET_TOKEN}" --bitbucket-username="${BITBUCKET_USERNAME}" --scm=bitbucket --base-url="https://api.bitbucket.org/2.0"
if [ -e "${HOME}"/ghorg/$BITBUCKET_WORKSPACE ]
then
echo "Pass: bitbucket org clone using no configuration file"
else
echo "Fail: bitbucket org clone using no configuration file"
exit 1
fi
# clone an org with no config file to a specific path
ghorg clone $BITBUCKET_WORKSPACE --token="${BITBUCKET_TOKEN}" --bitbucket-username="${BITBUCKET_USERNAME}" --path=/tmp --output-dir=testing_output_dir --scm=bitbucket --base-url="https://api.bitbucket.org/2.0"
if [ -e /tmp/testing_output_dir ]
then
echo "Pass: bitbucket org clone, commandline flags take overwrite conf.yaml"
else
echo "Fail: bitbucket org clone, commandline flags take overwrite conf.yaml"
exit 1
fi