diff --git a/.drone-manifest-local.yml b/.drone-manifest-local.yml new file mode 100644 index 0000000..c4b69ed --- /dev/null +++ b/.drone-manifest-local.yml @@ -0,0 +1,22 @@ +image: registry.happydomain.org/happydomain:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}} +{{#if build.tags}} +tags: +{{#each build.tags}} + - {{this}} +{{/each}} +{{/if}} +manifests: + - image: registry.happydomain.org/happydomain:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64 + platform: + architecture: amd64 + os: linux + - image: registry.happydomain.org/happydomain:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64 + platform: + architecture: arm64 + os: linux + variant: v8 + - image: registry.happydomain.org/happydomain:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm + platform: + architecture: arm + os: linux + variant: v7 diff --git a/.drone.yml b/.drone.yml index d59ca27..43b3fe9 100644 --- a/.drone.yml +++ b/.drone.yml @@ -59,6 +59,7 @@ steps: - sed -i '/yarn --offline build/d' ui/assets.go - go generate -v - go build -v -tags netgo -ldflags '-w -X main.version="${DRONE_BRANCH}-${DRONE_COMMIT}" -X main.build=${DRONE_BUILD_NUMBER}' -o happydomain-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} + - ln happydomain-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} happydomain environment: CGO_ENABLED: 0 when: @@ -72,6 +73,7 @@ steps: - sed -i '/yarn --offline build/d' ui/assets.go - go generate -v - go build -v -tags netgo -ldflags '-w -X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}' -o happydomain-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} + - ln happydomain-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} happydomain environment: CGO_ENABLED: 0 when: @@ -181,12 +183,25 @@ steps: event: - tag -- name: publish +- name: publish on local registry + image: plugins/docker + settings: + registry: registry.happydomain.org + repo: registry.happydomain.org/happydomain + auto_tag: true + auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} + username: + from_secret: docker_username + password: + from_secret: docker_password + +- name: publish on Docker Hub image: plugins/docker settings: repo: happydns/happydomain auto_tag: true auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} + dockerfile: Dockerfile-builded username: from_secret: docker_username password: @@ -338,7 +353,20 @@ steps: event: - tag -- name: publish +- name: publish on local registry + image: plugins/docker + settings: + registry: registry.happydomain.org + repo: registry.happydomain.org/happydomain + auto_tag: true + auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} + dockerfile: Dockerfile-builded + username: + from_secret: docker_username + password: + from_secret: docker_password + +- name: publish on Docker Hub image: plugins/docker settings: repo: happydns/happydomain @@ -560,7 +588,20 @@ steps: event: - tag -- name: publish +- name: publish on local registry + image: plugins/docker + settings: + registry: registry.happydomain.org + repo: registry.happydomain.org/happydomain + auto_tag: true + auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} + dockerfile: Dockerfile-builded + username: + from_secret: docker_username + password: + from_secret: docker_password + +- name: publish on Docker Hub image: plugins/docker settings: repo: happydns/happydomain @@ -583,7 +624,18 @@ kind: pipeline name: docker-manifest steps: -- name: publish +- name: publish on local registry + image: plugins/manifest + settings: + auto_tag: true + ignore_missing: true + spec: .drone-manifest-local.yml + username: + from_secret: docker_username + password: + from_secret: docker_password + +- name: publish on Docker Hub image: plugins/manifest settings: auto_tag: true