Skip to content

Commit

Permalink
ci: add vpc-nat-gateway build
Browse files Browse the repository at this point in the history
  • Loading branch information
oilbeater committed Oct 12, 2021
1 parent d8179e4 commit d7edf24
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 39 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build-arm64-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ jobs:
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
docker tag kubeovn/kube-ovn:$TAG kubeovn/kube-ovn:$TAG-arm
docker tag kubeovn/kube-ovn:$TAG kubeovn/kube-ovn-dev:$COMMIT-arm
docker tag kubeovn/kube-ovn:$TAG kubeovn/vpc-nat-gateway:$TAG-arm
docker tag kubeovn/kube-ovn:$TAG kubeovn/vpc-nat-gateway-dev:$COMMIT-arm
docker images
docker push kubeovn/kube-ovn:$TAG-arm
docker push kubeovn/kube-ovn-dev:$COMMIT-arm
docker push kubeovn/vpc-nat-gateway:$TAG-arm
docker push kubeovn/vpc-nat-gateway-dev:$COMMIT-arm
88 changes: 52 additions & 36 deletions .github/workflows/build-x86-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,17 @@ jobs:
make release
make tar
- name: Upload image to artifact
- name: Upload kube-ovn image to artifact
uses: actions/upload-artifact@v2
with:
name: image
path: image.tar
name: kube-ovn
path: kube-ovn.tar

- name: Upload vpc-nat-gateway image to artifact
uses: actions/upload-artifact@v2
with:
name: vpc-nat-gateway
path: vpc-nat-gateway.tar

single-e2e:
needs: build
Expand All @@ -93,11 +99,11 @@ jobs:
- name: Download image
uses: actions/download-artifact@v2
with:
name: image
name: kube-ovn

- name: Install Kube-OVN
run: |
docker load --input image.tar
docker load --input kube-ovn.tar
sudo make kind-install
- name: Set up Go 1.x
Expand Down Expand Up @@ -137,11 +143,11 @@ jobs:
- name: Download image
uses: actions/download-artifact@v2
with:
name: image
name: kube-ovn

- name: Install Kube-OVN
run: |
docker load --input image.tar
docker load --input kube-ovn.tar
sudo make kind-install
- name: Set up Go 1.x
Expand Down Expand Up @@ -181,11 +187,11 @@ jobs:
- name: Download image
uses: actions/download-artifact@v2
with:
name: image
name: kube-ovn

- name: Install Kube-OVN
run: |
docker load --input image.tar
docker load --input kube-ovn.tar
sudo make kind-install
- name: Set up Go 1.x
Expand Down Expand Up @@ -225,11 +231,11 @@ jobs:
- name: Download image
uses: actions/download-artifact@v2
with:
name: image
name: kube-ovn

- name: Install Kube-OVN
run: |
docker load --input image.tar
docker load --input kube-ovn.tar
sudo make kind-install-underlay
- name: Set up Go 1.x
Expand Down Expand Up @@ -269,11 +275,11 @@ jobs:
- name: Download image
uses: actions/download-artifact@v2
with:
name: image
name: kube-ovn

- name: Install Kube-OVN
run: |
docker load --input image.tar
docker load --input kube-ovn.tar
sudo make kind-install-single
- name: Set up Go 1.x
Expand Down Expand Up @@ -313,11 +319,11 @@ jobs:
- name: Download image
uses: actions/download-artifact@v2
with:
name: image
name: kube-ovn

- name: Install Kube-OVN
run: |
docker load --input image.tar
docker load --input kube-ovn.tar
sudo make kind-install
ipv6-e2e:
Expand All @@ -344,15 +350,15 @@ jobs:
- name: Download image
uses: actions/download-artifact@v2
with:
name: image
name: kube-ovn

- name: Load Image
run: |
docker load --input image.tar
docker load --input kube-ovn.tar
- name: Install Kube-OVN
run: |
docker load --input image.tar
docker load --input kube-ovn.tar
sudo make kind-install-ipv6
- name: Set up Go 1.x
Expand Down Expand Up @@ -392,15 +398,15 @@ jobs:
- name: Download image
uses: actions/download-artifact@v2
with:
name: image
name: kube-ovn

- name: Load Image
run: |
docker load --input image.tar
docker load --input kube-ovn.tar
- name: Install Kube-OVN
run: |
docker load --input image.tar
docker load --input kube-ovn.tar
sudo make kind-install-ipv6
- name: Set up Go 1.x
Expand Down Expand Up @@ -440,15 +446,15 @@ jobs:
- name: Download image
uses: actions/download-artifact@v2
with:
name: image
name: kube-ovn

- name: Load Image
run: |
docker load --input image.tar
docker load --input kube-ovn.tar
- name: Install Kube-OVN
run: |
docker load --input image.tar
docker load --input kube-ovn.tar
sudo make kind-install-underlay-ipv6
- name: Set up Go 1.x
Expand Down Expand Up @@ -488,15 +494,15 @@ jobs:
- name: Download image
uses: actions/download-artifact@v2
with:
name: image
name: kube-ovn

- name: Load Image
run: |
docker load --input image.tar
docker load --input kube-ovn.tar
- name: Install Kube-OVN
run: |
docker load --input image.tar
docker load --input kube-ovn.tar
sudo make kind-install-dual
- name: Set up Go 1.x
Expand Down Expand Up @@ -536,13 +542,13 @@ jobs:
- name: Download image
uses: actions/download-artifact@v2
with:
name: image
name: kube-ovn

- name: Install Kube-OVN without LoadBalancer
env:
ENABLE_LB: "false"
run: |
docker load --input image.tar
docker load --input kube-ovn.tar
sudo make kind-install
- name: Set up Go 1.x
Expand Down Expand Up @@ -582,13 +588,13 @@ jobs:
- name: Download image
uses: actions/download-artifact@v2
with:
name: image
name: kube-ovn

- name: Install Kube-OVN without LoadBalancer
env:
ENABLE_LB: "false"
run: |
docker load --input image.tar
docker load --input kube-ovn.tar
sudo make kind-install
- name: Set up Go 1.x
Expand Down Expand Up @@ -628,13 +634,13 @@ jobs:
- name: Download image
uses: actions/download-artifact@v2
with:
name: image
name: kube-ovn

- name: Install Kube-OVN without network policy support
env:
ENABLE_NP: "false"
run: |
docker load --input image.tar
docker load --input kube-ovn.tar
sudo make kind-install
- name: Set up Go 1.x
Expand Down Expand Up @@ -671,14 +677,20 @@ jobs:
- name: Check out code
uses: actions/checkout@v2

- name: Download image
- name: Download kube-ovn image
uses: actions/download-artifact@v2
with:
name: kube-ovn

- name: Download vpc-nat-gateway image
uses: actions/download-artifact@v2
with:
name: image
name: vpc-nat-gateway

- name: Load Image
run: |
docker load --input image.tar
docker load --input kube-ovn.tar
docker load --input vpc-nat-gateway.tar
- name: Security Scan
run: |
Expand All @@ -702,6 +714,10 @@ jobs:
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
docker tag kubeovn/kube-ovn:$TAG kubeovn/kube-ovn-dev:$COMMIT-x86
docker tag kubeovn/kube-ovn:$TAG kubeovn/kube-ovn:$TAG-x86
docker tag kubeovn/vpc-nat-gateway:$TAG kubeovn/vpc-nat-gateway-dev:$COMMIT-x86
docker tag kubeovn/vpc-nat-gateway:$TAG kubeovn/vpc-nat-gateway:$TAG-x86
docker images
docker push kubeovn/kube-ovn:$TAG-x86
docker push kubeovn/kube-ovn-dev:$COMMIT-x86
docker push kubeovn/vpc-nat-gateway:$TAG-x86
docker push kubeovn/vpc-nat-gateway-dev:$COMMIT-x86
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ kube-ovn.yaml
kube-ovn-crd.yaml
ovn.yaml
kind.yaml
image.tar
kube-ovn.tar
vpc-nat-gateway.tar
image-amd64.tar
image-arm64.tar
install-underlay.sh
Expand Down
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ push-release: release

.PHONY: tar
tar:
docker save $(REGISTRY)/kube-ovn:$(RELEASE_TAG) -o image.tar
docker save $(REGISTRY)/kube-ovn:$(RELEASE_TAG) -o kube-ovn.tar
docker save $(REGISTRY)/vpc-nat-gateway:$(RELEASE_TAG) -o vpc-nat-gateway.tar

.PHONY: base-tar-amd64
base-tar-amd64:
Expand Down Expand Up @@ -205,6 +206,7 @@ lint:
.PHONY: scan
scan:
trivy image --light --exit-code=1 --severity=HIGH --ignore-unfixed kubeovn/kube-ovn:$(RELEASE_TAG)
trivy image --light --exit-code=1 --severity=HIGH --ignore-unfixed kubeovn/vpc-nat-gateway:$(RELEASE_TAG)

.PHONY: ut
ut:
Expand Down Expand Up @@ -262,6 +264,6 @@ clean:
$(RM) dist/images/kube-ovn dist/images/kube-ovn-cmd
$(RM) yamls/kind.yaml
$(RM) ovn.yaml kube-ovn.yaml kube-ovn-crd.yaml
$(RM) image.tar image-amd64.tar image-arm64.tar
$(RM) kube-ovn.tar vpc-nat-gateway.tar image-amd64.tar image-arm64.tar
$(RM) test/e2e/ovnnb_db.* test/e2e/ovnsb_db.*
$(RM) install-underlay.sh

0 comments on commit d7edf24

Please sign in to comment.