Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Push to dockerhub on merge to master & readd integration tests #57

Merged
merged 7 commits into from
Jan 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,16 @@ services:
jobs:
include:
# dont push to dockerhub on forks
# TODO: restore integration tests on Travis once the story around pushing flyteadmin images to dockerhub is resolved
- if: fork = true
stage: test
name: build test
install: true
script: BUILD_PHASE=builder make docker_build
script: BUILD_PHASE=builder make docker_build && make k8s_integration
- if: fork = false
stage: test
name: build
name: build, integration test, and push
install: true
script: BUILD_PHASE=builder make docker_build
script: BUILD_PHASE=builder make docker_build && make k8s_integration
- stage: test
name: unit tests
install: make install
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ update_boilerplate:

.PHONY: integration
integration:
GOFLAGS="-count=1" go test -v -tags=integration ./tests/...
CGO_ENABLED=0 GOFLAGS="-count=1" go test -v -tags=integration ./tests/...

.PHONY: k8s_integration
k8s_integration:
Expand Down
19 changes: 12 additions & 7 deletions script/integration/k8s/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -243,13 +243,16 @@ metadata:
data:
# this will need to be templatized
development.integration: |-
application:
server:
httpPort: 8088
grpcPort: 8089
kube-config: "$HOME/.kube/config"
grpcServerReflection: true
security:
secure: false
useAuth: false
flyteadmin:
httpPort: 8088
grpcPort: 8089
runScheduler: false
roleNameKey: "iam.amazonaws.com/role"
metricsScope: "flyte:"
testing:
Expand Down Expand Up @@ -294,6 +297,9 @@ data:
scheme: local
signedUrls:
durationMinutes: 3
Logger:
show-source: true
level: 5
storage:
type: minio
connection:
Expand All @@ -307,7 +313,6 @@ data:
max_size_mbs: 10
target_gc_percent: 100
container: "flyte"
prefix: metadata/admin
task_resources:
defaults:
cpu: 100m
Expand Down Expand Up @@ -397,15 +402,15 @@ spec:
image: flyteadmin:test
imagePullPolicy: IfNotPresent
command: ["flyteadmin", "--logtostderr", "--config", "/etc/flyte/config/flyteadmin_config.yaml",
"--application.kube-config", "/etc/flyte/config/flyteadmin_config.yaml", "migrate", "run"]
"--server.kube-config", "/etc/flyte/config/flyteadmin_config.yaml", "migrate", "run"]
volumeMounts:
- name: config-volume
mountPath: /etc/flyte/config
- name: seed-projects
image: flyteadmin:test
imagePullPolicy: IfNotPresent
command: ["flyteadmin", "--logtostderr", "--config", "/etc/flyte/config/flyteadmin_config.yaml",
"--application.kube-config", "/etc/flyte/config/flyteadmin_config.yaml", "migrate", "seed-projects",
"--server.kube-config", "/etc/flyte/config/flyteadmin_config.yaml", "migrate", "seed-projects",
"project", "admintests", "flytekit"]
volumeMounts:
- name: config-volume
Expand All @@ -421,7 +426,7 @@ spec:
path: /healthcheck
port: 8088
command: ["flyteadmin", "--logtostderr", "--config", "/etc/flyte/config/flyteadmin_config.yaml",
"--application.kube-config", "/etc/flyte/config/flyteadmin_config.yaml", "serve"]
"--server.kube-config", "/etc/flyte/config/flyteadmin_config.yaml", "serve"]
ports:
- containerPort: 8088
volumeMounts:
Expand Down
4 changes: 2 additions & 2 deletions tests/task_execution_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -375,8 +375,8 @@ func TestGetTaskExecutionData(t *testing.T) {
assert.Nil(t, err)
assert.NotNil(t, resp)

assert.Equal(t, taskExecInputURI, resp.Inputs.Url)
assert.NotEmpty(t, resp.Inputs.Url)
assert.Equal(t, int64(25), resp.Inputs.Bytes)
assert.Equal(t, "s3://flyte/metadata/admin/output/uri", resp.Outputs.Url)
assert.NotEmpty(t, resp.Outputs.Url)
assert.Equal(t, int64(26), resp.Outputs.Bytes)
}