Skip to content

Commit

Permalink
Make ci build and use the e2e img
Browse files Browse the repository at this point in the history
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
  • Loading branch information
antgamdia committed Jul 16, 2022
1 parent 106846c commit 3e3be06
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 2 deletions.
36 changes: 36 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ workflows:
<<: *build_always
- build_pinniped_proxy:
<<: *build_always
- build_e2e_runner:
<<: *build_always
- local_e2e_tests:
<<: *build_always
matrix:
Expand All @@ -167,6 +169,7 @@ workflows:
- build_go_images
- build_dashboard
- build_pinniped_proxy
- build_e2e_runner
- sync_chart_from_bitnami
- sync_chart_from_bitnami:
<<: *build_on_main
Expand All @@ -180,6 +183,7 @@ workflows:
- build_go_images
- build_dashboard
- build_pinniped_proxy
- build_e2e_runner
- sync_chart_from_bitnami
- GKE_REGULAR_VERSION_LATEST_RELEASE:
<<: *build_on_tag_or_prerelease
Expand All @@ -191,6 +195,7 @@ workflows:
- build_go_images
- build_dashboard
- build_pinniped_proxy
- build_e2e_runner
- sync_chart_from_bitnami
- GKE_STABLE_VERSION_MAIN:
<<: *build_on_tag_or_prerelease
Expand All @@ -202,6 +207,7 @@ workflows:
- build_go_images
- build_dashboard
- build_pinniped_proxy
- build_e2e_runner
- sync_chart_from_bitnami
- GKE_STABLE_VERSION_LATEST_RELEASE:
<<: *build_on_tag_or_prerelease
Expand All @@ -213,6 +219,7 @@ workflows:
- build_go_images
- build_dashboard
- build_pinniped_proxy
- build_e2e_runner
- sync_chart_from_bitnami
- push_images:
<<: *build_on_main
Expand Down Expand Up @@ -696,6 +703,35 @@ jobs:
environment:
IMAGES: "pinniped-proxy"
<<: *build_images
build_e2e_runner:
docker:
- image: cimg/go:<< pipeline.parameters.GOLANG_VERSION >>
environment:
<<: *common_envars
IMAGE: "integration-tests"
steps:
- setup_remote_docker:
version: << pipeline.parameters.DOCKER_VERSION >>
- checkout
- <<: *exports
- run:
name: Build and push CI image
command: |
mkdir -p images/
if [[ -n "${CIRCLE_TAG}" ]]; then
makeArgs="VERSION=${CIRCLE_TAG}"
fi
cd integration
make IMG_MODIFIER="$IMG_MODIFIER" IMAGE_TAG="${DEV_TAG}" $makeArgs kubeapps/${IMAGE}
if [[ -n "${DOCKER_USERNAME}" && -n "${DOCKER_PASSWORD}" ]]; then
docker login -u="${DOCKER_USERNAME}" -p="${DOCKER_PASSWORD}"
docker push kubeapps/${IMAGE}${IMG_MODIFIER}:${DEV_TAG}
fi
docker save kubeapps/${IMAGE}${IMG_MODIFIER}:${DEV_TAG} > ../images/${IMAGE}${IMG_MODIFIER}:${DEV_TAG}
- persist_to_workspace:
root: images
paths:
- "*"
release:
environment:
<<: *common_envars
Expand Down
4 changes: 2 additions & 2 deletions script/e2e-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -376,9 +376,9 @@ done

# Browser tests
cd "${ROOT_DIR}/integration"
kubectl apply -f manifests/e2e-runner.yaml
kubectl create deployment e2e-runner --image kubeapps/integration-tests${IMG_MODIFIER}:${DEV_TAG}
k8s_wait_for_deployment default e2e-runner
pod=$(kubectl get po -l run=e2e-runner -o jsonpath="{.items[0].metadata.name}")
pod=$(kubectl get po -l app=e2e-runner -o custom-columns=:metadata.name --no-headers)
## Copy config and latest tests
for f in *.js; do
kubectl cp "./${f}" "${pod}:/app/"
Expand Down

0 comments on commit 3e3be06

Please sign in to comment.