Skip to content

Commit 4096306

Browse files
committed
Remove bazel
Signed-off-by: Martin Necas <mnecas@redhat.com>
1 parent fb9d138 commit 4096306

File tree

9 files changed

+47
-80
lines changed

9 files changed

+47
-80
lines changed

.github/workflows/build_push_tests.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ jobs:
1010
REGISTRY: quay.io
1111
REGISTRY_TAG: ${{ github.head_ref || github.ref_name }}
1212
REGISTRY_ORG: kubev2v
13-
USE_BAZEL_VERSION: 5.4.0
1413
steps:
1514
- name: Check out forkliftci repository
1615
uses: actions/checkout@v3
@@ -21,8 +20,9 @@ jobs:
2120
- name: Checkout forklift
2221
uses: actions/checkout@v3
2322
with:
24-
repository: kubev2v/forklift
23+
repository: mnecas/forklift
2524
path: forklift
25+
ref: remove_bazel
2626

2727
- name: Login to quay.io with bot account
2828
uses: docker/login-action@v2
@@ -31,15 +31,6 @@ jobs:
3131
username: ${{ secrets.QUAY_USERNAME }}
3232
password: ${{ secrets.QUAY_TOKEN }}
3333

34-
- name: Bazel cache
35-
id: bazel-cache
36-
uses: actions/cache@v3
37-
with:
38-
path: ~/.cache/bazel
39-
key: ${{ runner.os }}-bazel-cache-${{ hashFiles('WORKSPACE') }}
40-
41-
#- run: cd forklift/ && bazel sync --configure
42-
4334
# this is required by nbdkit plugin compiler
4435
- run: sudo apt-get install -y nbdkit-plugin-dev
4536

.github/workflows/deploy-sno-okd.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ jobs:
2626
- name: Checkout forklift
2727
uses: actions/checkout@v3
2828
with:
29-
repository: kubev2v/forklift
29+
repository: mnecas/forklift
3030
path: forklift
31+
ref: remove_bazel
3132

3233
- name: run OKD deployment
3334
uses: ./ci/deploy-okd

build_and_setup_everything_bazel_manually.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ source ./cluster/common.sh
1212
. ./cluster/kind/kind_with_registry.sh
1313

1414
# clone the forklift repo
15-
./cluster/get_forklift_bazel.sh
15+
./cluster/get_forklift.sh
1616

1717
# deploy kubevirt
1818
./cluster/k8s-deploy-kubevirt.sh

build_forklift_bazel.sh

Lines changed: 36 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ PROVIDER_NAME=${1:-all}
99

1010
echo "Building for provider ${PROVIDER_NAME}"
1111

12-
13-
14-
15-
1612
[ ! -d ${FORKLIFT_DIR:-forklift} ] && FORKLIFT_DIR="${SCRIPT_DIR}/forklift"
1713

1814
# verify there is WORKSPACE file
@@ -27,71 +23,56 @@ export XDG_RUNTIME_DIR="$(mktemp -p /tmp -d xdg-runtime-XXXXXX)"
2723

2824
export REGISTRY=localhost:5001
2925
export REGISTRY_TAG=latest
30-
export REGISTRY_ORG=""
26+
export REGISTRY_ORG="kubev2v"
3127
export CONTAINER_CMD=$(which docker)
3228

33-
# REGISTRY_ORG cannot be empty with docker
34-
if [ "${PROVIDER_NAME}" = "openstack" ]; then
35-
bazel run push-openstack-populator
36-
fi
37-
if [ "${PROVIDER_NAME}" = "ovirt" ]; then
38-
bazel run push-ovirt-populator
39-
fi
40-
if [ "${PROVIDER_NAME}" = "ova" ]; then
41-
bazel run push-ova-provider-server
29+
CONTAINER_RUNTIME="$(basename ${CONTAINER_CMD:-$(command -v podman || command -v docker)})"
30+
if [ ! -z "${XDG_RUNTIME_DIR}" ]; then
31+
PODMAN_AUTH_FILE="${XDG_RUNTIME_DIR}/containers/auth.json"
32+
if [ "${CONTAINER_RUNTIME}" == "podman" ]; then
33+
if [ -e "${PODMAN_AUTH_FILE}" ]; then
34+
DOCKER_CONFIG="$(mktemp -d)"
35+
DOCKER_AUTH_FILE="${DOCKER_CONFIG}/config.json"
36+
cp "${PODMAN_AUTH_FILE}" "${DOCKER_AUTH_FILE}"
37+
export DOCKER_CONFIG
38+
else
39+
unset DOCKER_CONFIG
40+
fi
41+
fi
4242
fi
4343

