-
Notifications
You must be signed in to change notification settings - Fork 638
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add container used to run e2e test in Prow
- Loading branch information
Xuewei Zhang
committed
Aug 10, 2019
1 parent
7fa4f40
commit a85fd36
Showing
3 changed files
with
98 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Copyright 2019 The Kubernetes Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
FROM gcr.io/k8s-testimages/kubekins-e2e:v20190607-c90971a-master | ||
|
||
RUN go get github.com/onsi/ginkgo/ginkgo | ||
|
||
RUN apt-get update | ||
RUN apt-get install -y libsystemd-dev | ||
|
||
ADD script.sh /script.sh | ||
RUN chmod a+x /script.sh | ||
|
||
CMD ["/script.sh"] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Copyright 2019 The Kubernetes Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# Build the container which Prow uses to run NPD e2e tests. | ||
|
||
IMAGE=gcr.io/gke-prow/prow-npd-e2e:live | ||
|
||
all: push | ||
|
||
container: | ||
docker build --pull -t ${IMAGE} . | ||
|
||
push: container | ||
gcloud docker -- push ${IMAGE} | ||
|
||
test: container | ||
docker run --rm --entrypoint=/script.sh ${IMAGE} | ||
|
||
.PHONY: all container push |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/bin/bash | ||
|
||
# Copyright 2019 The Kubernetes Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# This scripts clones a NPD repository, and then runs NPD e2e test from it. | ||
|
||
set -o errexit | ||
set -o pipefail | ||
set -u | ||
set -x | ||
|
||
test() { | ||
git clone https://github.com/kubernetes/node-problem-detector.git | ||
|
||
pushd node-problem-detector | ||
|
||
ZONE=us-central1-a PROJECT=xueweiz-experimental \ | ||
VM_IMAGE=cos-73-11647-217-0 IMAGE_PROJECT=cos-cloud \ | ||
SSH_USER=${USER} SSH_KEY=${JENKINS_GCE_SSH_PRIVATE_KEY_FILE} \ | ||
make e2e-test | ||
|
||
popd | ||
rm -rf node-problem-detector | ||
} | ||
|
||
main() { | ||
runner.sh echo "Running NPD e2e test." | ||
test "$@" | ||
} | ||
|
||
main "$@" |