Skip to content

Commit e7bfba7

Browse files
committed
test: add dev.Dockerfile
1 parent fdd1c4b commit e7bfba7

File tree

5 files changed

+29
-6
lines changed

5 files changed

+29
-6
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ before_install:
1111
script:
1212
- sudo -E env "PATH=$PATH" go test -covermode=count -coverprofile=profile.cov ./pkg/...
1313
- $GOPATH/bin/goveralls -coverprofile=profile.cov -service=travis-ci
14+
- make container

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ PKG = sigs.k8s.io/blobfuse-csi-driver
1616
GIT_COMMIT ?= $(shell git rev-parse HEAD)
1717
REGISTRY ?= andyzhangx
1818
REGISTRY_NAME ?= $(shell echo $(REGISTRY) | sed "s/.azurecr.io//g")
19-
IMAGE_NAME = blobfuse-csi
19+
IMAGE_NAME ?= blobfuse-csi
2020
IMAGE_VERSION ?= v0.6.0
2121
# Use a custom version for E2E tests if we are in Prow
2222
ifdef CI
@@ -90,7 +90,7 @@ blobfuse-windows:
9090

9191
.PHONY: container
9292
container: blobfuse
93-
docker build --no-cache -t $(IMAGE_TAG) -f ./pkg/blobfuseplugin/Dockerfile .
93+
docker build --no-cache -t $(IMAGE_TAG) -f ./pkg/blobfuseplugin/dev.Dockerfile .
9494

9595
.PHONY: blobfuse-container
9696
blobfuse-container:

deploy/install-driver.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ fi
3636
echo "Installing Blobfuse CSI driver, version: $ver ..."
3737
kubectl apply -f $repo/rbac-csi-blobfuse-controller.yaml
3838
kubectl apply -f $repo/rbac-csi-blobfuse-node.yaml
39-
kubectl apply -f $repo/csi-blobfuse-controller.yaml
4039
kubectl apply -f $repo/csi-blobfuse-driver.yaml
40+
kubectl apply -f $repo/csi-blobfuse-controller.yaml
4141
kubectl apply -f $repo/csi-blobfuse-node.yaml
4242
echo 'Blobfuse CSI driver installed successfully.'

deploy/uninstall-driver.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ if [[ "$#" -gt 0 ]]; then
2121
ver="$1"
2222
fi
2323

24-
repo="https://raw.githubusercontent.com/kubernetes-sigs/blobfuse-csi-driver/master/deploy"
24+
repo="https://raw.githubusercontent.com/kubernetes-sigs/blobfuse-csi-driver/$ver/deploy"
2525
if [[ "$#" -gt 1 ]]; then
2626
if [[ "$2" == *"local"* ]]; then
2727
echo "use local deploy"
@@ -30,13 +30,13 @@ if [[ "$#" -gt 1 ]]; then
3030
fi
3131

3232
if [ $ver != "master" ]; then
33-
repo="$repo/$ver"
33+
repo="$repo/$ver"
3434
fi
3535

3636
echo "Uninstalling Blobfuse CSI driver, version: $ver ..."
3737
kubectl delete -f $repo/csi-blobfuse-controller.yaml --ignore-not-found
38-
kubectl delete -f $repo/csi-blobfuse-driver.yaml --ignore-not-found
3938
kubectl delete -f $repo/csi-blobfuse-node.yaml --ignore-not-found
39+
kubectl delete -f $repo/csi-blobfuse-driver.yaml --ignore-not-found
4040
kubectl delete -f $repo/rbac-csi-blobfuse-controller.yaml --ignore-not-found
4141
kubectl delete -f $repo/rbac-csi-blobfuse-node.yaml --ignore-not-found
4242
echo 'Uninstalled Blobfuse CSI driver successfully.'

pkg/blobfuseplugin/dev.Dockerfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Copyright 2020 The Kubernetes Authors.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
FROM mcr.microsoft.com/aks/fundamental/base-ubuntu:v0.0.5
16+
RUN wget -O /tmp/packages-microsoft-prod.deb https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb
17+
RUN dpkg -i /tmp/packages-microsoft-prod.deb && apt-get update && apt-get install -y ca-certificates pkg-config libfuse-dev cmake libcurl4-gnutls-dev libgnutls28-dev uuid-dev libgcrypt20-dev blobfuse
18+
LABEL maintainers="andyzhangx"
19+
LABEL description="Blobfuse CSI Driver"
20+
21+
COPY ./_output/blobfuseplugin /blobfuseplugin
22+
ENTRYPOINT ["/blobfuseplugin"]

0 commit comments

Comments
 (0)