diff --git a/Dockerfile b/Dockerfile index b15aed9..867a1f7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM harbor.server.kjuulh.io/docker-proxy/library/golang:alpine as builder +FROM harbor.front.kjuulh.io/docker-proxy/library/golang:alpine as builder WORKDIR /src/builder @@ -6,7 +6,7 @@ COPY ci/. . RUN go build -o dist/bust main.go -FROM harbor.server.kjuulh.io/docker-proxy/library/docker:dind +FROM harbor.front.kjuulh.io/docker-proxy/library/docker:dind WORKDIR /src diff --git a/ci/main.go b/ci/main.go index cbf3b99..e50559a 100644 --- a/ci/main.go +++ b/ci/main.go @@ -26,7 +26,7 @@ func main() { }, BuildPath: "main.go", BinName: "bust", - BaseImage: "harbor.server.kjuulh.io/docker-proxy/library/docker:dind", + BaseImage: "harbor.front.kjuulh.io/docker-proxy/library/docker:dind", CGOEnabled: true, }). Execute(ctx) diff --git a/pkg/pipelines/docker.go b/pkg/pipelines/docker.go index edf4b32..e9d0018 100644 --- a/pkg/pipelines/docker.go +++ b/pkg/pipelines/docker.go @@ -56,7 +56,7 @@ func (p *Pipeline) WithDocker(opts *DockerOpt) *Pipeline { opts.ImageTag = strconv.FormatInt(time.Now().UTC().UnixMilli(), 10) } - tag := fmt.Sprintf("harbor.server.kjuulh.io/kjuulh/%s:%s", opts.ImageName, opts.ImageTag) + tag := fmt.Sprintf("harbor.front.kjuulh.io/kjuulh/%s:%s", opts.ImageName, opts.ImageTag) _, err := finalImage.Publish(ctx, tag) return err diff --git a/pkg/pipelines/golang-bin.go b/pkg/pipelines/golang-bin.go index 5ba1fc8..b36ad7d 100644 --- a/pkg/pipelines/golang-bin.go +++ b/pkg/pipelines/golang-bin.go @@ -48,7 +48,7 @@ func (p *Pipeline) WithGolangBin(opts *GolangBinOpts) *Pipeline { byg.Step{ Execute: func(_ byg.Context) error { var err error - c := container.LoadImage(client, "harbor.server.kjuulh.io/docker-proxy/library/golang") + c := container.LoadImage(client, "harbor.front.kjuulh.io/docker-proxy/library/golang") c, err = container.MountCurrent(ctx, client, c, "/src") if err != nil { return err @@ -80,7 +80,7 @@ func (p *Pipeline) WithGolangBin(opts *GolangBinOpts) *Pipeline { byg.Step{ Execute: func(_ byg.Context) error { if opts.BaseImage == "" { - opts.BaseImage = "harbor.server.kjuulh.io/docker-proxy/library/alpine" + opts.BaseImage = "harbor.front.kjuulh.io/docker-proxy/library/alpine" } binpath := "/usr/bin" @@ -122,7 +122,7 @@ func (p *Pipeline) WithGolangBin(opts *GolangBinOpts) *Pipeline { opts.ImageTag = strconv.FormatInt(time.Now().UTC().UnixMilli(), 10) } - tag := fmt.Sprintf("harbor.server.kjuulh.io/kjuulh/%s:%s", opts.ImageName, opts.ImageTag) + tag := fmt.Sprintf("harbor.front.kjuulh.io/kjuulh/%s:%s", opts.ImageName, opts.ImageTag) _, err := finalImage.Publish(ctx, tag) return err diff --git a/pkg/pipelines/rust-bin.go b/pkg/pipelines/rust-bin.go index 61cc8e9..4f3e12f 100644 --- a/pkg/pipelines/rust-bin.go +++ b/pkg/pipelines/rust-bin.go @@ -38,7 +38,7 @@ func (p *Pipeline) WithRustBin(opts *RustBinOpts) *Pipeline { byg.Step{ Execute: func(_ byg.Context) error { var err error - c := container.LoadImage(client, "harbor.server.kjuulh.io/docker-proxy/library/rust:buster") + c := container.LoadImage(client, "harbor.front.kjuulh.io/docker-proxy/library/rust:buster") c = c.Exec(dagger.ContainerExecOpts{ Args: []string{ "apt", "update", "-y", @@ -87,7 +87,7 @@ func (p *Pipeline) WithRustBin(opts *RustBinOpts) *Pipeline { byg.Step{ Execute: func(_ byg.Context) error { if opts.BaseImage == "" { - opts.BaseImage = "harbor.server.kjuulh.io/docker-proxy/library/alpine" + opts.BaseImage = "harbor.front.kjuulh.io/docker-proxy/library/alpine" } binpath := "/usr/bin" @@ -120,7 +120,7 @@ func (p *Pipeline) WithRustBin(opts *RustBinOpts) *Pipeline { opts.ImageTag = strconv.FormatInt(time.Now().UTC().UnixMilli(), 10) } - tag := fmt.Sprintf("harbor.server.kjuulh.io/kjuulh/%s:%s", opts.ImageName, opts.ImageTag) + tag := fmt.Sprintf("harbor.front.kjuulh.io/kjuulh/%s:%s", opts.ImageName, opts.ImageTag) _, err := finalImage.Publish(ctx, tag) return err diff --git a/templates/bust_default_template.yaml b/templates/bust_default_template.yaml index 3aa7b7c..108660d 100644 --- a/templates/bust_default_template.yaml +++ b/templates/bust_default_template.yaml @@ -4,13 +4,13 @@ name: "drone-dagger-test" steps: - name: "build" - image: harbor.server.kjuulh.io/kjuulh/bust:1667250488156 + image: harbor.front.kjuulh.io/kjuulh/bust:1667250488156 volumes: - name: dockersock path: /var/run environment: DOCKER_BUILDKIT: 1 - HARBOR_DOCKER_HOST: "harbor.server.kjuulh.io" + HARBOR_DOCKER_HOST: "harbor.front.kjuulh.io" HARBOR_DOCKER_USERNAME: from_secret: "harbor_docker_username" HARBOR_DOCKER_PASSWORD: diff --git a/templates/bust_docker_template.yaml b/templates/bust_docker_template.yaml index 72d757d..8841f40 100644 --- a/templates/bust_docker_template.yaml +++ b/templates/bust_docker_template.yaml @@ -4,13 +4,13 @@ name: "drone-dagger-test" steps: - name: "build" - image: harbor.server.kjuulh.io/kjuulh/bust:1667250488156 + image: harbor.front.kjuulh.io/kjuulh/bust:1667250488156 volumes: - name: dockersock path: /var/run environment: DOCKER_BUILDKIT: 1 - HARBOR_DOCKER_HOST: "harbor.server.kjuulh.io" + HARBOR_DOCKER_HOST: "harbor.front.kjuulh.io" HARBOR_DOCKER_USERNAME: from_secret: "harbor_docker_username" HARBOR_DOCKER_PASSWORD: diff --git a/templates/bust_gobin_default_template.yaml b/templates/bust_gobin_default_template.yaml index 8059e41..c7ebdf6 100644 --- a/templates/bust_gobin_default_template.yaml +++ b/templates/bust_gobin_default_template.yaml @@ -4,13 +4,13 @@ name: "drone-dagger-test" steps: - name: "build" - image: harbor.server.kjuulh.io/kjuulh/bust:1667244085545 + image: harbor.front.kjuulh.io/kjuulh/bust:1667244085545 volumes: - name: dockersock path: /var/run environment: DOCKER_BUILDKIT: 1 - HARBOR_DOCKER_HOST: "harbor.server.kjuulh.io" + HARBOR_DOCKER_HOST: "harbor.front.kjuulh.io" HARBOR_DOCKER_USERNAME: from_secret: "harbor_docker_username" HARBOR_DOCKER_PASSWORD: diff --git a/templates/bust_gobin_template.yaml b/templates/bust_gobin_template.yaml index cb9d7ce..37c0413 100644 --- a/templates/bust_gobin_template.yaml +++ b/templates/bust_gobin_template.yaml @@ -4,13 +4,13 @@ name: "drone-dagger-test" steps: - name: "build" - image: harbor.server.kjuulh.io/docker-proxy/library/docker:dind + image: harbor.front.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_HOST: "harbor.front.kjuulh.io" HARBOR_DOCKER_USERNAME: from_secret: "harbor_docker_username" HARBOR_DOCKER_PASSWORD: @@ -26,8 +26,8 @@ steps: --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 pull harbor.front.kjuulh.io/kjuulh/bust-builder:${DRONE_COMMIT} || + (docker build -t harbor.front.kjuulh.io/kjuulh/bust-builder:${DRONE_COMMIT} -f tmp/bust/Dockerfile . && docker push harbor.front.kjuulh.io/kjuulh/bust-builder:${DRONE_COMMIT}) - > docker run -e DRONE_REPO_NAME="${DRONE_REPO_NAME}" @@ -36,7 +36,7 @@ steps: -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} + harbor.front.kjuulh.io/kjuulh/bust-builder:${DRONE_COMMIT} sh -c 'echo "$$HARBOR_DOCKER_PASSWORD" | docker login --password-stdin --username="$$HARBOR_DOCKER_USERNAME" diff --git a/templates/bust_rustbin_default_template.yaml b/templates/bust_rustbin_default_template.yaml index 10e369a..a47782e 100644 --- a/templates/bust_rustbin_default_template.yaml +++ b/templates/bust_rustbin_default_template.yaml @@ -1,16 +1,15 @@ type: docker kind: pipeline name: "drone-dagger-test" - steps: - name: "build" - image: harbor.server.kjuulh.io/kjuulh/bust:1667748107856 + image: harbor.front.kjuulh.io/kjuulh/bust:1667748107856 volumes: - name: dockersock path: /var/run environment: DOCKER_BUILDKIT: 1 - HARBOR_DOCKER_HOST: "harbor.server.kjuulh.io" + HARBOR_DOCKER_HOST: "harbor.front.kjuulh.io" HARBOR_DOCKER_USERNAME: from_secret: "harbor_docker_username" HARBOR_DOCKER_PASSWORD: @@ -18,12 +17,9 @@ steps: commands: - sleep 5 - > - echo "$${HARBOR_DOCKER_PASSWORD}" | docker login - --password-stdin - --username="$${HARBOR_DOCKER_USERNAME}" - "$${HARBOR_DOCKER_HOST}" - - bust build rustbin --bin-name {{ .input.binName }} + echo "$${HARBOR_DOCKER_PASSWORD}" | docker login --password-stdin --username="$${HARBOR_DOCKER_USERNAME}" "$${HARBOR_DOCKER_HOST}" + - bust build rustbin --bin-name {{ .input.binName }} services: - name: docker image: docker:dind @@ -31,10 +27,8 @@ services: volumes: - name: dockersock path: /var/run - volumes: - name: dockersock temp: {} - image_pull_secrets: - dockerconfig