Skip to content

Commit 5320764

Browse files
authored
Migrate to Go modules (#1438)
1 parent 5e6a4ba commit 5320764

File tree

3,545 files changed

+718
-1421163
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,545 files changed

+718
-1421163
lines changed

.github/workflows/test-charmed-katib.yaml

Lines changed: 62 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -10,74 +10,75 @@ jobs:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13-
- name: Check out repo
14-
uses: actions/checkout@v2
13+
- name: Check out repo
14+
uses: actions/checkout@v2
1515

16-
- uses: balchua/[email protected]
17-
with:
18-
channel: '1.19/stable'
19-
addons: '["dns", "storage", "rbac"]'
16+
- uses: balchua/[email protected]
17+
with:
18+
channel: "1.19/stable"
19+
addons: '["dns", "storage", "rbac"]'
2020

21-
- name: Install dependencies
22-
run: |
23-
set -eux
24-
sudo snap install charm --classic
25-
sudo snap install juju --classic
26-
sudo snap install juju-helpers --classic
27-
sudo snap install juju-wait --classic
28-
sudo apt update
21+
- name: Install dependencies
22+
run: |
23+
set -eux
24+
sudo snap install charm --classic
25+
sudo snap install juju --classic
26+
sudo snap install juju-helpers --classic
27+
sudo snap install juju-wait --classic
28+
sudo apt update
2929
30-
- name: Build Docker images
31-
run: |
32-
set -eux
33-
for image in katib-ui katib-controller katib-db-manager; do
34-
docker build . \
35-
-t docker.io/kubeflowkatib/$image:latest \
36-
-f cmd/katib-controller/v1beta1/Dockerfile
37-
docker save docker.io/kubeflowkatib/$image > $image.tar
38-
microk8s ctr image import $image.tar
39-
done
30+
- name: Build Docker images
31+
run: |
32+
set -eux
33+
images=("katib-controller" "katib-ui" "katib-db-manager")
34+
folders=("katib-controller" "ui" "db-manager")
35+
for idx in {0..2}; do
36+
docker build . \
37+
-t docker.io/kubeflowkatib/${images[$idx]}:latest \
38+
-f cmd/${folders[$idx]}/v1beta1/Dockerfile
39+
docker save docker.io/kubeflowkatib/${images[$idx]} > ${images[$idx]}.tar
40+
microk8s ctr image import ${images[$idx]}.tar
41+
done
4042
41-
- name: Deploy Katib
42-
run: |
43-
set -eux
44-
cd operators/
45-
git clone git://git.launchpad.net/canonical-osm
46-
cp -r canonical-osm/charms/interfaces/juju-relation-mysql mysql
47-
sg microk8s -c 'juju bootstrap microk8s uk8s'
48-
juju add-model katib
49-
juju bundle deploy -b bundle-edge.yaml --build
50-
juju wait -wvt 300
43+
- name: Deploy Katib
44+
run: |
45+
set -eux
46+
cd operators/
47+
git clone git://git.launchpad.net/canonical-osm
48+
cp -r canonical-osm/charms/interfaces/juju-relation-mysql mysql
49+
sg microk8s -c 'juju bootstrap microk8s uk8s'
50+
juju add-model katib
51+
juju bundle deploy -b bundle-edge.yaml --build
52+
juju wait -wvt 300
5153
52-
- name: Test Katib
53-
run: |
54-
set -eux
55-
kubectl run \
56-
--rm \
57-
-i \
58-
--restart=Never \
59-
--image=ubuntu \
60-
katib-check \
61-
-- \
62-
bash -c "apt update && apt install -y curl && curl -f http://katib-ui.katib.svc.cluster.local:8080/katib/"
54+
- name: Test Katib
55+
run: |
56+
set -eux
57+
kubectl run \
58+
--rm \
59+
-i \
60+
--restart=Never \
61+
--image=ubuntu \
62+
katib-check \
63+
-- \
64+
bash -c "apt update && apt install -y curl && curl -f http://katib-ui.katib.svc.cluster.local:8080/katib/"
6365
66+
- name: Get pod statuses
67+
run: kubectl get all -A
68+
if: failure()
6469

65-
- name: Get pod statuses
66-
run: kubectl get all -A
67-
if: failure()
70+
- name: Get juju status
71+
run: juju status
72+
if: failure()
6873

69-
- name: Get juju status
70-
run: juju status
71-
if: failure()
74+
- name: Get katib-controller logs
75+
run: kubectl logs --tail 100 -nkatib -ljuju-app=katib-controller
76+
if: failure()
7277

73-
- name: Get katib-controller logs
74-
run: kubectl logs --tail 100 -nkatib -ljuju-app=katib-controller
75-
if: failure()
78+
- name: Get katib-ui logs
79+
run: kubectl logs --tail 100 -nkatib -ljuju-app=katib-ui
80+
if: failure()
7681

77-
- name: Get katib-ui logs
78-
run: kubectl logs --tail 100 -nkatib -ljuju-app=katib-ui
79-
if: failure()
80-
81-
- name: Get katib-manager logs
82-
run: kubectl logs --tail 100 -nkatib -ljuju-app=katib-manager
83-
if: failure()
82+
- name: Get katib-manager logs
83+
run: kubectl logs --tail 100 -nkatib -ljuju-app=katib-manager
84+
if: failure()

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,6 @@ $RECYCLE.BIN/
6868
/katib-controller
6969
/katib-db-manager
7070
/katib-ui
71+
72+
## Vendor dir
73+
vendor

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ jobs:
22
include:
33
- name: "Go unit tests, gofmt, golint and coveralls"
44
language: go
5-
go: "1.14.2"
5+
go: "1.15.8"
66
go_import_path: github.com/kubeflow/katib
77
install:
88
- curl -L -O "https://github.com/kubernetes-sigs/kubebuilder/releases/download/v1.0.7/kubebuilder_1.0.7_linux_amd64.tar.gz"

0 commit comments

Comments
 (0)