Skip to content

Commit a8eeef6

Browse files
author
zhilingc
committed
Add prow configuration for starting integration test
1 parent 7bb8a6d commit a8eeef6

4 files changed

Lines changed: 29 additions & 7 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ test:
2121
mvn test
2222

2323
test-integration:
24-
$(MAKE) -C testing/integration test-integration ID=$(ID)
24+
$(MAKE) -C testing/integration test-integration TYPE=$(TYPE) ID=$(ID)
2525

2626
build-proto:
2727
$(MAKE) -C protos gen-go

testing/docker-images/test-image/Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,13 @@ RUN git clone https://github.com/gojek/feast \
66
&& cd feast && mvn test || true \
77
&& cd .. && rm -rf feast
88

9-
RUN apt-get install -y make curl
9+
RUN apt-get install -y make curl gnupg wget python
1010

11+
# Install kubectl gcloud and argo
12+
RUN wget -qO- https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-241.0.0-linux-x86_64.tar.gz | tar xzf - \
13+
&& /google-cloud-sdk/bin/gcloud -q components install kubectl \
14+
&& /google-cloud-sdk/install.sh \
15+
&& ln -s /google-cloud-sdk/bin/gcloud /usr/bin/gcloud
1116
RUN curl -sSL -o /usr/local/bin/argo https://github.com/argoproj/argo/releases/download/v2.2.1/argo-linux-amd64 \
1217
&& chmod +x /usr/local/bin/argo
1318

testing/integration/Makefile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@
1616

1717
.PHONY: test-integration it-redis-bq-dataflow
1818

19+
ifeq ($(TYPE), "PR")
1920
test-integration:
20-
@$(MAKE) it-redis-bq-dataflow ID=$(ID)
21-
22-
it-redis-bq-dataflow:
23-
argo submit --watch tests/redis-bq-dataflow/workflow.yaml -p prId=$(ID)
21+
argo submit --watch tests/redis-bq-dataflow/workflow.yaml -p prId=$(ID)
22+
else
23+
test-integration:
24+
argo submit --watch tests/redis-bq-dataflow/workflow.yaml -p gitRef=$(ID)
25+
endif

testing/prow/config.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ presubmits:
77
- image: us.gcr.io/kf-feast/test-image:1.0.0
88
args: ["make", "test"]
99
imagePullPolicy: Always
10+
- name: presubmit-integration-test-batch
11+
always_run: false
12+
spec:
13+
containers:
14+
- image: us.gcr.io/kf-feast/test-image:1.0.0
15+
args: ["make", "test-integration", "ID=$PULL_NUMBER", "TYPE=PR"]
16+
imagePullPolicy: Always
17+
trigger: integration-batch
1018
postsubmits:
1119
gojek/feast:
1220
- name: postsubmit-unit-tests
@@ -16,7 +24,14 @@ postsubmits:
1624
- image: us.gcr.io/kf-feast/test-image:1.0.0
1725
args: ["make", "test"]
1826
imagePullPolicy: Always
19-
27+
- name: presubmit-integration-test-batch
28+
always_run: true
29+
spec:
30+
containers:
31+
- image: us.gcr.io/kf-feast/test-image:1.0.0
32+
args: ["make", "test-integration", "ID=$PULL_BASE_REF", "TYPE=GITREF"]
33+
imagePullPolicy: Always
34+
trigger: integration-batch
2035
tide:
2136
queries:
2237
- repos:

0 commit comments

Comments
 (0)