initial commit
This commit is contained in:
commit
69a2511237
6 changed files with 181 additions and 0 deletions
35
.woodpecker/.build.yaml
Normal file
35
.woodpecker/.build.yaml
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
steps:
|
||||||
|
- name: docker
|
||||||
|
image: woodpeckerci/plugin-docker-buildx
|
||||||
|
privileged: true
|
||||||
|
settings:
|
||||||
|
registry: git.ar21.de
|
||||||
|
username:
|
||||||
|
from_secret: REGISTRY_USER
|
||||||
|
password:
|
||||||
|
from_secret: REGISTRY_PASS
|
||||||
|
repo: git.ar21.de/${CI_REPO}
|
||||||
|
tags:
|
||||||
|
- latest
|
||||||
|
- ${CI_PIPELINE_NUMBER}
|
||||||
|
when:
|
||||||
|
- branch: main
|
||||||
|
event: [push, manual]
|
||||||
|
- name: docker-build
|
||||||
|
image: woodpeckerci/plugin-docker-buildx
|
||||||
|
privileged: true
|
||||||
|
settings:
|
||||||
|
registry: git.ar21.de
|
||||||
|
username:
|
||||||
|
from_secret: REGISTRY_USER
|
||||||
|
password:
|
||||||
|
from_secret: REGISTRY_PASS
|
||||||
|
repo: git.ar21.de/${CI_REPO}
|
||||||
|
tags:
|
||||||
|
- testing-${CI_PIPELINE_NUMBER}
|
||||||
|
when:
|
||||||
|
- branch:
|
||||||
|
exclude: main
|
||||||
|
event: [push, manual]
|
||||||
|
depends_on:
|
||||||
|
- lint
|
115
.woodpecker/.deploy.yaml
Normal file
115
.woodpecker/.deploy.yaml
Normal file
|
@ -0,0 +1,115 @@
|
||||||
|
skip_clone: true
|
||||||
|
steps:
|
||||||
|
- name: bump tag in deployment-repo (prod)
|
||||||
|
image: git.ar21.de/aaron/kustomize-ci
|
||||||
|
commands:
|
||||||
|
- git clone https://git.ar21.de/aaron/deploymentrepo.git deployment-repo
|
||||||
|
- cd deployment-repo/testapp/overlays/prod
|
||||||
|
- kustomize edit set image git.ar21.de/aaron/testapp=git.ar21.de/aaron/testapp:${CI_PIPELINE_NUMBER}
|
||||||
|
when:
|
||||||
|
- branch: main
|
||||||
|
event: push
|
||||||
|
- name: bump tag in deployment-repo (testing)
|
||||||
|
image: git.ar21.de/aaron/kustomize-ci
|
||||||
|
commands:
|
||||||
|
- git clone https://git.ar21.de/aaron/deploymentrepo.git deployment-repo
|
||||||
|
- cd deployment-repo/testapp/overlays/testing
|
||||||
|
- kustomize edit set image git.ar21.de/aaron/testapp=git.ar21.de/aaron/testapp:testing-${CI_PIPELINE_NUMBER}
|
||||||
|
when:
|
||||||
|
- branch:
|
||||||
|
exclude: main
|
||||||
|
event: push
|
||||||
|
- name: push new tag to deployment-repo (prod)
|
||||||
|
image: appleboy/drone-git-push
|
||||||
|
settings:
|
||||||
|
branch: "${CI_PIPELINE_NUMBER}_testapp_prod"
|
||||||
|
remote: ssh://git@git.ar21.de:2222/aaron/deploymentrepo.git
|
||||||
|
path: deployment-repo
|
||||||
|
force: false
|
||||||
|
commit: true
|
||||||
|
commit_message: "testapp: update image tag to ${CI_PIPELINE_NUMBER} (done automagically via Woodpecker pipeline)"
|
||||||
|
ssh_key:
|
||||||
|
from_secret: FORGEJO_SSH_KEY
|
||||||
|
when:
|
||||||
|
- branch: main
|
||||||
|
event: push
|
||||||
|
- name: push new tag to deployment-repo (staging)
|
||||||
|
image: appleboy/drone-git-push
|
||||||
|
settings:
|
||||||
|
branch: "${CI_PIPELINE_NUMBER}_testapp_staging"
|
||||||
|
remote: ssh://git@git.ar21.de:2222/aaron/deploymentrepo.git
|
||||||
|
path: deployment-repo
|
||||||
|
force: false
|
||||||
|
commit: true
|
||||||
|
commit_message: "testapp STAGING: update image tag to staging-${CI_PIPELINE_NUMBER} (done automagically via Woodpecker pipeline)"
|
||||||
|
ssh_key:
|
||||||
|
from_secret: FORGEJO_SSH_KEY
|
||||||
|
when:
|
||||||
|
- branch:
|
||||||
|
exclude: main
|
||||||
|
event: push
|
||||||
|
- name: create pull request (prod)
|
||||||
|
image: git.ar21.de/tom/push-message-randomizer:latest
|
||||||
|
pull: true
|
||||||
|
settings:
|
||||||
|
gitea_address: https://git.ar21.de
|
||||||
|
gitea_token:
|
||||||
|
from_secret: FORGEJO_API
|
||||||
|
owner: ${CI_REPO_OWNER}
|
||||||
|
repo: deploymentrepo
|
||||||
|
branch: "${CI_PIPELINE_NUMBER}_testapp_prod"
|
||||||
|
base_branch: main
|
||||||
|
pr_title: "TESTAPP: update image tag to ${CI_PIPELINE_NUMBER}"
|
||||||
|
pr_body: |
|
||||||
|
### ℹ testapp image update
|
||||||
|
|
||||||
|
{- random-pr-message -}
|
||||||
|
|
||||||
|
### Configuration
|
||||||
|
|
||||||
|
📅 **Schedule**: Branch creation - At any time, Automerge - At any time.
|
||||||
|
|
||||||
|
🚦 **Automerge**: Enabled.
|
||||||
|
skip_on_missing_branch: true
|
||||||
|
close_pr_if_empty: true
|
||||||
|
delete_branch_if_pr_empty: true
|
||||||
|
merge_when_checks_succeed: true
|
||||||
|
delete_branch_after_merge: true
|
||||||
|
when:
|
||||||
|
- branch: main
|
||||||
|
event: push
|
||||||
|
- name: create pull request (staging)
|
||||||
|
image: git.ar21.de/tom/push-message-randomizer:latest
|
||||||
|
pull: true
|
||||||
|
settings:
|
||||||
|
gitea_address: https://git.ar21.de
|
||||||
|
gitea_token:
|
||||||
|
from_secret: FORGEJO_API
|
||||||
|
owner: ${CI_REPO_OWNER}
|
||||||
|
repo: deploymentrepo
|
||||||
|
branch: "${CI_PIPELINE_NUMBER}_testapp_staging"
|
||||||
|
base_branch: main
|
||||||
|
pr_title: "TESTAPP STAGING: update image tag to ${CI_PIPELINE_NUMBER}"
|
||||||
|
pr_body: |
|
||||||
|
### ℹ testapp image update
|
||||||
|
|
||||||
|
{- random-pr-message -}
|
||||||
|
|
||||||
|
### Configuration
|
||||||
|
|
||||||
|
📅 **Schedule**: Branch creation - At any time, Automerge - At any time.
|
||||||
|
|
||||||
|
🚦 **Automerge**: Enabled.
|
||||||
|
skip_on_missing_branch: true
|
||||||
|
close_pr_if_empty: true
|
||||||
|
delete_branch_if_pr_empty: true
|
||||||
|
merge_when_checks_succeed: true
|
||||||
|
delete_branch_after_merge: true
|
||||||
|
when:
|
||||||
|
- branch:
|
||||||
|
exclude: main
|
||||||
|
event: push
|
||||||
|
depends_on:
|
||||||
|
- lint
|
||||||
|
- build
|
||||||
|
- test
|
7
.woodpecker/.lint.yaml
Normal file
7
.woodpecker/.lint.yaml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
labels:
|
||||||
|
backend: docker
|
||||||
|
steps:
|
||||||
|
- name: Lint Dockerfile
|
||||||
|
image: hadolint/hadolint:latest-alpine
|
||||||
|
commands:
|
||||||
|
- hadolint -t error Dockerfile
|
22
.woodpecker/.test.yaml
Normal file
22
.woodpecker/.test.yaml
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
skip_clone: true
|
||||||
|
labels:
|
||||||
|
backend: docker
|
||||||
|
steps:
|
||||||
|
- name: Test image (prod)
|
||||||
|
image: git.ar21.de/${CI_REPO}:${CI_PIPELINE_NUMBER}
|
||||||
|
commands:
|
||||||
|
- echo test
|
||||||
|
when:
|
||||||
|
- branch: main
|
||||||
|
event: [push, manual]
|
||||||
|
- name: Test image
|
||||||
|
image: git.ar21.de/${CI_REPO}:testing-${CI_PIPELINE_NUMBER}
|
||||||
|
commands:
|
||||||
|
- echo test
|
||||||
|
when:
|
||||||
|
- branch:
|
||||||
|
exclude: main
|
||||||
|
event: [push, manual]
|
||||||
|
depends_on:
|
||||||
|
- lint
|
||||||
|
- build
|
2
Dockerfile
Normal file
2
Dockerfile
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
FROM docker.io/openproject/openproject:14.6.3-slim
|
||||||
|
ADD https://gist.githubusercontent.com/markasoftware/f5b2e55a2c2e3abb1f9eefcdf0bfff45/raw/148c5067e30eae04f96e3233144b4404f70ade47/enterprise_token.rb /app/app/models/enterprise_token.rb
|
0
README.md
Normal file
0
README.md
Normal file
Loading…
Reference in a new issue