44-
bazel run push-populator-controller
45-
46-
bazel run push-forklift-api
47-
bazel run push-forklift-controller
48-
bazel run push-forklift-validation
49-
bazel run push-forklift-operator
50-
51-
ACTION_ENV="--action_env CONTROLLER_IMAGE=${REGISTRY}/forklift-controller:${REGISTRY_TAG} \
52-
--action_env VALIDATION_IMAGE=${REGISTRY}/forklift-validation:${REGISTRY_TAG} \
53-
--action_env OPERATOR_IMAGE=${REGISTRY}/forklift-operator:${REGISTRY_TAG} \
54-
--action_env API_IMAGE=${REGISTRY}/forklift-api:${REGISTRY_TAG}"
55-
56-
# if provider is ovirt or openstack, builder populator controller
57-
if [ "${PROVIDER_NAME}" = "ovirt" ] || [ "${PROVIDER_NAME}" = "openstack" ]; then
58-
ACTION_ENV="$ACTION_ENV --action_env POPULATOR_CONTROLLER_IMAGE=${REGISTRY}/populator-controller:${REGISTRY_TAG}"
59-
fi
6044

6145
if [ "${PROVIDER_NAME}" = "ovirt" ]; then
62-
ACTION_ENV="$ACTION_ENV --action_env OVIRT_POPULATOR_IMAGE=${REGISTRY}/ovirt-populator:${REGISTRY_TAG}"
46+
make push-ovirt-populator-image \
47+
push-populator-controller-image push-api-image push-controller-image push-validation-image push-operator-image \
48+
push-operator-bundle-image push-operator-index-image \
49+
OPM_OPTS="--use-http" BUILD_OPT="--network=host"
6350
fi
6451

6552
if [ "${PROVIDER_NAME}" = "openstack" ]; then
66-
ACTION_ENV="$ACTION_ENV --action_env OPENSTACK_POPULATOR_IMAGE=${REGISTRY}/openstack-populator:${REGISTRY_TAG}"
53+
make push-openstack-populator-image \
54+
push-populator-controller-image push-api-image push-controller-image push-validation-image push-operator-image \
55+
push-operator-bundle-image push-operator-index-image OPM_OPTS="--use-http" \
56+
BUILD_OPT="--network=host"
6757
fi
6858

6959
if [ "${PROVIDER_NAME}" = "vsphere" ]; then
70-
ACTION_ENV="$ACTION_ENV --action_env VIRT_V2V_IMAGE=quay.io/kubev2v/forklift-virt-v2v-stub:${REGISTRY_TAG} \
71-
--action_env VIRT_V2V_DONT_REQUEST_KVM=true "
60+
make push-ovirt-populator-image \
61+
push-populator-controller-image push-api-image push-controller-image push-validation-image push-operator-image \
62+
push-operator-bundle-image push-operator-index-image \
63+
OPM_OPTS="--use-http" BUILD_OPT="--network=host" VIRT_V2V_IMAGE=quay.io/kubev2v/forklift-virt-v2v-stub:latest BUILD_OPT="--env VIRT_V2V_DONT_REQUEST_KVM=true"
7264
fi
7365

7466
if [ "${PROVIDER_NAME}" = "ova" ]; then
75-
ACTION_ENV="$ACTION_ENV --action_env VIRT_V2V_IMAGE=quay.io/kubev2v/forklift-virt-v2v-stub:${REGISTRY_TAG} \
76-
--action_env VIRT_V2V_DONT_REQUEST_KVM=true \
77-
--action_env OVA_PROVIDER_SERVER_IMAGE=${REGISTRY}/forklift-ova-provider-server:${REGISTRY_TAG}"
67+
make push-ova-provider-server-image \
68+
push-populator-controller-image push-api-image push-controller-image push-validation-image push-operator-image \
69+
push-operator-bundle-image push-operator-index-image \
70+
OPM_OPTS="--use-http" BUILD_OPT="--network=host" VIRT_V2V_IMAGE=quay.io/kubev2v/forklift-virt-v2v-stub:latest BUILD_OPT="--env VIRT_V2V_DONT_REQUEST_KVM=true"
7871
fi
7972

80-
if [ "${PROVIDER_NAME}" = "all" ]; then
81-
ACTION_ENV="$ACTION_ENV --action_env VIRT_V2V_IMAGE=quay.io/kubev2v/forklift-virt-v2v-stub:${REGISTRY_TAG} \
82-
--action_env VIRT_V2V_DONT_REQUEST_KVM=true \
83-
--action_env OVIRT_POPULATOR_IMAGE=${REGISTRY}/ovirt-populator:${REGISTRY_TAG} \
84-
--action_env OPENSTACK_POPULATOR_IMAGE=${REGISTRY}/openstack-populator:${REGISTRY_TAG} \
85-
--action_env POPULATOR_CONTROLLER_IMAGE=${REGISTRY}/populator-controller:${REGISTRY_TAG} \
86-
--action_env OVA_PROVIDER_SERVER_IMAGE=${REGISTRY}/forklift-ova-provider-server:${REGISTRY_TAG}"
87-
fi
88-
89-
bazel run push-forklift-operator-bundle \
90-
--action_env CONTROLLER_IMAGE=${REGISTRY}/forklift-controller:${REGISTRY_TAG} \
91-
--action_env VALIDATION_IMAGE=${REGISTRY}/forklift-validation:${REGISTRY_TAG} \
92-
--action_env OPERATOR_IMAGE=${REGISTRY}/forklift-operator:${REGISTRY_TAG} \
93-
--action_env API_IMAGE=${REGISTRY}/forklift-api:${REGISTRY_TAG} \
94-
${ACTION_ENV}
95-
96-
bazel run push-forklift-operator-index --action_env REGISTRY=${REGISTRY} --action_env REGISTRY_TAG=${REGISTRY_TAG} --action_env OPM_OPTS="--use-http"
97-
73+
if [ "${PROVIDER_NAME}" = "all" ] || [ "${PROVIDER_NAME}" = "" ]; then
74+
make push-ova-provider-server-image push-ovirt-populator-image push-openstack-populator-image push-ovirt-populator-image\
75+
push-populator-controller-image push-api-image push-controller-image push-validation-image push-operator-image \
76+
push-operator-bundle-image push-operator-index-image \
77+
OPM_OPTS="--use-http" BUILD_OPT="--network=host" VIRT_V2V_IMAGE=quay.io/kubev2v/forklift-virt-v2v-stub:latest BUILD_OPT="--env VIRT_V2V_DONT_REQUEST_KVM=true"
78+
fi

ci/build-and-setup/action.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,9 @@ runs:
2525
- name: Checkout forklift
2626
uses: actions/checkout@v3
2727
with:
28-
repository: kubev2v/forklift
28+
repository: mnecas/forklift
2929
path: forklift
30-
31-
- name: Bazel cache
32-
id: bazel-cache
33-
uses: actions/cache@v3
34-
with:
35-
path: ~/.cache/bazel
36-
key: ${{ runner.os }}-bazel-cache-${{ hashFiles('forklift/WORKSPACE') }}
30+
ref: remove_bazel
3731

3832
- run: echo "${{ github.action_path }}" >> $GITHUB_PATH
3933
shell: bash
@@ -49,7 +43,7 @@ runs:
4943
env:
5044
GH_TOKEN: ${{ inputs.gh_access_token }}
5145

52-
- name: Build and setup everything with bazel
46+
- name: Build and setup everything
5347
shell: bash
5448
run: |
5549
echo $GITHUB_WORKSPACE
File renamed without changes.

cluster/kind/kind_with_registry.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ echo "Running $0"
44
set -o errexit
55
[ -z "${REMOTE_DOCKER_HOST}" ] || . ./cluster/kind/setup_remote_docker_kind.sh
66

7-
go install sigs.k8s.io/kind@v0.15.0
7+
go install sigs.k8s.io/kind@v0.26.0
88

99
[ "$(type -P kind)" ] || ( echo "kind is not in PATH" ; exit 2 )
1010

cluster/manifests/forklift-k8s.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ spec:
1313
displayName: Forklift Operator
1414
publisher: Konveyor
1515
sourceType: grpc
16-
image: localhost:5001/forklift-operator-index:latest
16+
image: localhost:5001/kubev2v/forklift-operator-index:latest
1717
---
1818
apiVersion: operators.coreos.com/v1
1919
kind: OperatorGroup

setup_everything.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22

3-
. ./kind/install_kind.sh
3+
. ./cluster/kind/install_kind.sh
44

55
./cluster/k8s-deploy-forklift.sh
66

0 commit comments

Comments
 (0)