Skip to content

Commit

Permalink
fix image on e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aojea committed Apr 20, 2024
1 parent 9fe16a1 commit 22f2aaa
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 10 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "gomod" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
20 changes: 10 additions & 10 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ env:
K8S_VERSION: "v1.29.2"
KIND_VERSION: "v0.22.0"
REGISTRY: ghcr.io
IMAGE_NAME: registry.k8s.io/kube-netpol
IMAGE_NAME: registry.k8s.io/kube-network-policies
KIND_CLUSTER_NAME: kind

permissions: write-all
Expand All @@ -36,14 +36,14 @@ jobs:

- name: Build
run: |
docker build -t registry.k8s.io/kube-netpol:test -f Dockerfile .
docker build -t registry.k8s.io/kube-network-policies:test -f Dockerfile .
mkdir _output
docker save registry.k8s.io/kube-netpol:test > _output/kube-netpol-image.tar
docker save registry.k8s.io/kube-network-policies:test > _output/kube-network-policies-image.tar
- uses: actions/upload-artifact@v2
with:
name: test-image
path: _output/kube-netpol-image.tar
path: _output/kube-network-policies-image.tar

e2e:
name: e2e
Expand All @@ -57,7 +57,7 @@ jobs:
# TODO add "dual", waiting on KEP https://github.com/kubernetes/enhancements/tree/master/keps/sig-network/3705-cloud-node-ips
ipFamily: ["ipv4", "ipv6"]
env:
JOB_NAME: "kube-netpol-${{ matrix.ipFamily }}"
JOB_NAME: "kube-network-policies-${{ matrix.ipFamily }}"
IP_FAMILY: ${{ matrix.ipFamily }}
steps:
- name: Check out code
Expand Down Expand Up @@ -112,12 +112,12 @@ jobs:
with:
name: test-image

- name: Install kube-netpol
- name: Install kube-network-policies
run: |
# preload kube-netpol image
docker load --input kube-netpol-image.tar
/usr/local/bin/kind load docker-image registry.k8s.io/kube-netpol:test --name ${{ env.KIND_CLUSTER_NAME}}
sed -i s#registry.k8s.io/kube-netpol.*#registry.k8s.io/kube-netpol:test# install.yaml
# preload kube-network-policies image
docker load --input kube-network-policies-image.tar
/usr/local/bin/kind load docker-image registry.k8s.io/kube-network-policies:test --name ${{ env.KIND_CLUSTER_NAME}}
sed -i s#registry.k8s.io/kube-network-policies.*#registry.k8s.io/kube-network-policies:test# install.yaml
/usr/local/bin/kubectl apply -f ./install.yaml
- name: Get Cluster status
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Test

on: [push, pull_request]

jobs:
test:
strategy:
fail-fast: false
matrix:
go-version: [1.22.x]
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- uses: actions/checkout@v3
- run: make test
- run: make lint

0 comments on commit 22f2aaa

Please sign in to comment.