From aef05e5feefcfea91ee216ea74b6172cb896ffe6 Mon Sep 17 00:00:00 2001 From: kjuulh Date: Mon, 31 Oct 2022 22:04:59 +0100 Subject: [PATCH] remove redundant --- bust_gobin_template.yaml | 56 ------------------------------------- default.Dockerfile | 13 --------- templates/uploadtemplate.sh | 1 + 3 files changed, 1 insertion(+), 69 deletions(-) delete mode 100644 bust_gobin_template.yaml delete mode 100644 default.Dockerfile diff --git a/bust_gobin_template.yaml b/bust_gobin_template.yaml deleted file mode 100644 index cb9d7ce..0000000 --- a/bust_gobin_template.yaml +++ /dev/null @@ -1,56 +0,0 @@ -type: docker -kind: pipeline -name: "drone-dagger-test" - -steps: - - name: "build" - image: harbor.server.kjuulh.io/docker-proxy/library/docker:dind - volumes: - - name: dockersock - path: /var/run - environment: - DOCKER_BUILDKIT: 1 - HARBOR_DOCKER_HOST: "harbor.server.kjuulh.io" - HARBOR_DOCKER_USERNAME: - from_secret: "harbor_docker_username" - HARBOR_DOCKER_PASSWORD: - from_secret: "harbor_docker_password" - commands: - - sleep 5 - - apk add git - - mkdir -p tmp/bust - - git clone "https://git.front.kjuulh.io/kjuulh/bust.git" tmp/bust - - > - echo "$${HARBOR_DOCKER_PASSWORD}" | docker login - --password-stdin - --username="$${HARBOR_DOCKER_USERNAME}" - "$${HARBOR_DOCKER_HOST}" - - > - docker pull harbor.server.kjuulh.io/kjuulh/bust-builder:${DRONE_COMMIT} || - (docker build -t harbor.server.kjuulh.io/kjuulh/bust-builder:${DRONE_COMMIT} -f tmp/bust/Dockerfile . && docker push harbor.server.kjuulh.io/kjuulh/bust-builder:${DRONE_COMMIT}) - - > - docker run - -e DRONE_REPO_NAME="${DRONE_REPO_NAME}" - -e HARBOR_DOCKER_HOST=$${HARBOR_DOCKER_HOST} - -e HARBOR_DOCKER_USERNAME=$${HARBOR_DOCKER_USERNAME} - -e HARBOR_DOCKER_PASSWORD=$${HARBOR_DOCKER_PASSWORD} - -v "$PWD/:/src/" - -v /var/run/docker.sock:/var/run/docker.sock - harbor.server.kjuulh.io/kjuulh/bust-builder:${DRONE_COMMIT} - sh -c 'echo "$$HARBOR_DOCKER_PASSWORD" | docker login - --password-stdin - --username="$$HARBOR_DOCKER_USERNAME" - "$${HARBOR_DOCKER_HOST}" - && bust build golangbin' - -services: - - name: docker - image: docker:dind - privileged: true - volumes: - - name: dockersock - path: /var/run - -volumes: - - name: dockersock - temp: {} diff --git a/default.Dockerfile b/default.Dockerfile deleted file mode 100644 index b1b8a34..0000000 --- a/default.Dockerfile +++ /dev/null @@ -1,13 +0,0 @@ -FROM harbor.server.kjuulh.io/docker-proxy/library/golang:alpine as builder - -WORKDIR /src/builder - -COPY tmp/bust . - -RUN go build -o dist/bust main.go - -FROM harbor.server.kjuulh.io/docker-proxy/library/docker:dind - -WORKDIR /src - -COPY --from=builder /src/builder/dist/bust /usr/bin/ diff --git a/templates/uploadtemplate.sh b/templates/uploadtemplate.sh index dcaa355..a6f971c 100755 --- a/templates/uploadtemplate.sh +++ b/templates/uploadtemplate.sh @@ -9,5 +9,6 @@ function add_template() { add_template kjuulh bust_gobin_template.yaml add_template kjuulh bust_gobin_default_template.yaml +add_template kjuulh bust_docker_template.yaml