Created
November 29, 2019 02:59
-
-
Save shiywang/cebfdb80b5dfac99aeefbbde8bd3e356 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -euxo pipefail | |
# pip install -e /workspaces/elliott | |
OSE=( 3.11 4.1 4.2 4.3 ) | |
diff_result_files() { | |
local kind=$1 | |
for version in "${OSE[@]}" | |
do | |
diff /tmp/$kind-${version}-test /tmp/$kind-${version}-master | |
if [[ $(echo $?) != 0 ]]; | |
then | |
echo "e2e testing /tmp/${kind}-${version}-test /tmp/${kind}-${version}-master failed..." | |
exit 1 | |
fi | |
done | |
} | |
elliott_find_builds_json_dumps () { | |
local kind=$1 | |
local branch=$2 | |
for version in "${OSE[@]}" | |
do | |
elliott -g openshift-${version} --product-id 79 find-builds -k ${kind} --json /tmp/${kind}-${version}-$branch | |
done | |
} | |
echo "start executing commands...." | |
elliott_find_builds_json_dumps "rpm" "test" | |
elliott_find_builds_json_dumps "image" "test" | |
git checkout master | |
elliott_find_builds_json_dumps "rpm" "master" | |
elliott_find_builds_json_dumps "image" "master" | |
echo "start comparing results...." | |
diff_result_files "rpm" | |
diff_result_files "image" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment