File tree Expand file tree Collapse file tree 3 files changed +20
-8
lines changed Expand file tree Collapse file tree 3 files changed +20
-8
lines changed Original file line number Diff line number Diff line change @@ -44,11 +44,16 @@ build: clean $(CMDS)
44
44
build-coverage : build_cmd=test -c -covermode=count -coverpkg ./pkg/controller/...
45
45
build-coverage : clean $(CMDS )
46
46
47
+ build-linux : build_cmd=build
48
+ build-linux : arch_flags=GOOS=linux GOARCH=386
49
+ build-linux : clean $(CMDS )
50
+
47
51
$(CMDS ) : version_flags=-ldflags "-w -X $(PKG ) /pkg/version.GitCommit=`git rev-parse --short HEAD` -X $(PKG ) /pkg/version.OLMVersion=`cat OLM_VERSION`"
48
52
$(CMDS ) :
49
- CGO_ENABLED=0 go $(build_cmd ) $(MOD_FLAGS ) $(version_flags ) -o $@ $(PKG ) /cmd/$(shell basename $@ ) ;
53
+ CGO_ENABLED=0 $( arch_flags ) go $(build_cmd ) $(MOD_FLAGS ) $(version_flags ) -o $@ $(PKG ) /cmd/$(shell basename $@ ) ;
50
54
51
- run-local :
55
+ run-local : build-linux
56
+ rm -rf build
52
57
. ./scripts/build_local.sh
53
58
mkdir -p build/resources
54
59
. ./scripts/package_release.sh 1.0.0 build/resources Documentation/install/local-values.yaml
@@ -73,7 +78,7 @@ setup-bare: clean e2e.namespace
73
78
e2e :
74
79
go test -v -failfast -timeout 70m ./test/e2e/... -namespace=openshift-operators -kubeconfig=${KUBECONFIG} -olmNamespace=openshift-operator-lifecycle-manager
75
80
76
- e2e-local :
81
+ e2e-local : build-linux
77
82
. ./scripts/build_local.sh
78
83
. ./scripts/run_e2e_local.sh $(TEST )
79
84
Original file line number Diff line number Diff line change
1
+ FROM alpine:latest
2
+ WORKDIR /
3
+ COPY olm /bin/olm
4
+ COPY catalog /bin/catalog
5
+ COPY package-server /bin/package-server
6
+ EXPOSE 8080
7
+ EXPOSE 5443
8
+ CMD ["/bin/olm" ]
Original file line number Diff line number Diff line change 5
5
6
6
set -e
7
7
8
- if [ -z " $NO_MINIKUBE " ]; then
8
+ if [ -z " $NO_MINIKUBE " ] || [ -x " $( command -v minikube ) " ] ; then
9
9
ps x | grep -q [m]inikube || minikube start --kubernetes-version=" v1.12.0" --extra-config=apiserver.v=4 || { echo ' Cannot start minikube.' ; exit 1; }
10
10
eval $( minikube docker-env) || { echo ' Cannot switch to minikube docker' ; exit 1; }
11
11
kubectl config use-context minikube
12
12
fi
13
- docker build -f upstream.Dockerfile .
14
- docker tag $( docker images --filter ' label=stage=olm' --format ' {{.CreatedAt}}\t{{.ID}}' | sort -nr | head -n 1 | cut -f2) quay.io/operator-framework/olm:local
15
- docker tag $( docker images --filter ' label=stage=builder' --format ' {{.CreatedAt}}\t{{.ID}}' | sort -nr | head -n 1 | cut -f2) quay.io/operator-framework/olm-e2e:local
16
13
17
- if [ -x " $( command -v kind) " ]; then
14
+ docker build -f local.Dockerfile -t quay.io/operator-framework/olm:local -t quay.io/operator-framework/olm-e2e:local ./bin
15
+
16
+ if [ -x " $( command -v kind) " ] && [ " kubectl config current-context" -eq " kind" ]; then
18
17
kind load docker-image quay.io/operator-framework/olm:local
19
18
kind load docker-image quay.io/operator-framework/olm-e2e:local
20
19
fi
You can’t perform that action at this time.
0 commit comments