mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-06-26 08:14:42 +00:00
Add docker buildx acceptance tests image build (#1039)
This commit is contained in:
parent
36910c84ed
commit
171b72831f
16
.github/workflows/acceptance_tests.yml
vendored
16
.github/workflows/acceptance_tests.yml
vendored
@ -8,6 +8,9 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- 'develop'
|
- 'develop'
|
||||||
|
|
||||||
|
env:
|
||||||
|
MIZU_CI_IMAGE: mizu/ci:0.0
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run-acceptance-tests:
|
run-acceptance-tests:
|
||||||
name: Run acceptance tests
|
name: Run acceptance tests
|
||||||
@ -21,6 +24,19 @@ jobs:
|
|||||||
- name: Check out code into the Go module directory
|
- name: Check out code into the Go module directory
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v1
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: false
|
||||||
|
load: true
|
||||||
|
tags: ${{ env.MIZU_CI_IMAGE }}
|
||||||
|
cache-from: type=gha
|
||||||
|
cache-to: type=gha,mode=max
|
||||||
|
|
||||||
- name: Setup acceptance test
|
- name: Setup acceptance test
|
||||||
run: ./acceptanceTests/setup.sh
|
run: ./acceptanceTests/setup.sh
|
||||||
|
|
||||||
|
16
.github/workflows/acceptance_tests_on_pr.yml
vendored
16
.github/workflows/acceptance_tests_on_pr.yml
vendored
@ -2,6 +2,9 @@ name: Acceptance tests on PR
|
|||||||
|
|
||||||
on: push
|
on: push
|
||||||
|
|
||||||
|
env:
|
||||||
|
MIZU_CI_IMAGE: mizu/ci:0.0
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: acceptance-tests-on-pr-${{ github.ref }}
|
group: acceptance-tests-on-pr-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
@ -21,6 +24,19 @@ jobs:
|
|||||||
- name: Check out code into the Go module directory
|
- name: Check out code into the Go module directory
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v1
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: false
|
||||||
|
load: true
|
||||||
|
tags: ${{ env.MIZU_CI_IMAGE }}
|
||||||
|
cache-from: type=gha
|
||||||
|
cache-to: type=gha,mode=max
|
||||||
|
|
||||||
- name: Setup acceptance test
|
- name: Setup acceptance test
|
||||||
run: ./acceptanceTests/setup.sh
|
run: ./acceptanceTests/setup.sh
|
||||||
|
|
||||||
|
@ -57,11 +57,16 @@ kubectl expose deployment rabbitmq --type=LoadBalancer --port=5672 -n mizu-tests
|
|||||||
echo "Starting proxy"
|
echo "Starting proxy"
|
||||||
kubectl proxy --port=8080 &
|
kubectl proxy --port=8080 &
|
||||||
|
|
||||||
echo "Setting minikube docker env"
|
if [[ -z "${CI}" ]]; then
|
||||||
eval $(minikube docker-env)
|
echo "Setting env var of mizu ci image"
|
||||||
|
export MIZU_CI_IMAGE="mizu/ci:0.0"
|
||||||
|
echo "Build agent image"
|
||||||
|
docker build -t "${MIZU_CI_IMAGE}" .
|
||||||
|
else
|
||||||
|
echo "not building docker image in CI because it is created as separate step"
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Build agent image"
|
minikube image load "${MIZU_CI_IMAGE}"
|
||||||
docker build -t mizu/ci:0.0 .
|
|
||||||
|
|
||||||
echo "Build cli"
|
echo "Build cli"
|
||||||
cd cli && make build GIT_BRANCH=ci SUFFIX=ci
|
cd cli && make build GIT_BRANCH=ci SUFFIX=ci
|
||||||
|
@ -212,9 +212,10 @@ func DeleteKubeFile(kubeContext string, namespace string, filename string) error
|
|||||||
}
|
}
|
||||||
|
|
||||||
func getDefaultCommandArgs() []string {
|
func getDefaultCommandArgs() []string {
|
||||||
|
agentImageValue := os.Getenv("MIZU_CI_IMAGE")
|
||||||
setFlag := "--set"
|
setFlag := "--set"
|
||||||
telemetry := "telemetry=false"
|
telemetry := "telemetry=false"
|
||||||
agentImage := "agent-image=mizu/ci:0.0"
|
agentImage := fmt.Sprintf("agent-image=%s", agentImageValue)
|
||||||
imagePullPolicy := "image-pull-policy=IfNotPresent"
|
imagePullPolicy := "image-pull-policy=IfNotPresent"
|
||||||
headless := "headless=true"
|
headless := "headless=true"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user