Compare commits
1 Commits
master
...
5a58b50ad8
Author | SHA1 | Date | |
---|---|---|---|
5a58b50ad8 |
686
.drone.yml
686
.drone.yml
@ -3,42 +3,35 @@ kind: pipeline
|
||||
type: kubernetes
|
||||
name: linter
|
||||
|
||||
clone:
|
||||
disable: true
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: amd64
|
||||
|
||||
steps:
|
||||
- name: clone
|
||||
image: git.cryptic.systems/volker.raschek/git:1.4.0
|
||||
|
||||
- name: markdown lint
|
||||
commands:
|
||||
- markdownlint *.md
|
||||
image: git.cryptic.systems/volker.raschek/markdownlint:0.43.0
|
||||
image: docker.io/tmknom/markdownlint:0.23.1
|
||||
resources:
|
||||
limits:
|
||||
cpu: 150
|
||||
memory: 150M
|
||||
cpu: 50
|
||||
memory: 50M
|
||||
|
||||
- name: email-notification
|
||||
environment:
|
||||
SMTP_FROM_ADDRESS:
|
||||
from_secret: smtp_from_address
|
||||
SMTP_FROM_NAME:
|
||||
from_secret: smtp_from_name
|
||||
SMTP_HOST:
|
||||
PLUGIN_HOST:
|
||||
from_secret: smtp_host
|
||||
SMTP_USERNAME:
|
||||
PLUGIN_USERNAME:
|
||||
from_secret: smtp_username
|
||||
SMTP_PASSWORD:
|
||||
PLUGIN_PASSWORD:
|
||||
from_secret: smtp_password
|
||||
image: git.cryptic.systems/volker.raschek/drone-email:0.1.5
|
||||
PLUGIN_FROM:
|
||||
from_secret: smtp_mail_address
|
||||
image: docker.io/drillster/drone-email:latest
|
||||
resources:
|
||||
limits:
|
||||
cpu: 150
|
||||
memory: 150M
|
||||
cpu: 50
|
||||
memory: 25M
|
||||
when:
|
||||
status:
|
||||
- changed
|
||||
@ -48,616 +41,181 @@ trigger:
|
||||
event:
|
||||
exclude:
|
||||
- tag
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: dry-run-amd64
|
||||
|
||||
clone:
|
||||
disable: true
|
||||
|
||||
depends_on:
|
||||
- linter
|
||||
name: build-latest
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: amd64
|
||||
|
||||
steps:
|
||||
- name: clone
|
||||
image: git.cryptic.systems/volker.raschek/git:1.4.0
|
||||
|
||||
- name: build
|
||||
image: docker.io/plugins/docker:20.18.6
|
||||
settings:
|
||||
auto_tag: false
|
||||
dockerfile: Dockerfile
|
||||
dry_run: true
|
||||
force_tag: true
|
||||
no_cache: true
|
||||
purge: true
|
||||
mirror:
|
||||
from_secret: docker_io_mirror
|
||||
registry: git.cryptic.systems
|
||||
repo: git.cryptic.systems/volker.raschek/postfixadmin
|
||||
tags: latest-amd64
|
||||
username:
|
||||
from_secret: git_cryptic_systems_container_registry_user
|
||||
password:
|
||||
from_secret: git_cryptic_systems_container_registry_password
|
||||
|
||||
- name: email-notification
|
||||
environment:
|
||||
SMTP_FROM_ADDRESS:
|
||||
from_secret: smtp_from_address
|
||||
SMTP_FROM_NAME:
|
||||
from_secret: smtp_from_name
|
||||
SMTP_HOST:
|
||||
from_secret: smtp_host
|
||||
SMTP_USERNAME:
|
||||
from_secret: smtp_username
|
||||
SMTP_PASSWORD:
|
||||
from_secret: smtp_password
|
||||
image: git.cryptic.systems/volker.raschek/drone-email:0.1.5
|
||||
when:
|
||||
status:
|
||||
- changed
|
||||
- failure
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
exclude:
|
||||
- master
|
||||
event:
|
||||
- pull_request
|
||||
- push
|
||||
repo:
|
||||
- volker.raschek/postfixadmin-docker
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: dry-run-arm64-v8
|
||||
|
||||
clone:
|
||||
disable: true
|
||||
|
||||
depends_on:
|
||||
- linter
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: arm64
|
||||
|
||||
steps:
|
||||
- name: clone
|
||||
image: git.cryptic.systems/volker.raschek/git:1.4.0
|
||||
|
||||
- name: build
|
||||
image: docker.io/plugins/docker:20.18.6
|
||||
settings:
|
||||
auto_tag: false
|
||||
dockerfile: Dockerfile
|
||||
dry_run: true
|
||||
force_tag: true
|
||||
no_cache: true
|
||||
purge: true
|
||||
mirror:
|
||||
from_secret: docker_io_mirror
|
||||
registry: git.cryptic.systems
|
||||
repo: git.cryptic.systems/volker.raschek/postfixadmin
|
||||
tags: latest-arm64-v8
|
||||
username:
|
||||
from_secret: git_cryptic_systems_container_registry_user
|
||||
password:
|
||||
from_secret: git_cryptic_systems_container_registry_password
|
||||
|
||||
- name: email-notification
|
||||
environment:
|
||||
SMTP_FROM_ADDRESS:
|
||||
from_secret: smtp_from_address
|
||||
SMTP_FROM_NAME:
|
||||
from_secret: smtp_from_name
|
||||
SMTP_HOST:
|
||||
from_secret: smtp_host
|
||||
SMTP_USERNAME:
|
||||
from_secret: smtp_username
|
||||
SMTP_PASSWORD:
|
||||
from_secret: smtp_password
|
||||
image: git.cryptic.systems/volker.raschek/drone-email:0.1.5
|
||||
when:
|
||||
status:
|
||||
- changed
|
||||
- failure
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
exclude:
|
||||
- master
|
||||
event:
|
||||
- pull_request
|
||||
- push
|
||||
repo:
|
||||
- volker.raschek/postfixadmin-docker
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: latest-amd64
|
||||
|
||||
clone:
|
||||
disable: true
|
||||
|
||||
depends_on:
|
||||
- linter
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: amd64
|
||||
|
||||
steps:
|
||||
- name: clone
|
||||
image: git.cryptic.systems/volker.raschek/git:1.4.0
|
||||
|
||||
- name: build
|
||||
image: docker.io/plugins/docker:20.18.6
|
||||
settings:
|
||||
auto_tag: false
|
||||
dockerfile: Dockerfile
|
||||
force_tag: true
|
||||
no_cache: true
|
||||
purge: true
|
||||
mirror:
|
||||
from_secret: docker_io_mirror
|
||||
registry: git.cryptic.systems
|
||||
repo: git.cryptic.systems/volker.raschek/postfixadmin
|
||||
tags: latest-amd64
|
||||
username:
|
||||
from_secret: git_cryptic_systems_container_registry_user
|
||||
password:
|
||||
from_secret: git_cryptic_systems_container_registry_password
|
||||
|
||||
- name: email-notification
|
||||
environment:
|
||||
SMTP_FROM_ADDRESS:
|
||||
from_secret: smtp_from_address
|
||||
SMTP_FROM_NAME:
|
||||
from_secret: smtp_from_name
|
||||
SMTP_HOST:
|
||||
from_secret: smtp_host
|
||||
SMTP_USERNAME:
|
||||
from_secret: smtp_username
|
||||
SMTP_PASSWORD:
|
||||
from_secret: smtp_password
|
||||
image: git.cryptic.systems/volker.raschek/drone-email:0.1.5
|
||||
when:
|
||||
status:
|
||||
- changed
|
||||
- failure
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
- master
|
||||
event:
|
||||
- cron
|
||||
- push
|
||||
repo:
|
||||
- volker.raschek/postfixadmin-docker
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: latest-arm64-v8
|
||||
|
||||
clone:
|
||||
disable: true
|
||||
|
||||
depends_on:
|
||||
- linter
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: arm64
|
||||
|
||||
steps:
|
||||
- name: clone
|
||||
image: git.cryptic.systems/volker.raschek/git:1.4.0
|
||||
|
||||
- name: build
|
||||
image: docker.io/plugins/docker:20.18.6
|
||||
settings:
|
||||
auto_tag: false
|
||||
dockerfile: Dockerfile
|
||||
force_tag: true
|
||||
no_cache: true
|
||||
purge: true
|
||||
mirror:
|
||||
from_secret: docker_io_mirror
|
||||
registry: git.cryptic.systems
|
||||
repo: git.cryptic.systems/volker.raschek/postfixadmin
|
||||
tags: latest-arm64-v8
|
||||
username:
|
||||
from_secret: git_cryptic_systems_container_registry_user
|
||||
password:
|
||||
from_secret: git_cryptic_systems_container_registry_password
|
||||
|
||||
- name: email-notification
|
||||
environment:
|
||||
SMTP_FROM_ADDRESS:
|
||||
from_secret: smtp_from_address
|
||||
SMTP_FROM_NAME:
|
||||
from_secret: smtp_from_name
|
||||
SMTP_HOST:
|
||||
from_secret: smtp_host
|
||||
SMTP_USERNAME:
|
||||
from_secret: smtp_username
|
||||
SMTP_PASSWORD:
|
||||
from_secret: smtp_password
|
||||
image: git.cryptic.systems/volker.raschek/drone-email:0.1.5
|
||||
when:
|
||||
status:
|
||||
- changed
|
||||
- failure
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
- master
|
||||
event:
|
||||
- cron
|
||||
- push
|
||||
repo:
|
||||
- volker.raschek/postfixadmin-docker
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: kubernetes
|
||||
name: latest-manifest
|
||||
|
||||
clone:
|
||||
disable: true
|
||||
|
||||
depends_on:
|
||||
- latest-amd64
|
||||
- latest-arm64-v8
|
||||
|
||||
# docker.io/plugins/manifest only for amd64 architectures available
|
||||
node_selector:
|
||||
kubernetes.io/os: linux
|
||||
kubernetes.io/arch: amd64
|
||||
|
||||
steps:
|
||||
- name: clone
|
||||
image: git.cryptic.systems/volker.raschek/git:1.4.0
|
||||
|
||||
- name: build-manifest
|
||||
image: docker.io/plugins/manifest:1.4.0
|
||||
settings:
|
||||
auto_tag: false
|
||||
ignore_missing: true
|
||||
spec: manifest.tmpl
|
||||
username:
|
||||
from_secret: git_cryptic_systems_container_registry_user
|
||||
password:
|
||||
from_secret: git_cryptic_systems_container_registry_password
|
||||
|
||||
- name: email-notification
|
||||
environment:
|
||||
SMTP_FROM_ADDRESS:
|
||||
from_secret: smtp_from_address
|
||||
SMTP_FROM_NAME:
|
||||
from_secret: smtp_from_name
|
||||
SMTP_HOST:
|
||||
from_secret: smtp_host
|
||||
SMTP_USERNAME:
|
||||
from_secret: smtp_username
|
||||
SMTP_PASSWORD:
|
||||
from_secret: smtp_password
|
||||
image: git.cryptic.systems/volker.raschek/drone-email:0.1.5
|
||||
resources:
|
||||
limits:
|
||||
cpu: 150
|
||||
memory: 150M
|
||||
when:
|
||||
status:
|
||||
- changed
|
||||
- failure
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
- master
|
||||
event:
|
||||
- cron
|
||||
- push
|
||||
repo:
|
||||
- volker.raschek/postfixadmin-docker
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: kubernetes
|
||||
name: latest-sync
|
||||
|
||||
clone:
|
||||
disable: true
|
||||
|
||||
depends_on:
|
||||
- latest-manifest
|
||||
|
||||
steps:
|
||||
- name: clone
|
||||
image: git.cryptic.systems/volker.raschek/git:1.4.0
|
||||
|
||||
- name: latest-sync
|
||||
image: docker.io/volkerraschek/build-image:latest
|
||||
commands:
|
||||
- skopeo sync --all --src=docker --src-creds=$SRC_CRED_USERNAME:$SRC_CRED_PASSWORD --dest=docker --dest-creds=$DEST_CRED_USERNAME:$DEST_CRED_PASSWORD git.cryptic.systems/volker.raschek/postfixadmin docker.io/volkerraschek
|
||||
environment:
|
||||
SRC_CRED_USERNAME:
|
||||
from_secret: git_cryptic_systems_container_registry_user
|
||||
SRC_CRED_PASSWORD:
|
||||
from_secret: git_cryptic_systems_container_registry_password
|
||||
DEST_CRED_USERNAME:
|
||||
from_secret: container_image_registry_user
|
||||
DEST_CRED_PASSWORD:
|
||||
from_secret: container_image_registry_password
|
||||
image: quay.io/skopeo/stable:v1.18.0
|
||||
- make container-image/build
|
||||
volumes:
|
||||
- name: docker_socket
|
||||
path: /var/run/docker.sock
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
|
||||
- name: email-notification
|
||||
- name: push
|
||||
image: docker.io/volkerraschek/build-image:latest
|
||||
commands:
|
||||
- make container-image/push
|
||||
environment:
|
||||
SMTP_FROM_ADDRESS:
|
||||
from_secret: smtp_from_address
|
||||
SMTP_FROM_NAME:
|
||||
from_secret: smtp_from_name
|
||||
SMTP_HOST:
|
||||
POSTFIXADMIN_IMAGE_REGISTRY_PASSWORD:
|
||||
from_secret: container_image_registry_password
|
||||
volumes:
|
||||
- name: docker_socket
|
||||
path: /var/run/docker.sock
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
repo:
|
||||
- volker.raschek/postfixadmin-docker
|
||||
|
||||
- name: delete
|
||||
image: docker.io/volkerraschek/build-image:latest
|
||||
commands:
|
||||
- make container-image/delete
|
||||
volumes:
|
||||
- name: docker_socket
|
||||
path: /var/run/docker.sock
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
|
||||
- name: notify
|
||||
image: drillster/drone-email
|
||||
environment:
|
||||
PLUGIN_HOST:
|
||||
from_secret: smtp_host
|
||||
SMTP_USERNAME:
|
||||
PLUGIN_USERNAME:
|
||||
from_secret: smtp_username
|
||||
SMTP_PASSWORD:
|
||||
PLUGIN_PASSWORD:
|
||||
from_secret: smtp_password
|
||||
image: git.cryptic.systems/volker.raschek/drone-email:0.1.5
|
||||
resources:
|
||||
limits:
|
||||
cpu: 150
|
||||
memory: 150M
|
||||
PLUGIN_FROM:
|
||||
from_secret: smtp_mail_address
|
||||
when:
|
||||
status:
|
||||
- changed
|
||||
- failure
|
||||
|
||||
volumes:
|
||||
- name: docker_socket
|
||||
host:
|
||||
path: /var/run/docker.sock
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
- master
|
||||
event:
|
||||
- cron
|
||||
- push
|
||||
repo:
|
||||
- volker.raschek/postfixadmin-docker
|
||||
exclude:
|
||||
- tag
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: tagged-amd64
|
||||
|
||||
clone:
|
||||
disable: true
|
||||
name: build-tagged
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: amd64
|
||||
|
||||
steps:
|
||||
- name: clone
|
||||
image: git.cryptic.systems/volker.raschek/git:1.4.0
|
||||
|
||||
- name: build
|
||||
image: docker.io/plugins/docker:20.18.6
|
||||
settings:
|
||||
auto_tag: true
|
||||
auto_tag_suffix: amd64
|
||||
dockerfile: Dockerfile
|
||||
force_tag: true
|
||||
no_cache: true
|
||||
purge: true
|
||||
mirror:
|
||||
from_secret: docker_io_mirror
|
||||
registry: git.cryptic.systems
|
||||
repo: git.cryptic.systems/volker.raschek/postfixadmin
|
||||
username:
|
||||
from_secret: git_cryptic_systems_container_registry_user
|
||||
password:
|
||||
from_secret: git_cryptic_systems_container_registry_password
|
||||
build_args:
|
||||
- POSTFIXADMIN_VERSION=${DRONE_TAG}
|
||||
image: docker.io/volkerraschek/build-image:latest
|
||||
commands:
|
||||
- make container-image/build POSTFIXADMIN_IMAGE_VERSION=${DRONE_TAG}
|
||||
volumes:
|
||||
- name: docker_socket
|
||||
path: /var/run/docker.sock
|
||||
|
||||
- name: email-notification
|
||||
- name: push
|
||||
image: docker.io/volkerraschek/build-image:latest
|
||||
commands:
|
||||
- make container-image/push POSTFIXADMIN_IMAGE_VERSION=${DRONE_TAG}
|
||||
environment:
|
||||
SMTP_FROM_ADDRESS:
|
||||
from_secret: smtp_from_address
|
||||
SMTP_FROM_NAME:
|
||||
from_secret: smtp_from_name
|
||||
SMTP_HOST:
|
||||
POSTFIXADMIN_IMAGE_REGISTRY_PASSWORD:
|
||||
from_secret: container_image_registry_password
|
||||
volumes:
|
||||
- name: docker_socket
|
||||
path: /var/run/docker.sock
|
||||
|
||||
- name: delete
|
||||
image: docker.io/volkerraschek/build-image:latest
|
||||
commands:
|
||||
- make container-image/delete POSTFIXADMIN_IMAGE_VERSION=${DRONE_TAG}
|
||||
volumes:
|
||||
- name: docker_socket
|
||||
path: /var/run/docker.sock
|
||||
|
||||
- name: notify
|
||||
image: drillster/drone-email
|
||||
environment:
|
||||
PLUGIN_HOST:
|
||||
from_secret: smtp_host
|
||||
SMTP_USERNAME:
|
||||
PLUGIN_USERNAME:
|
||||
from_secret: smtp_username
|
||||
SMTP_PASSWORD:
|
||||
PLUGIN_PASSWORD:
|
||||
from_secret: smtp_password
|
||||
image: git.cryptic.systems/volker.raschek/drone-email:0.1.5
|
||||
PLUGIN_FROM:
|
||||
from_secret: smtp_mail_address
|
||||
when:
|
||||
status:
|
||||
- changed
|
||||
- failure
|
||||
|
||||
volumes:
|
||||
- name: docker_socket
|
||||
host:
|
||||
path: /var/run/docker.sock
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- tag
|
||||
repo:
|
||||
- volker.raschek/postfixadmin-docker
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: tagged-arm64-v8
|
||||
|
||||
clone:
|
||||
disable: true
|
||||
type: kubernetes
|
||||
name: sync
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: arm64
|
||||
arch: amd64
|
||||
|
||||
steps:
|
||||
- name: clone
|
||||
image: git.cryptic.systems/volker.raschek/git:1.4.0
|
||||
|
||||
- name: build
|
||||
image: docker.io/plugins/docker:20.18.6
|
||||
settings:
|
||||
auto_tag: true
|
||||
auto_tag_suffix: arm64-v8
|
||||
dockerfile: Dockerfile
|
||||
force_tag: true
|
||||
no_cache: true
|
||||
purge: true
|
||||
mirror:
|
||||
from_secret: docker_io_mirror
|
||||
registry: git.cryptic.systems
|
||||
repo: git.cryptic.systems/volker.raschek/postfixadmin
|
||||
username:
|
||||
from_secret: git_cryptic_systems_container_registry_user
|
||||
password:
|
||||
from_secret: git_cryptic_systems_container_registry_password
|
||||
build_args:
|
||||
- POSTFIXADMIN_VERSION=${DRONE_TAG}
|
||||
|
||||
- name: email-notification
|
||||
environment:
|
||||
SMTP_FROM_ADDRESS:
|
||||
from_secret: smtp_from_address
|
||||
SMTP_FROM_NAME:
|
||||
from_secret: smtp_from_name
|
||||
SMTP_HOST:
|
||||
from_secret: smtp_host
|
||||
SMTP_USERNAME:
|
||||
from_secret: smtp_username
|
||||
SMTP_PASSWORD:
|
||||
from_secret: smtp_password
|
||||
image: git.cryptic.systems/volker.raschek/drone-email:0.1.5
|
||||
when:
|
||||
status:
|
||||
- changed
|
||||
- failure
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- tag
|
||||
repo:
|
||||
- volker.raschek/postfixadmin-docker
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: kubernetes
|
||||
name: tagged-manifest
|
||||
|
||||
clone:
|
||||
disable: true
|
||||
|
||||
depends_on:
|
||||
- tagged-amd64
|
||||
- tagged-arm64-v8
|
||||
|
||||
# docker.io/plugins/manifest only for amd64 architectures available
|
||||
node_selector:
|
||||
kubernetes.io/os: linux
|
||||
kubernetes.io/arch: amd64
|
||||
|
||||
steps:
|
||||
- name: clone
|
||||
image: git.cryptic.systems/volker.raschek/git:1.4.0
|
||||
|
||||
- name: build-manifest
|
||||
image: docker.io/plugins/manifest:1.4.0
|
||||
settings:
|
||||
auto_tag: true
|
||||
ignore_missing: true
|
||||
spec: manifest.tmpl
|
||||
username:
|
||||
from_secret: git_cryptic_systems_container_registry_user
|
||||
password:
|
||||
from_secret: git_cryptic_systems_container_registry_password
|
||||
|
||||
- name: email-notification
|
||||
environment:
|
||||
SMTP_FROM_ADDRESS:
|
||||
from_secret: smtp_from_address
|
||||
SMTP_FROM_NAME:
|
||||
from_secret: smtp_from_name
|
||||
SMTP_HOST:
|
||||
from_secret: smtp_host
|
||||
SMTP_USERNAME:
|
||||
from_secret: smtp_username
|
||||
SMTP_PASSWORD:
|
||||
from_secret: smtp_password
|
||||
image: git.cryptic.systems/volker.raschek/drone-email:0.1.5
|
||||
- name: github
|
||||
image: docker.io/appleboy/drone-git-push:latest
|
||||
resources:
|
||||
limits:
|
||||
cpu: 150
|
||||
memory: 150M
|
||||
when:
|
||||
status:
|
||||
- changed
|
||||
- failure
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- tag
|
||||
repo:
|
||||
- volker.raschek/postfixadmin-docker
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: kubernetes
|
||||
name: tagged-sync
|
||||
|
||||
clone:
|
||||
disable: true
|
||||
|
||||
depends_on:
|
||||
- tagged-manifest
|
||||
|
||||
steps:
|
||||
- name: clone
|
||||
image: git.cryptic.systems/volker.raschek/git:1.4.0
|
||||
|
||||
- name: tagged-sync
|
||||
commands:
|
||||
- skopeo sync --all --src=docker --src-creds=$SRC_CRED_USERNAME:$SRC_CRED_PASSWORD --dest=docker --dest-creds=$DEST_CRED_USERNAME:$DEST_CRED_PASSWORD git.cryptic.systems/volker.raschek/postfixadmin docker.io/volkerraschek
|
||||
environment:
|
||||
SRC_CRED_USERNAME:
|
||||
from_secret: git_cryptic_systems_container_registry_user
|
||||
SRC_CRED_PASSWORD:
|
||||
from_secret: git_cryptic_systems_container_registry_password
|
||||
DEST_CRED_USERNAME:
|
||||
from_secret: container_image_registry_user
|
||||
DEST_CRED_PASSWORD:
|
||||
from_secret: container_image_registry_password
|
||||
image: quay.io/skopeo/stable:v1.18.0
|
||||
cpu: 50
|
||||
memory: 25M
|
||||
settings:
|
||||
branch: master
|
||||
remote: ssh://git@github.com/volker-raschek/postfixadmin-docker.git
|
||||
force: true
|
||||
ssh_key:
|
||||
from_secret: ssh_key
|
||||
|
||||
- name: email-notification
|
||||
environment:
|
||||
SMTP_FROM_ADDRESS:
|
||||
from_secret: smtp_from_address
|
||||
SMTP_FROM_NAME:
|
||||
from_secret: smtp_from_name
|
||||
SMTP_HOST:
|
||||
PLUGIN_HOST:
|
||||
from_secret: smtp_host
|
||||
SMTP_USERNAME:
|
||||
PLUGIN_USERNAME:
|
||||
from_secret: smtp_username
|
||||
SMTP_PASSWORD:
|
||||
PLUGIN_PASSWORD:
|
||||
from_secret: smtp_password
|
||||
image: git.cryptic.systems/volker.raschek/drone-email:0.1.5
|
||||
PLUGIN_FROM:
|
||||
from_secret: smtp_mail_address
|
||||
image: docker.io/drillster/drone-email:latest
|
||||
resources:
|
||||
limits:
|
||||
cpu: 150
|
||||
memory: 150M
|
||||
cpu: 50
|
||||
memory: 25M
|
||||
when:
|
||||
status:
|
||||
- changed
|
||||
@ -665,6 +223,6 @@ steps:
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- tag
|
||||
- push
|
||||
repo:
|
||||
- volker.raschek/postfixadmin-docker
|
||||
|
@ -128,8 +128,8 @@ MD041:
|
||||
# MD044/proper-names - Proper names should have the correct capitalization
|
||||
MD044:
|
||||
# List of proper names
|
||||
names: []
|
||||
# - PostfixAdmin
|
||||
names:
|
||||
- PostfixAdmin
|
||||
# Include code blocks
|
||||
code_blocks: false
|
||||
|
||||
|
73
Dockerfile
73
Dockerfile
@ -1,7 +1,8 @@
|
||||
FROM docker.io/library/php:7.4-apache
|
||||
|
||||
# POSTFIXADMIN VERSION
|
||||
ARG POSTFIXADMIN_VERSION
|
||||
ARG POSTFIXADMIN_VERSION \
|
||||
POSTFIXADMIN_SHA512
|
||||
|
||||
# APACHE
|
||||
ENV APACHE_DOCUMENT_ROOT /var/www/html/public
|
||||
@ -23,47 +24,45 @@ ENV POSTFIXADMIN_DATABASE_TYPE=sqlite \
|
||||
# docker-entrypoint.sh dependencies
|
||||
RUN set -eux; \
|
||||
apt-get update; \
|
||||
apt-get install --yes --no-install-recommends gosu apache2-utils; \
|
||||
apt-get install --yes --no-install-recommends gosu; \
|
||||
rm --recursive --force /var/lib/apt/lists/*
|
||||
|
||||
# Install required PHP extensions
|
||||
RUN set -ex; \
|
||||
savedAptMark="$(apt-mark showmanual)"; \
|
||||
apt-get update; \
|
||||
apt-get install --yes --no-install-recommends \
|
||||
libc-client2007e-dev \
|
||||
libkrb5-dev \
|
||||
libpq-dev \
|
||||
libsqlite3-dev; \
|
||||
docker-php-ext-configure imap --with-imap-ssl --with-kerberos; \
|
||||
docker-php-ext-install -j "$(nproc)" \
|
||||
imap \
|
||||
pdo_mysql \
|
||||
pdo_pgsql \
|
||||
pdo_sqlite \
|
||||
pgsql; \
|
||||
apt-mark auto '.*' > /dev/null; \
|
||||
apt-mark manual $savedAptMark; \
|
||||
ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
|
||||
| awk '/=>/ { print $3 }' \
|
||||
| sort -u \
|
||||
| xargs -r dpkg-query -S \
|
||||
| cut -d: -f1 \
|
||||
| sort -u \
|
||||
| xargs -rt apt-mark manual; \
|
||||
if [ ! -z ${POSTFIXADMIN_VERSION} ]; then \
|
||||
curl --fail --silent --show-error --location "https://github.com/postfixadmin/postfixadmin/archive/postfixadmin-${POSTFIXADMIN_VERSION}.tar.gz" --output postfixadmin.tar.gz; \
|
||||
tar --extract --file postfixadmin.tar.gz --directory /var/www/html --strip-components=1; \
|
||||
rm postfixadmin.tar.gz; \
|
||||
else \
|
||||
apt-get install --yes git; \
|
||||
git clone https://github.com/postfixadmin/postfixadmin.git /var/www/html; \
|
||||
fi; \
|
||||
apt-get purge --yes --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
|
||||
rm --recursive --force /var/lib/apt/lists/*
|
||||
savedAptMark="$(apt-mark showmanual)"; \
|
||||
apt-get update; \
|
||||
apt-get install --yes --no-install-recommends \
|
||||
libc-client2007e-dev \
|
||||
libkrb5-dev \
|
||||
libpq-dev \
|
||||
libsqlite3-dev; \
|
||||
docker-php-ext-configure imap --with-imap-ssl --with-kerberos; \
|
||||
docker-php-ext-install -j "$(nproc)" \
|
||||
imap \
|
||||
pdo_mysql \
|
||||
pdo_pgsql \
|
||||
pdo_sqlite \
|
||||
pgsql; \
|
||||
apt-mark auto '.*' > /dev/null; \
|
||||
apt-mark manual $savedAptMark; \
|
||||
ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
|
||||
| awk '/=>/ { print $3 }' \
|
||||
| sort -u \
|
||||
| xargs -r dpkg-query -S \
|
||||
| cut -d: -f1 \
|
||||
| sort -u \
|
||||
| xargs -rt apt-mark manual; \
|
||||
apt-get purge --yes --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
|
||||
rm --recursive --force /var/lib/apt/lists/*
|
||||
|
||||
RUN mkdir --parents /var/www/html/templates_c; \
|
||||
chown --recursive www-data:www-data /var/www/html
|
||||
RUN set -eu; \
|
||||
curl --fail --silent --show-error --location "https://github.com/postfixadmin/postfixadmin/archive/postfixadmin-${POSTFIXADMIN_VERSION}.tar.gz" --output postfixadmin.tar.gz ; \
|
||||
echo "${POSTFIXADMIN_SHA512} *postfixadmin.tar.gz" | sha512sum -c -; \
|
||||
tar --extract --file postfixadmin.tar.gz --directory /var/www/html --strip-components=1; \
|
||||
rm postfixadmin.tar.gz; \
|
||||
# Does not exist in tarball but is required
|
||||
mkdir --parents /var/www/html/templates_c; \
|
||||
chown --recursive www-data:www-data /var/www/html
|
||||
|
||||
COPY entrypoint.sh /usr/local/bin/
|
||||
|
||||
|
44
Makefile
44
Makefile
@ -1,50 +1,52 @@
|
||||
# POSTFIXADMIN_VERSION
|
||||
# Only required to install a specify version
|
||||
POSTFIXADMIN_VERSION?=3.3.15 # renovate: datasource=github-tags depName=postfixadmin/postfixadmin extractVersion='postfixadmin-(?<version>\\d+\\.\\d+\\.\\d+)$'
|
||||
POSTFIXADMIN_VERSION:=3.2.4
|
||||
POSTFIXADMIN_SHA512:=2bd7ae05addbaf3c6c7eebea16ec1e21b2c67c8e6161446ed82a9553c26c04e19c1ec9ce248a9b9df504df56d309590259e6f04907b04b593548028b40e40d47
|
||||
|
||||
# PODMAN_BIN's and tools
|
||||
PODMAN_BIN?=$(shell which podman)
|
||||
# CONTAINER_RUNTIME
|
||||
# The CONTAINER_RUNTIME variable will be used to specified the path to a
|
||||
# container runtime. This is needed to start and run a container image.
|
||||
CONTAINER_RUNTIME?=$(shell which docker)
|
||||
|
||||
# POSTFIXADMIN_IMAGE
|
||||
POSTFIXADMIN_IMAGE_REGISTRY_HOST?=git.cryptic.systems
|
||||
POSTFIXADMIN_IMAGE_REPOSITORY?=volker.raschek/postfixadmin
|
||||
# POSTFIXADMIN_IMAGE_REGISTRY_NAME
|
||||
# Defines the name of the new container to be built using several variables.
|
||||
POSTFIXADMIN_IMAGE_REGISTRY_NAME:=docker.io
|
||||
POSTFIXADMIN_IMAGE_REGISTRY_USER:=volkerraschek
|
||||
|
||||
POSTFIXADMIN_IMAGE_NAMESPACE?=${POSTFIXADMIN_IMAGE_REGISTRY_USER}
|
||||
POSTFIXADMIN_IMAGE_NAME:=postfixadmin
|
||||
POSTFIXADMIN_IMAGE_VERSION?=latest
|
||||
POSTFIXADMIN_IMAGE_FULLY_QUALIFIED=${POSTFIXADMIN_IMAGE_REGISTRY_HOST}/${POSTFIXADMIN_IMAGE_REPOSITORY}:${POSTFIXADMIN_IMAGE_VERSION}
|
||||
POSTFIXADMIN_IMAGE_FULLY_QUALIFIED=${POSTFIXADMIN_IMAGE_REGISTRY_NAME}/${POSTFIXADMIN_IMAGE_NAMESPACE}/${POSTFIXADMIN_IMAGE_NAME}:${POSTFIXADMIN_IMAGE_VERSION}
|
||||
POSTFIXADMIN_IMAGE_UNQUALIFIED=${POSTFIXADMIN_IMAGE_NAMESPACE}/${POSTFIXADMIN_IMAGE_NAME}:${POSTFIXADMIN_IMAGE_VERSION}
|
||||
|
||||
# BUILD CONTAINER IMAGE
|
||||
# ==============================================================================
|
||||
PHONY:=container-image/build
|
||||
container-image/build:
|
||||
${PODMAN_BIN} build \
|
||||
${CONTAINER_RUNTIME} build \
|
||||
--build-arg POSTFIXADMIN_VERSION=${POSTFIXADMIN_VERSION} \
|
||||
--build-arg POSTFIXADMIN_SHA512=${POSTFIXADMIN_SHA512} \
|
||||
--file Dockerfile \
|
||||
--no-cache \
|
||||
--pull \
|
||||
--tag ${POSTFIXADMIN_IMAGE_FULLY_QUALIFIED} \
|
||||
--tag ${POSTFIXADMIN_IMAGE_UNQUALIFIED} \
|
||||
.
|
||||
|
||||
# DELETE CONTAINER IMAGE
|
||||
# ==============================================================================
|
||||
PHONY:=container-image/delete
|
||||
container-image/delete:
|
||||
- ${PODMAN_BIN} image rm ${POSTFIXADMIN_IMAGE_FULLY_QUALIFIED}
|
||||
- ${CONTAINER_RUNTIME} image rm ${POSTFIXADMIN_IMAGE_FULLY_QUALIFIED} ${POSTFIXADMIN_IMAGE_UNQUALIFIED}
|
||||
- ${CONTAINER_RUNTIME} image rm ${PHP_IMAGE_FULL}
|
||||
|
||||
# PUSH CONTAINER IMAGE
|
||||
# ==============================================================================
|
||||
PHONY+=container-image/push
|
||||
container-image/push:
|
||||
echo ${POSTFIXADMIN_IMAGE_REGISTRY_PASSWORD} | ${PODMAN_BIN} login ${POSTFIXADMIN_IMAGE_REGISTRY_NAME} --username ${POSTFIXADMIN_IMAGE_REGISTRY_USER} --password-stdin
|
||||
${PODMAN_BIN} push ${POSTFIXADMIN_IMAGE_FULLY_QUALIFIED}
|
||||
${PODMAN_BIN} logout ${POSTFIXADMIN_IMAGE_REGISTRY_HOST}
|
||||
|
||||
# PUSH CONTAINER IMAGE TO DOCKER
|
||||
# ==============================================================================
|
||||
PHONY+=container-image/push-to-docker-daemon
|
||||
container-image/push-to-docker-daemon:
|
||||
${PODMAN_BIN} push ${POSTFIXADMIN_IMAGE_FULLY_QUALIFIED} docker-daemon:${POSTFIXADMIN_IMAGE_FULLY_QUALIFIED}
|
||||
echo ${POSTFIXADMIN_IMAGE_REGISTRY_PASSWORD} | ${CONTAINER_RUNTIME} login ${POSTFIXADMIN_IMAGE_REGISTRY_NAME} --username ${POSTFIXADMIN_IMAGE_REGISTRY_USER} --password-stdin
|
||||
${CONTAINER_RUNTIME} push ${POSTFIXADMIN_IMAGE_FULLY_QUALIFIED}
|
||||
|
||||
# PHONY
|
||||
# ==============================================================================
|
||||
# Declare the contents of the PHONY variable as phony. We keep that information
|
||||
# in a variable so we can use it in if_changed.
|
||||
.PHONY: ${PHONY}
|
||||
.PHONY: ${PHONY}
|
79
README.md
79
README.md
@ -23,31 +23,26 @@ prefix `POSTFIXADMIN_`. You can take an example
|
||||
[configuration](https://github.com/postfixadmin/postfixadmin/blob/master/config.inc.php)
|
||||
from the upstream project.
|
||||
|
||||
| name | default |
|
||||
| ----------------------------------- | ------------------------------------------- |
|
||||
| `POSTFIXADMIN_ADMIN_EMAIL` | |
|
||||
| `POSTFIXADMIN_ADMIN_SMTP_PASSWORD` | |
|
||||
| `POSTFIXADMIN_ADMIN_NAME` | |
|
||||
| `POSTFIXADMIN_DATABASE_TYPE` | `sqlite` |
|
||||
| `POSTFIXADMIN_DATABASE_USER` | |
|
||||
| `POSTFIXADMIN_DATABASE_PASSWORD` | |
|
||||
| `POSTFIXADMIN_DATABASE_HOST` | |
|
||||
| `POSTFIXADMIN_DATABASE_PORT` | |
|
||||
| `POSTFIXADMIN_DATABASE_NAME` | `/var/tmp/postfixadmin.db` |
|
||||
| `POSTFIXADMIN_DEFAULT_LANGUAGE` | `en` |
|
||||
| `POSTFIXADMIN_DATABASE_USE_SSL` | |
|
||||
| `POSTFIXADMIN_DATABASE_KEY` | |
|
||||
| `POSTFIXADMIN_DATABASE_CERT` | |
|
||||
| `POSTFIXADMIN_DATABASE_CA` | |
|
||||
| `POSTFIXADMIN_DATABASE_PREFIX` | |
|
||||
| `POSTFIXADMIN_ENCRYPT` | `md5crypt` |
|
||||
| `POSTFIXADMIN_SMTP_SERVER` | `localhost` |
|
||||
| `POSTFIXADMIN_SMTP_PORT` | `25` |
|
||||
| `POSTFIXADMIN_SMTP_CLIENT` | |
|
||||
| `POSTFIXADMIN_SHOW_FOOTER_TEXT` | `YES` |
|
||||
| `POSTFIXADMIN_FOOTER_TEXT` | `Return to change-this-to-your.domain.tld` |
|
||||
| `POSTFIXADMIN_FOOTER_LINK` | `http://change-this-to-your.domain.tld` |
|
||||
| `POSTFIXADMIN_FETCHMAIL` | `YES` |
|
||||
| name | default |
|
||||
| ----------------------------------- | --------------------------- |
|
||||
| `POSTFIXADMIN_ADMIN_EMAIL` | |
|
||||
| `POSTFIXADMIN_ADMIN_SMTP_PASSWORD` | |
|
||||
| `POSTFIXADMIN_ADMIN_NAME` | |
|
||||
| `POSTFIXADMIN_DATABASE_TYPE` | `sqlite` |
|
||||
| `POSTFIXADMIN_DATABASE_USER` | |
|
||||
| `POSTFIXADMIN_DATABASE_PASSWORD` | |
|
||||
| `POSTFIXADMIN_DATABASE_HOST` | |
|
||||
| `POSTFIXADMIN_DATABASE_PORT` | |
|
||||
| `POSTFIXADMIN_DATABASE_NAME` | `/var/tmp/postfixadmin.db` |
|
||||
| `POSTFIXADMIN_DEFAULT_LANGUAGE` | `en` |
|
||||
| `POSTFIXADMIN_DATABASE_USE_SSL` | |
|
||||
| `POSTFIXADMIN_DATABASE_KEY` | |
|
||||
| `POSTFIXADMIN_DATABASE_CERT` | |
|
||||
| `POSTFIXADMIN_DATABASE_CA` | |
|
||||
| `POSTFIXADMIN_DATABASE_PREFIX` | |
|
||||
| `POSTFIXADMIN_ENCRYPT` | `md5crypt` |
|
||||
| `POSTFIXADMIN_SMTP_SERVER` | `localhost` |
|
||||
| `POSTFIXADMIN_SMTP_PORT` | `25` |
|
||||
|
||||
### POSTFIXADMIN_ADMIN_EMAIL
|
||||
|
||||
@ -178,35 +173,5 @@ are documented
|
||||
### POSTFIXADMIN_SETUP_PASSWORD
|
||||
|
||||
To login into the `setup.php` page is the setup password required. This can be
|
||||
defined via the variable `POSTFIXADMIN_SETUP_PASSWORD`. The password will be
|
||||
hashed via bcrypt and used as value for the setting `$CONF['setup_password']` in
|
||||
the config file `config.local.php`.
|
||||
|
||||
### POSTFIXADMIN_SMTP_CLIENT
|
||||
|
||||
Hostname (FQDN) of the server hosting PostfixAdmin used in the `HELO` when
|
||||
sending emails from PostfixAdmin. The value of the environment will be
|
||||
configured as the following config setting and is empty by default:
|
||||
`$CONF['smtp_client']`.
|
||||
|
||||
### POSTFIXADMIN_SMTP_SERVER
|
||||
|
||||
Hostname (FQDN) of your mail server. The default value is `localhost`. The value
|
||||
of the environment will be configured as the following config setting:
|
||||
`$CONF['smtp_server']`.
|
||||
|
||||
### POSTFIXADMIN_SMTP_PORT
|
||||
|
||||
Port of your mail server. The default value is `25`. The value of the
|
||||
environment will be configured as the following config setting:
|
||||
`$CONF['smtp_port']`.
|
||||
|
||||
### POSTFIXADMIN_SHOW_FOOTER_TEXT
|
||||
|
||||
Enable or disable via `YES` or `NO` the footer text displayed on all sites. Use
|
||||
`POSTFIXADMIN_FOOTER_TEXT` and `POSTFIX_FOOTER_LINK` to customize the text.
|
||||
|
||||
### POSTFIXADMIN_FETCHMAIL
|
||||
|
||||
Enable or disable via `YES` or `NO` the fetchmail tab. It has nothing todo with
|
||||
the fetchmail cron job.
|
||||
defined via the variable `POSTFIXADMIN_SETUP_PASSWORD`. The password will not be
|
||||
configured in the `config.local.php` as plain text. It will be encrypted.
|
||||
|
@ -40,10 +40,6 @@ if [ "${POSTFIXADMIN_DATABASE_TYPE}" = 'sqlite' ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# bycrypt POSTFIXADMIN_SETUP_PASSWORD
|
||||
if [ ! -z ${POSTFIXADMIN_SETUP_PASSWORD+x} ]; then
|
||||
POSTFIXADMIN_SETUP_PASSWORD=$(htpasswd -bnBC 10 "" "${POSTFIXADMIN_SETUP_PASSWORD}" | tr -d ':\n')
|
||||
fi
|
||||
|
||||
# create config.local.pgp with vaules from env with POSTFIXADMIN_ prefix
|
||||
POSTFIXADMIN_ENV_VARS=($(env | sort | grep --perl-regexp '^POSTFIXADMIN_.*'))
|
||||
|
@ -1,20 +0,0 @@
|
||||
image: git.cryptic.systems/volker.raschek/postfixadmin:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
|
||||
{{#if build.tags}}
|
||||
tags:
|
||||
{{#each build.tags}}
|
||||
- {{this}}
|
||||
{{/each}}
|
||||
- "latest"
|
||||
{{/if}}
|
||||
manifests:
|
||||
-
|
||||
image: git.cryptic.systems/volker.raschek/postfixadmin:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}-amd64
|
||||
platform:
|
||||
architecture: amd64
|
||||
os: linux
|
||||
-
|
||||
image: git.cryptic.systems/volker.raschek/postfixadmin:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}-arm64-v8
|
||||
platform:
|
||||
architecture: arm64
|
||||
os: linux
|
||||
variant: v8
|
@ -1,9 +0,0 @@
|
||||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"extends": [
|
||||
"local>volker.raschek/renovate-config:default#master",
|
||||
"local>volker.raschek/renovate-config:container#master",
|
||||
"local>volker.raschek/renovate-config:actions#master",
|
||||
"local>volker.raschek/renovate-config:regexp#master"
|
||||
]
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user