Skip to content

Commit

Permalink
add test dir
Browse files Browse the repository at this point in the history
Signed-off-by: YujiOshima <yuji.oshima0x3fd@gmail.com>
  • Loading branch information
YujiOshima committed Apr 9, 2018
1 parent 3e0c030 commit cfbfbc1
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 0 deletions.
27 changes: 27 additions & 0 deletions test/images/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM golang
RUN : && \
go get k8s.io/api/apps/v1beta1 && \
go get k8s.io/api/core/v1 && \
go get k8s.io/apimachinery/pkg/apis/meta/v1 && \
go get k8s.io/client-go/kubernetes && \
go get k8s.io/client-go/tools/clientcmd && \
go get k8s.io/client-go/util/homedir && \
go get k8s.io/client-go/util/retry && \
go get k8s.io/client-go/rest && \
go get k8s.io/apimachinery/pkg/runtime/serializer && \
go get database/sql && \
go get github.com/golang/protobuf/jsonpb && \
go get github.com/go-sql-driver/mysql && \
go get github.com/mattn/go-sqlite3 && \
go get google.golang.org/grpc && \
go get github.com/sirupsen/logrus && \
go get github.com/docker/docker/api/types && \
go get github.com/docker/docker/api/types/container && \
go get github.com/docker/docker/client && \
:
RUN apt update && apt install -y python python-pip
RUN pip install modeldb
#RUN git clone https://github.com/kubeflow/testing && cp testing/images/checkout.sh /usr/local/bin/
COPY checkout.sh /usr/local/bin
COPY run_workflows.sh /usr/local/bin
ENTRYPOINT ["/usr/local/bin/run_workflows.sh"]
25 changes: 25 additions & 0 deletions test/images/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
IMG = katib/test-image
RELEASE_WORKER = gcr.io/kubeflow-releasing/worker

TAG := $(shell date +v%Y%m%d)-$(shell git describe --tags --always --dirty)-$(shell git diff | shasum -a256 | cut -c -6)
DIR := ${CURDIR}

all: build

# To build without the cache set the environment variable
# export DOCKER_BUILD_OPTS=--no-cache
build:
docker build ${DOCKER_BUILD_OPTS} -t $(IMG):$(TAG) .
@echo Built $(IMG):$(TAG)

# Build but don't attach the latest tag. This allows manual testing/inspection of the image
# first.
push: build
docker push $(IMG):$(TAG)
@echo Pushed $(IMG) with :$(TAG) tags

push-latest: push
docker tag $(IMG):$(TAG) $(IMG):latest
docker push $(IMG):latest
@echo Pushed $(IMG) with :latest tags

2 changes: 2 additions & 0 deletions test/images/checkout.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
git clone https://github.com/YujiOshima/hp-tuning src/YujiOshima/hp-tuning
git checkout ci-setup
10 changes: 10 additions & 0 deletions test/images/run_workflows.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
#
# This script is meant to be the entrypoint for a prow job.
# It checkos out a repo and then looks for prow_config.yaml in that
# repo and uses that to run one or more workflows.
set -ex

# Checkout the code.
/usr/local/bin/checkout.sh /src
cd manager && go build -o vizier-manager

0 comments on commit cfbfbc1

Please # to comment.