update pipeline
Some checks reported errors
continuous-integration/drone/push Build encountered an error

This commit is contained in:
2025-03-29 18:22:57 +01:00
parent 837235524a
commit 46585688c6
2 changed files with 107 additions and 56 deletions

View File

@@ -1,80 +1,127 @@
# .drone.yml
--- ---
kind: pipeline kind: pipeline
type: kubernetes type: docker
name: linux-amd64 name: amd64-main
platform: node_selector: # Ensure this runs on an amd64 runner
os: linux
arch: amd64 arch: amd64
node_selector: trigger: # Only run on pushes to the main branch
kubernetes.io/arch: amd64 event: [ push ]
trigger: branch: [ main ]
event:
- tag
- push
steps: steps:
- name: docker - name: build_push_amd64_latest
image: plugins/docker # Use Docker plugin to build and push image
settings:
repo: bottledpills/deluge-openvpn
tags:
- latest-linux-amd64 # Tag for amd64 variant (main branch → "latest")
username:
from_secret: docker_username # Docker registry credentials (secret)
password:
from_secret: docker_password
---
kind: pipeline
type: docker
name: arm64-main
node_selector: # Ensure this runs on an arm64 runner
arch: arm64
trigger: # Only run on pushes to the main branch
event: [ push ]
branch: [ main ]
steps:
- name: build_push_arm64_latest
image: plugins/docker image: plugins/docker
settings: settings:
dockerfile: docker/Dockerfile.amd64 repo: bottledpills/deluge-openvpn
tags:
- latest-linux-arm64 # Tag for arm64 variant (main branch → "latest")
username: username:
from_secret: docker_username from_secret: docker_username
password: password:
from_secret: docker_password from_secret: docker_password
repo: bottledpills/deluge-openvpn
auto_tag: true
auto_tag_suffix: linux-amd64
platform: 'linux/amd64'
--- ---
kind: pipeline kind: pipeline
type: kubernetes type: docker
name: linux-arm64 name: amd64-tag
platform:
os: linux
arch: arm64
node_selector: node_selector:
kubernetes.io/arch: arm64 arch: amd64
trigger: trigger: # Only run on creation of Git tags (releases)
event: event: [ tag ]
- tag
- push
steps: steps:
- name: docker - name: build_push_amd64_version
image: plugins/docker image: plugins/docker
settings: settings:
dockerfile: docker/Dockerfile.arm64 repo: bottledpills/deluge-openvpn
# Use Drone env substitution to strip the leading "v" from the tag [oai_citation_attribution:0‡docs.drone.io](https://docs.drone.io/pipeline/environment/substitution/#:~:text=,0)
tags:
- ${DRONE_TAG##v}-linux-amd64 # e.g. "v2.0.1" → "2.0.1-linux-amd64"
username: username:
from_secret: docker_username from_secret: docker_username
password: password:
from_secret: docker_password from_secret: docker_password
repo: bottledpills/deluge-openvpn
auto_tag: true
auto_tag_suffix: linux-arm64
platform: 'linux/arm64'
--- ---
kind: pipeline kind: pipeline
type: kubernetes type: docker
name: manifest name: arm64-tag
platform:
os: linux
arch: arm64
node_selector: node_selector:
kubernetes.io/arch: arm64 arch: arm64
trigger: trigger: # Only run on creation of Git tags (releases)
event: event: [ tag ]
- tag
- push
steps: steps:
- name: manifest - name: build_push_arm64_version
image: plugins/docker
settings:
repo: bottledpills/deluge-openvpn
tags:
- ${DRONE_TAG##v}-linux-arm64 # e.g. "v2.0.1" → "2.0.1-linux-arm64"
username:
from_secret: docker_username
password:
from_secret: docker_password
---
kind: pipeline
type: docker
name: manifest-main
# The manifest step can run on either architecture; we'll use amd64 for consistency
node_selector:
arch: amd64
trigger: # Run on main branch pushes (to create "latest" manifest)
event: [ push ]
branch: [ main ]
depends_on: # Wait for both arch images to be built and pushed
- amd64-main
- arm64-main
steps:
- name: push_manifest_latest
image: plugins/manifest # Drone manifest plugin to create multi-arch manifest
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
spec: docker/manifest.tmpl # Use external manifest template for tags and images
---
kind: pipeline
type: docker
name: manifest-tag
node_selector:
arch: amd64
trigger: # Run on tag events (to create versioned manifest)
event: [ tag ]
depends_on:
- amd64-tag
- arm64-tag
steps:
- name: push_manifest_version
image: plugins/manifest image: plugins/manifest
settings: settings:
spec: docker/manifest.tmpl
username: username:
from_secret: docker_username from_secret: docker_username
password: password:
from_secret: docker_password from_secret: docker_password
ignore_missing: true spec: docker/manifest.tmpl # Same template handles both latest and version tags
depends_on:
- linux-amd64
- linux-arm64

View File

@@ -1,10 +1,14 @@
# docker/manifest.tmpl
image: bottledpills/deluge-openvpn:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}} image: bottledpills/deluge-openvpn:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
manifests: manifests:
- image: bottledpills/deluge-openvpn:{{#if build.tag}}{{trimPrefix "v" build.tag}}-linux-amd64{{else}}latest-linux-amd64{{/if}} - image: bottledpills/deluge-openvpn:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
platform: platform:
architecture: amd64 architecture: amd64
os: linux os: linux
- image: bottledpills/deluge-openvpn:{{#if build.tag}}{{trimPrefix "v" build.tag}}-linux-arm64{{else}}latest-linux-arm64{{/if}}
platform: - image: bottledpills/deluge-openvpn:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64
architecture: arm64 platform:
os: linux architecture: arm64
os: linux
variant: v8