Compare commits

...

8 Commits

Author SHA1 Message Date
Robert Kaussow 836ca20fa5
[skip ci] fix drone-matrix template 2023-02-08 21:15:56 +01:00
Robert Kaussow c5aaf183f7
ci: switch to molecule v4
continuous-integration/drone/push Build is passing Details
2022-12-21 09:13:49 +01:00
Robert Kaussow 75cf51f19b
ci: update python images to 3.10
continuous-integration/drone/push Build is passing Details
2022-07-02 21:53:05 +02:00
Robert Kaussow 6d3a438f60
chore: switch to main as default branch
continuous-integration/drone/push Build is passing Details
2022-06-20 22:20:04 +02:00
Robert Kaussow 6363fe695e
chore: add auto-generated _docs folder to gitignore file
continuous-integration/drone/push Build is passing Details
2022-03-03 21:15:33 +01:00
Robert Kaussow 935fcff469
chore: end of the year maintenance [skip ci] 2021-12-21 10:45:12 +01:00
Robert Kaussow e6e7df77d3
fix: replace hardcoded rpc proto
continuous-integration/drone/push Build is passing Details
2021-12-07 22:20:21 +01:00
Robert Kaussow ec30230a0e
feat: add option droneci_drone_runner_labels
continuous-integration/drone/push Build is passing Details
2021-12-05 13:13:34 +01:00
8 changed files with 37 additions and 29 deletions

View File

