Skip to content

Commit 0fe1240

Browse files
committed
Adding script for PR validation via CI
1 parent 019dc5e commit 0fe1240

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

hack/verify-ansible-module.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/bash
2+
3+
set -o errexit
4+
set -o nounset
5+
set -o pipefail
6+
7+
TEMP_DIR="$( mktemp -d )"
8+
OUTPUT_DIR="${ARTIFACT_DIR:=${TEMP_DIR}}"
9+
echo -e "Artifacts will be written to: ${OUTPUT_DIR}"
10+
11+
BASE_DIR="$( readlink -e $( dirname "${BASH_SOURCE[0]}" )/..)"
12+
13+
echo -e "\nVerifying ansible module"
14+
cd ${BASE_DIR}/ansible
15+
./rebuild_module.sh
16+
git diff --exit-code rebuild_module.digest || (echo 'You need to run ansible/rebuild_module.sh and include changes in this PR' && exit 1)
17+
18+
exit 0

0 commit comments

Comments
 (0)