Skip to content

Commit

Permalink
Update build image binaries to the latest version (#597)
Browse files Browse the repository at this point in the history
* Update build image binaries to the latest version

Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>

* Update build scripts to work with latest image

Ignore golint checks for some statements

Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>

* Update build image tag in Makefile to 0.0.9

Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
PrasadG193 and mergify[bot] committed Mar 6, 2020
1 parent 97ca7ca commit ea72b13
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ IMAGE_NAME := $(BIN)

IMAGE := $(REGISTRY)/$(IMAGE_NAME)

BUILD_IMAGE ?= kanisterio/build:v0.0.8
BUILD_IMAGE ?= kanisterio/build:v0.0.9
DOCS_BUILD_IMAGE ?= kanisterio/docker-sphinx

DOCS_RELEASE_BUCKET ?= s3://docs.kanister.io
Expand Down
7 changes: 1 addition & 6 deletions build/local_kubernetes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,9 @@ start_localkube() {
if [ -e ${KUBECONFIG} ]; then
cp -fr ${KUBECONFIG} ${HOME}/.kube/config_bk
fi
KUBECONFIG=$(kind get kubeconfig-path --name="kanister")
export KUBECONFIG=${KUBECONFIG}:${HOME}/.kube/config_bk; kubectl config view --flatten > "${HOME}/.kube/config"
kind get kubeconfig --name="kanister" > "${HOME}/.kube/config"
wait_for_nodes
wait_for_pods

kubectl patch storageclass standard -p '{"metadata": {"annotations":{"storageclass.beta.kubernetes.io/is-default-class":"false"}}}'
kubectl apply -f https://raw.githubusercontent.com/rancher/local-path-provisioner/${LOCAL_PATH_PROV_VERSION}/deploy/local-path-storage.yaml
kubectl patch storageclass local-path -p '{"metadata": {"annotations":{"storageclass.beta.kubernetes.io/is-default-class":"true"}}}'
}

stop_localkube() {
Expand Down
8 changes: 4 additions & 4 deletions docker/build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ RUN apk add --update --no-cache ca-certificates bash git docker jq \
&& update-ca-certificates \
&& rm -rf /var/cache/apk/*

COPY --from=bitnami/kubectl:1.13.4 /opt/bitnami/kubectl/bin/kubectl /usr/local/bin/
COPY --from=bitnami/kubectl:1.17 /opt/bitnami/kubectl/bin/kubectl /usr/local/bin/

COPY --from=goreleaser/goreleaser:v0.116.0 /bin/goreleaser /usr/local/bin/
COPY --from=goreleaser/goreleaser:v0.127.0 /bin/goreleaser /usr/local/bin/

COPY --from=alpine/helm:3.0.0 /usr/bin/helm /usr/local/bin/

COPY --from=golangci/golangci-lint:v1.21.0 /usr/bin/golangci-lint /usr/local/bin/
COPY --from=golangci/golangci-lint:v1.23.7 /usr/bin/golangci-lint /usr/local/bin/

RUN wget -O /usr/local/bin/kind https://github.com/kubernetes-sigs/kind/releases/download/v0.5.1/kind-linux-amd64 \
RUN wget -O /usr/local/bin/kind https://github.com/kubernetes-sigs/kind/releases/download/v0.7.0/kind-linux-amd64 \
&& chmod +x /usr/local/bin/kind

ENV CGO_ENABLED=0 \
Expand Down
1 change: 1 addition & 0 deletions pkg/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@ func (c *Controller) handleActionSet(as *crv1alpha1.ActionSet) (err error) {
return nil
}

// nolint:gocognit
func (c *Controller) runAction(ctx context.Context, as *crv1alpha1.ActionSet, aIDX int) error {
action := as.Spec.Actions[aIDX]
c.logAndSuccessEvent(ctx, fmt.Sprintf("Executing action %s", action.Name), "Started Action", as)
Expand Down
1 change: 1 addition & 0 deletions pkg/function/delete_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ func deleteData(ctx context.Context, cli kubernetes.Interface, tp param.Template
return pr.Run(ctx, podFunc)
}

// nolint:gocognit
func deleteDataPodFunc(cli kubernetes.Interface, tp param.TemplateParams, reclaimSpace bool, namespace, encryptionKey string, targetPaths, deleteTags, deleteIdentifiers []string) func(ctx context.Context, pod *v1.Pod) (map[string]interface{}, error) {
return func(ctx context.Context, pod *v1.Pod) (map[string]interface{}, error) {
// Wait for pod to reach running state
Expand Down

0 comments on commit ea72b13

Please sign in to comment.