@ -15,18 +15,18 @@ local PipelineLinting = {
},
{
name: 'python-format',
image: 'python:3.9',
image: 'python:3.11',
environment: {
PY_COLORS: 1,
},
commands: [
'pip install -qq yapf',
'[ -z "$(find . -type f -name *.py)" ] || (yapf -rd ./)',
'[ -z "$(find . -type f -name *.py)" ] || (yapf -rd ./)',
],
},
{
name: 'python-flake8',
image: 'python:3.9',
image: 'python:3.11',
environment: {
PY_COLORS: 1,
},
@ -37,7 +37,7 @@ local PipelineLinting = {
},
],
trigger: {
ref: ['refs/heads/master', 'refs/tags/**', 'refs/pull/**'],
ref: ['refs/heads/main', 'refs/tags/**', 'refs/pull/**'],
},
};
@ -58,7 +58,7 @@ local PipelineDeployment(scenario='centos7') = {
steps: [
{
name: 'ansible-molecule',
image: 'thegeeklab/molecule:3',
image: 'thegeeklab/molecule:4',
environment: {
HCLOUD_TOKEN: { from_secret: 'hcloud_token' },
},
@ -71,7 +71,7 @@ local PipelineDeployment(scenario='centos7') = {
'linting',
],
trigger: {
ref: ['refs/heads/master', 'refs/tags/**'],
ref: ['refs/heads/main', 'refs/tags/**'],
},
};
@ -107,12 +107,12 @@ local PipelineDocumentation = {
target_branch: 'docs',
},
when: {
ref: ['refs/heads/master'],
ref: ['refs/heads/main'],
},
},
],
trigger: {
ref: ['refs/heads/master', 'refs/tags/**', 'refs/pull/**'],
ref: ['refs/heads/main', 'refs/tags/**', 'refs/pull/**'],
},
depends_on: [
'testing-centos7',
@ -136,7 +136,7 @@ local PipelineNotification = {
settings: {
homeserver: { from_secret: 'matrix_homeserver' },
roomid: { from_secret: 'matrix_roomid' },
template: 'Status: **{{ build.Status }}**<br/> Build: [{{ repo.Owner }}/{{ repo.Name }}]({{ build.Link }}){{#if build.Branch}} ({{ build.Branch }}){{/if}} by {{ commit.Author }}<br/> Message: {{ commit.Message.Title }}',
template: 'Status: **{{ .Build.Status }}**<br/> Build: [{{ .Repo.Owner }}/{{ .Repo.Name }}]({{ .Build.Link }}){{ if .Build.Branch }} ({{ .Build.Branch }}){{ end }} by {{ .Commit.Author }}<br/> Message: {{ .Commit.Message.Title }}',
username: { from_secret: 'matrix_username' },
password: { from_secret: 'matrix_password' },
},
@ -147,7 +147,7 @@ local PipelineNotification = {
],
trigger: {
status: ['success', 'failure'],
ref: ['refs/heads/master', 'refs/tags/**'],
ref: ['refs/heads/main', 'refs/tags/**'],
},
};

View File

@ -13,15 +13,15 @@ steps:
- ansible-later
- name: python-format
image: python:3.9
image: python:3.11
commands:
- pip install -qq yapf
- "[ -z \"$(find . -type f -name *.py)\" ] || (yapf -rd ./)"
- "[ -z \"$(find . -type f -name *.py)\" ] || (yapf -rd ./)"
environment:
PY_COLORS: 1
- name: python-flake8
image: python:3.9
image: python:3.11
commands:
- pip install -qq flake8
- flake8
@ -30,7 +30,7 @@ steps:
trigger:
ref:
- refs/heads/master
- refs/heads/main
- refs/tags/**
- refs/pull/**
@ -51,7 +51,7 @@ workspace:
steps:
- name: ansible-molecule
image: thegeeklab/molecule:3
image: thegeeklab/molecule:4
commands:
- molecule test -s centos7
environment:
@ -60,7 +60,7 @@ steps:
trigger:
ref:
- refs/heads/master
- refs/heads/main
- refs/tags/**
depends_on:
@ -98,11 +98,11 @@ steps:
from_secret: gitea_username
when:
ref:
- refs/heads/master
- refs/heads/main
trigger:
ref:
- refs/heads/master
- refs/heads/main
- refs/tags/**
- refs/pull/**
@ -130,13 +130,13 @@ steps:
from_secret: matrix_password
roomid:
from_secret: matrix_roomid
template: "Status: **{{ build.Status }}**<br/> Build: [{{ repo.Owner }}/{{ repo.Name }}]({{ build.Link }}){{#if build.Branch}} ({{ build.Branch }}){{/if}} by {{ commit.Author }}<br/> Message: {{ commit.Message.Title }}"
template: "Status: **{{ .Build.Status }}**<br/> Build: [{{ .Repo.Owner }}/{{ .Repo.Name }}]({{ .Build.Link }}){{ if .Build.Branch }} ({{ .Build.Branch }}){{ end }} by {{ .Commit.Author }}<br/> Message: {{ .Commit.Message.Title }}"
username:
from_secret: matrix_username
trigger:
ref:
- refs/heads/master
- refs/heads/main
- refs/tags/**
status:
- success
@ -147,6 +147,6 @@ depends_on:
---
kind: signature
hmac: a7f65f928a6d6f5e426e827d38e56d426fae17d20c249fb3f17db6ad95fcc737
hmac: dd4c50b4a9cb81256ef5bfa0d071d0cec4307fe91db4fdc013c4bdf500cd4889
...

2
.gitignore vendored
View File

@ -9,3 +9,5 @@ __pycache__/
*.py[cod]
*$py.class
# ---> Docs
/_docs

View File

@ -1,6 +1,6 @@
MIT License
Copyright (c) 2021 Robert Kaussow <mail@thegeeklab.de>
Copyright (c) 2022 Robert Kaussow <mail@thegeeklab.de>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -9,8 +9,11 @@ droneci_runner_docker_restart_policy: always
droneci_runner_docker_service_stopped: False
droneci_runner_docker_capacity: 2
droneci_runner_docker_server: droneci
droneci_runner_docker_secret: myveryownsecret
droneci_drone_runner_labels: []
droneci_runner_docker_server_proto: http
droneci_runner_docker_server_host: droneci
droneci_runner_docker_server_secret: myveryownsecret
# @var droneci_runner_docker_memory_limit:example: $ "512m"
# @var droneci_runner_docker_memory_limit: $ "_unset_"

View File

@ -8,7 +8,7 @@ galaxy_info:
# @meta description: >
# [![Source Code](https://img.shields.io/badge/gitea-source%20code-blue?logo=gitea&logoColor=white)](https://gitea.rknet.org/ansible/xoxys.droneci_runner_docker)
# [![Build Status](https://img.shields.io/drone/build/ansible/xoxys.droneci_runner_docker?logo=drone&server=https%3A%2F%2Fdrone.rknet.org)](https://drone.rknet.org/ansible/xoxys.droneci_runner_docker)
# [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?label=license)](https://gitea.rknet.org/ansible/xoxys.droneci_runner_docker/src/branch/master/LICENSE)
# [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?label=license)](https://gitea.rknet.org/ansible/xoxys.droneci_runner_docker/src/branch/main/LICENSE)
#
# Setup Drone CI docker runner
# @end

View File

@ -7,4 +7,4 @@ roles:
- src: https://gitea.rknet.org/ansible/xoxys.docker_engine.git
name: xoxys.docker_engine
scm: git
version: master
version: main

View File

@ -17,10 +17,13 @@ services:
{% endif %}
privileged: true
environment:
- DRONE_RPC_PROTO=http
- DRONE_RPC_HOST={{ droneci_runner_docker_server }}
- DRONE_RPC_SECRET={{ droneci_runner_docker_secret }}
- DRONE_RPC_PROTO={{ droneci_runner_docker_server_proto }}
- DRONE_RPC_HOST={{ droneci_runner_docker_server_host }}
- DRONE_RPC_SECRET={{ droneci_runner_docker_server_secret }}
- DRONE_RUNNER_CAPACITY={{ droneci_runner_docker_capacity }}
{% if droneci_drone_runner_labels | default([]) | length > 0 %}
- DRONE_RUNNER_LABELS={{ droneci_drone_runner_labels | join(",") }}
{% endif %}
{% if droneci_runner_docker_memory_limit is defined %}
mem_limit: {{ droneci_runner_docker_memory_limit }}
{% endif %}