Skip to content

Commit

Permalink
fix e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanMelnyk113 committed Nov 17, 2023
1 parent fca9752 commit 890fb46
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
5 changes: 3 additions & 2 deletions Dockerfile.e2e
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ RUN apk update && apk add curl bash
RUN curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 && chmod 700 get_helm.sh && VERIFY_CHECKSUM=false ./get_helm.sh

WORKDIR /source
COPY ./bin/egressd-e2e /usr/local/bin/egressd-e2e
ARG TARGETARCH
COPY ./bin/egressd-$TARGETARCH-e2e /usr/local/bin/egressd-e2e
COPY ./charts ./charts
ARG image_tag
ENV env_image_tag $image_tag

CMD ["sh", "-c", "/usr/local/bin/egressd-e2e -image-tag=${env_image_tag}"]
CMD ["sh", "-c", "/usr/local/bin/egressd-e2e -image-tag=${env_image_tag}"]
11 changes: 6 additions & 5 deletions e2e/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ then
exit 1
fi

name=egressd
name=egressd-$GOARCH
exporter_name=egressd-exporter-$GOARCH

# Build e2e docker image.
pushd ./e2e
Expand All @@ -28,9 +29,9 @@ then
docker build . -t $name:local -f Dockerfile
kind load docker-image $name:local --name $KIND_CONTEXT

GOOS=linux GOARCH=$GOARCH CGO_ENABLED=0 go build -o bin/$name-exporter ./cmd/exporter
docker build . -t $name-exporter:local -f Dockerfile.exporter
kind load docker-image $name-exporter:local --name $KIND_CONTEXT
GOOS=linux GOARCH=$GOARCH CGO_ENABLED=0 go build -o bin/$exporter_name ./cmd/exporter
docker build . -t $exporter_name:local -f Dockerfile.exporter
kind load docker-image $exporter_name:local --name $KIND_CONTEXT
fi

# Deploy e2e resources.
Expand All @@ -52,7 +53,7 @@ function printJobLogs() {
}
trap printJobLogs EXIT

ns="castai-$name-e2e"
ns="castai-egressd-e2e"
kubectl delete ns $ns --force || true
kubectl create ns $ns || true
kubectl config set-context --current --namespace=$ns
Expand Down

0 comments on commit 890fb46

Please sign in to comment.