Skip to content
This repository has been archived by the owner on Mar 13, 2021. It is now read-only.

Commit

Permalink
Add Windows FATS tests (#1246)
Browse files Browse the repository at this point in the history
For full FATS jobs, also tests on Windows targetting a GKE cluster.

Skips local builds and eventing on Windows

Refs #1174
  • Loading branch information
scothis committed Apr 10, 2019
1 parent 45d56b7 commit b6fbb94
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 20 deletions.
10 changes: 6 additions & 4 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,10 @@ jobs:
variables:
CLUSTER: '$(cluster)'
REGISTRY: '$(registry)'
CLUSTER_NAME: 'fats-$(Build.BuildId)'
CLUSTER_NAME: 'riff-$(Build.BuildId)-$(Agent.JobName)'
NAMESPACE: '$(CLUSTER_NAME)'
condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
steps:
- template: ci/install-gcloud.yml
- template: ci/downgrade-docker.yml
- bash: ./ci/fats.sh lite
displayName: 'Run FATS'
Expand Down Expand Up @@ -80,16 +79,19 @@ jobs:
imageName: ubuntu-16.04
cluster: gke
registry: gcr
windows:
imageName: windows-2019
cluster: gke
registry: gcr
pool:
vmImage: $(imageName)
variables:
CLUSTER: '$(cluster)'
REGISTRY: '$(registry)'
CLUSTER_NAME: 'fats-$(Build.BuildId)'
CLUSTER_NAME: 'riff-$(Build.BuildId)-$(Agent.JobName)'
NAMESPACE: '$(CLUSTER_NAME)'
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
steps:
- template: ci/install-gcloud.yml
- template: ci/downgrade-docker.yml
- bash: ./ci/fats.sh
env:
Expand Down
4 changes: 2 additions & 2 deletions ci/fats-channels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ kail_output_pid=$!
riff channel create $test_name --namespace $NAMESPACE
riff subscription create $test_name --channel $test_name --subscriber message-dumper --namespace $NAMESPACE

wait_channel_ready $test_name $NAMESPACE
wait_subscription_ready $test_name $NAMESPACE
wait_knative_ready channels.eventing.knative.dev $test_name $NAMESPACE
wait_knative_ready subscriptions.eventing.knative.dev $test_name $NAMESPACE

cat <<EOF | kubectl apply -f -
apiVersion: sources.eventing.knative.dev/v1alpha1
Expand Down
39 changes: 25 additions & 14 deletions ci/fats.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ commit=$(git rev-parse HEAD)
# fetch FATS scripts
fats_dir=`dirname "${BASH_SOURCE[0]}"`/fats
fats_repo="projectriff/fats"
fats_refspec=61c490713c71c354051534349e3ba0c99191ae7d # projectriff/fats master as of 2019-03-31
fats_refspec=6ef32685eff5c24673acff3d23398d681ca7425a # projectriff/fats v0.3.x as of 2019-04-09
source `dirname "${BASH_SOURCE[0]}"`/fats-fetch.sh $fats_dir $fats_refspec $fats_repo
source $fats_dir/.util.sh

Expand All @@ -22,12 +22,19 @@ $fats_dir/install.sh kail
travis_fold start install-riff
echo "Installing riff"
if [ "$mode" = "full" ]; then
gsutil cat gs://projectriff/riff-cli/releases/builds/v${version}-${commit}/riff-linux-amd64.tgz | tar xz
chmod +x riff
if [ "$machine" == "MinGw" ]; then
curl https://storage.googleapis.com/projectriff/riff-cli/releases/builds/v${version}-${commit}/riff-windows-amd64.zip > riff.zip
unzip riff.zip -d /usr/bin/
rm riff.zip
else
curl https://storage.googleapis.com/projectriff/riff-cli/releases/builds/v${version}-${commit}/riff-linux-amd64.tgz | tar xz
chmod +x riff
sudo cp riff /usr/bin/riff
fi
else
make build
sudo cp riff /usr/bin/riff
fi
sudo cp riff /usr/local/bin/riff
travis_fold end install-riff

# start FATS
Expand Down Expand Up @@ -71,15 +78,19 @@ for test in java java-boot node npm command; do
run_function $path $function_name $image "${create_args}" $input_data $expected_data
done

for test in node command; do
path=${fats_dir}/functions/uppercase/${test}
function_name=fats-local-uppercase-${test}
image=$(fats_image_repo ${function_name})
create_args="--local-path ."
input_data=riff
expected_data=RIFF
if [ "$machine" != "MinGw" ]; then
for test in node command; do
path=${fats_dir}/functions/uppercase/${test}
function_name=fats-local-uppercase-${test}
image=$(fats_image_repo ${function_name})
create_args="--local-path ."
input_data=riff
expected_data=RIFF

run_function $path $function_name $image "${create_args}" $input_data $expected_data
done
run_function $path $function_name $image "${create_args}" $input_data $expected_data
done
fi

source `dirname "${BASH_SOURCE[0]}"`/fats-channels.sh
if [ "$machine" != "MinGw" ]; then
source `dirname "${BASH_SOURCE[0]}"`/fats-channels.sh
fi

0 comments on commit b6fbb94

Please sign in to comment.