Skip to content
This repository has been archived by the owner on Mar 8, 2022. It is now read-only.

Commit

Permalink
Dockerize and add circle config
Browse files Browse the repository at this point in the history
  • Loading branch information
discordianfish committed Dec 28, 2017
1 parent 96e78e2 commit 4f854dc
Show file tree
Hide file tree
Showing 5 changed files with 1,157 additions and 1 deletion.
1 change: 1 addition & 0 deletions .dockerignore
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
k8s-ci-purger
vendor/*
!vendor/vendor.json
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM golang:1.9
RUN go get -u github.com/kardianos/govendor
WORKDIR /go/src/github.com/itskoko/k8s-ci-purger
COPY vendor/ vendor/
RUN govendor sync
COPY . .
RUN go test $(go list ./... | grep -v /vendor/) \
&& CGO_ENABLED=0 go build

ENTRYPOINT [ "./k8s-ci-purger" ]
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ func (p *purger) deleteResource(resource runtime.Unstructured, client dynamic.Re
name := metadata.GetName()
logger := log.With(logger, "name", name, "self-link", metadata.GetSelfLink())
logger.Log("msg", "Deleting")
propagationPolicy := metav1.DeletePropagationForeground
return client.Delete(name, &metav1.DeleteOptions{
PropagationPolicy: &metav1.DeletePropagationForeground,
PropagationPolicy: &propagationPolicy,
})
}
Loading

0 comments on commit 4f854dc

Please sign in to comment.