Compare commits

...

118 Commits
v0.6 ... master

Author SHA1 Message Date
Renovate Bot 92ca07a60f chore(deps): update zricethezav/gitleaks docker tag to v8.18.4 (#27)
ci/woodpecker/push/lint Pipeline was successful Details
ci/woodpecker/push/build Pipeline was successful Details
Co-authored-by: Renovate Bot <renovate@mgrote.net>
Co-committed-by: Renovate Bot <renovate@mgrote.net>
2024-06-15 02:04:20 +02:00
Renovate Bot 5bfdd75e26 chore(deps): update pipelinecomponents/hadolint docker tag to v0.26.3 (#26)
Co-authored-by: Renovate Bot <renovate@mgrote.net>
Co-committed-by: Renovate Bot <renovate@mgrote.net>
2024-06-08 02:01:52 +02:00
Renovate Bot f812f9e3d1 chore(deps): update docker docker tag to v26.1.4 (#25)
ci/woodpecker/push/lint Pipeline was successful Details
ci/woodpecker/push/build Pipeline was successful Details
Co-authored-by: Renovate Bot <renovate@mgrote.net>
Co-committed-by: Renovate Bot <renovate@mgrote.net>
2024-06-06 02:03:38 +02:00
Renovate Bot 33004e23a8 chore(deps): update zricethezav/gitleaks docker tag to v8.18.3 (#24)
ci/woodpecker/push/lint Pipeline was successful Details
ci/woodpecker/push/build Pipeline was successful Details
Co-authored-by: Renovate Bot <renovate@mgrote.net>
Co-committed-by: Renovate Bot <renovate@mgrote.net>
2024-06-03 21:23:46 +02:00
Renovate Bot cdc929da7b chore(deps): update dependency requests to v2.32.3 (#23)
ci/woodpecker/push/lint Pipeline was successful Details
ci/woodpecker/push/build Pipeline was successful Details
Co-authored-by: Renovate Bot <renovate@mgrote.net>
Co-committed-by: Renovate Bot <renovate@mgrote.net>
2024-05-30 02:01:09 +02:00
Renovate Bot 25c9f80bb7 chore(deps): update alpine docker tag to v3.20.0 (#22)
ci/woodpecker/push/lint Pipeline was successful Details
ci/woodpecker/push/build Pipeline was successful Details
Co-authored-by: Renovate Bot <renovate@mgrote.net>
Co-committed-by: Renovate Bot <renovate@mgrote.net>
2024-05-23 02:05:20 +02:00
Renovate Bot 801d0362cb chore(deps): update dependency requests to v2.32.2 (#21)
ci/woodpecker/push/lint Pipeline was successful Details
ci/woodpecker/push/build Pipeline failed Details
Co-authored-by: Renovate Bot <renovate@mgrote.net>
Co-committed-by: Renovate Bot <renovate@mgrote.net>
2024-05-22 02:04:04 +02:00
Renovate Bot 519e4d0121 chore(deps): update dependency requests to v2.32.1 (#20)
ci/woodpecker/push/lint Pipeline was successful Details
ci/woodpecker/push/build Pipeline was successful Details
Co-authored-by: Renovate Bot <renovate@mgrote.net>
Co-committed-by: Renovate Bot <renovate@mgrote.net>
2024-05-21 02:23:54 +02:00
Renovate Bot b4e6908edf chore(deps): update docker docker tag to v26.1.3 (#19)
ci/woodpecker/push/lint Pipeline was successful Details
ci/woodpecker/push/build Pipeline was successful Details
Co-authored-by: Renovate Bot <renovate@mgrote.net>
Co-committed-by: Renovate Bot <renovate@mgrote.net>
2024-05-17 02:03:22 +02:00
Renovate Bot ea5a184552 chore(deps): update pipelinecomponents/hadolint docker tag to v0.26.2 (#18)
ci/woodpecker/push/lint Pipeline was successful Details
ci/woodpecker/push/build Pipeline was successful Details
Co-authored-by: Renovate Bot <renovate@mgrote.net>
Co-committed-by: Renovate Bot <renovate@mgrote.net>
2024-05-16 02:02:02 +02:00
Michael Grote f60e4c0b60 ci: fix when cron
ci/woodpecker/push/lint Pipeline was successful Details
ci/woodpecker/push/build Pipeline was successful Details
2024-05-14 21:45:09 +02:00
Renovate Bot 4d2b4e0b2d chore(deps): update docker docker tag to v26.1.2 (#17)
ci/woodpecker/push/lint Pipeline was successful Details
ci/woodpecker/push/build Pipeline was successful Details
Co-authored-by: Renovate Bot <renovate@mgrote.net>
Co-committed-by: Renovate Bot <renovate@mgrote.net>
2024-05-11 02:03:03 +02:00
Michael Grote 208e41ee2b configure: renovatebot
ci/woodpecker/push/lint Pipeline was successful Details
ci/woodpecker/push/build Pipeline was successful Details
2024-05-08 14:58:22 +02:00
Michael Grote 9c90091625 add pylint (#15)
ci/woodpecker/push/lint Pipeline was successful Details
ci/woodpecker/push/build Pipeline was successful Details
Reviewed-on: #15
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Co-committed-by: Michael Grote <michael.grote@posteo.de>
2024-05-08 14:49:20 +02:00
Michael Grote 547d6865a7 fix linter errors
ci/woodpecker/push/lint Pipeline failed Details
ci/woodpecker/push/build unknown status Details
Signed-off-by: Michael Grote <michael.grote@posteo.de>
2024-05-08 14:19:23 +02:00
Michael Grote f0db0112b2 ci: add pylint
ci/woodpecker/push/lint Pipeline failed Details
ci/woodpecker/push/build unknown status Details
2024-05-08 14:07:10 +02:00
Michael Grote 1ca21a7f88 ci: new default workflow for images
ci/woodpecker/push/lint Pipeline was successful Details
ci/woodpecker/push/build Pipeline was successful Details
2024-05-06 23:49:55 +02:00
Renovate Bot 92df72f00d chore(deps): update dependency flask-cors to v4.0.1 (#14)
ci/woodpecker/push/lint Pipeline was successful Details
ci/woodpecker/push/build Pipeline was successful Details
Co-authored-by: Renovate Bot <renovate@mgrote.net>
Co-committed-by: Renovate Bot <renovate@mgrote.net>
2024-05-05 02:56:12 +02:00
Renovate Bot 41a847d8b2 chore(deps): update docker docker tag to v26.1.1 (#13)
ci/woodpecker/push/lint Pipeline was successful Details
ci/woodpecker/push/build Pipeline failed Details
Co-authored-by: Renovate Bot <renovate@mgrote.net>
Co-committed-by: Renovate Bot <renovate@mgrote.net>
2024-05-01 02:01:36 +02:00
Renovate Bot cdc2cac036 chore(deps): update registry.mgrote.net/allzweckcontainer docker tag to v1.1.117 (#12)
ci/woodpecker/push/lint Pipeline was successful Details
ci/woodpecker/push/build Pipeline was successful Details
ci/woodpecker/cron/lint Pipeline was successful Details
ci/woodpecker/cron/build Pipeline was successful Details
Co-authored-by: Renovate Bot <renovate@mgrote.net>
Co-committed-by: Renovate Bot <renovate@mgrote.net>
2024-04-27 02:05:35 +02:00
Renovate Bot 20c3fe2d65 chore(deps): update docker docker tag to v26.1.0 (#10)
ci/woodpecker/push/lint Pipeline failed Details
ci/woodpecker/push/build unknown status Details
Co-authored-by: Renovate Bot <renovate@mgrote.net>
Co-committed-by: Renovate Bot <renovate@mgrote.net>
2024-04-26 02:03:05 +02:00
Renovate Bot 89986ade9b chore(deps): update registry.mgrote.net/allzweckcontainer docker tag to v1.1.116 (#11)
ci/woodpecker/push/build unknown status Details
ci/woodpecker/push/lint Pipeline failed Details
Co-authored-by: Renovate Bot <renovate@mgrote.net>
Co-committed-by: Renovate Bot <renovate@mgrote.net>
2024-04-26 02:02:57 +02:00
Renovate Bot d939f634f0 chore(deps): update registry.mgrote.net/allzweckcontainer docker tag to v1.1.115 (#9)
ci/woodpecker/push/lint Pipeline was successful Details
ci/woodpecker/push/build Pipeline was successful Details
Co-authored-by: Renovate Bot <renovate@mgrote.net>
Co-committed-by: Renovate Bot <renovate@mgrote.net>
2024-04-22 02:02:39 +02:00
Renovate Bot aba4d82544 chore(deps): update docker docker tag to v26.0.2 (#8)
ci/woodpecker/push/lint Pipeline was successful Details
ci/woodpecker/push/build Pipeline failed Details
ci/woodpecker/cron/lint Pipeline was successful Details
ci/woodpecker/cron/build Pipeline was successful Details
Co-authored-by: Renovate Bot <renovate@mgrote.net>
Co-committed-by: Renovate Bot <renovate@mgrote.net>
2024-04-20 02:01:26 +02:00
Renovate Bot f758ec9d2a chore(deps): update dependency gunicorn to v22 (#7)
ci/woodpecker/push/lint Pipeline was successful Details
ci/woodpecker/push/build Pipeline was successful Details
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [gunicorn](https://github.com/benoitc/gunicorn) ([changelog](https://docs.gunicorn.org/en/stable/news.html)) | major | `==21.2.0` -> `==22.0.0` |

---

### Release Notes

<details>
<summary>benoitc/gunicorn (gunicorn)</summary>

### [`v22.0.0`](https://github.com/benoitc/gunicorn/releases/tag/22.0.0): Gunicorn 22.0 has been released

[Compare Source](https://github.com/benoitc/gunicorn/compare/21.2.0...22.0.0)

**Gunicorn 22.0.0 has been released.** This version fix the numerous security vulnerabilities. You're invited to upgrade asap your own installation.

Changes:

    22.0.0 - 2024-04-17
    ===================

    - use `utime` to notify workers liveness
    - migrate setup to pyproject.toml
    - fix numerous security vulnerabilities in HTTP parser (closing some request smuggling vectors)
    - parsing additional requests is no longer attempted past unsupported request framing
    - on HTTP versions < 1.1 support for chunked transfer is refused (only used in exploits)
    - requests conflicting configured or passed SCRIPT_NAME now produce a verbose error
    - Trailer fields are no longer inspected for headers indicating secure scheme
    - support Python 3.12

    ** Breaking changes **

    - minimum version is Python 3.7
    - the limitations on valid characters in the HTTP method have been bounded to Internet Standards
    - requests specifying unsupported transfer coding (order) are refused by default (rare)
    - HTTP methods are no longer casefolded by default (IANA method registry contains none affected)
    - HTTP methods containing the number sign (#) are no longer accepted by default (rare)
    - HTTP versions < 1.0 or >= 2.0 are no longer accepted by default (rare, only HTTP/1.1 is supported)
    - HTTP versions consisting of multiple digits or containing a prefix/suffix are no longer accepted
    - HTTP header field names Gunicorn cannot safely map to variables are silently dropped, as in other software
    - HTTP headers with empty field name are refused by default (no legitimate use cases, used in exploits)
    - requests with both Transfer-Encoding and Content-Length are refused by default (such a message might indicate an attempt to perform request smuggling)
    - empty transfer codings are no longer permitted (reportedly seen with really old & broken proxies)

    ** SECURITY **

    - fix CVE-2024-1135

1.  Documentation is available there: https://docs.gunicorn.org/en/stable/news.html
2.  Packages: https://pypi.org/project/gunicorn/

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMDAuMCIsInVwZGF0ZWRJblZlciI6IjM3LjMwMC4wIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=-->

Reviewed-on: #7
Co-authored-by: Renovate Bot <renovate@mgrote.net>
Co-committed-by: Renovate Bot <renovate@mgrote.net>
2024-04-17 11:45:58 +02:00
Renovate Bot a9b40d7474 chore(deps): update registry.mgrote.net/allzweckcontainer docker tag to v1.1.114 (#6)
ci/woodpecker/push/lint Pipeline was successful Details
ci/woodpecker/push/build Pipeline was successful Details
Co-authored-by: Renovate Bot <renovate@mgrote.net>
Co-committed-by: Renovate Bot <renovate@mgrote.net>
2024-04-14 03:02:01 +02:00
Renovate Bot 11bdf42e4d chore(deps): update docker docker tag to v26.0.1 (#5)
ci/woodpecker/push/lint Pipeline failed Details
ci/woodpecker/push/build unknown status Details
Co-authored-by: Renovate Bot <renovate@mgrote.net>
Co-committed-by: Renovate Bot <renovate@mgrote.net>
2024-04-13 02:01:39 +02:00
Renovate Bot e2d0c76519 chore(deps): update dependency flask to v3.0.3 (#4)
Co-authored-by: Renovate Bot <renovate@mgrote.net>
Co-committed-by: Renovate Bot <renovate@mgrote.net>
2024-04-07 22:00:52 +02:00
Renovate Bot ba4a62268c chore(deps): update registry.mgrote.net/allzweckcontainer docker tag to v1.1.113 (#3)
ci/woodpecker/push/lint Pipeline was successful Details
ci/woodpecker/push/build Pipeline was successful Details
ci/woodpecker/cron/build Pipeline was successful Details
ci/woodpecker/cron/lint Pipeline was successful Details
Co-authored-by: Renovate Bot <renovate@mgrote.net>
Co-committed-by: Renovate Bot <renovate@mgrote.net>
2024-04-04 21:37:15 +02:00
Michael Grote ed8abb8a5c ci: shellcheck: set tag to v0.10.0
ci/woodpecker/push/lint Pipeline was successful Details
ci/woodpecker/push/build Pipeline was successful Details
2024-04-04 20:22:07 +02:00
Renovate Bot 642ab7579c chore(deps): update registry.mgrote.net/allzweckcontainer docker tag to v1.1.111
ci/woodpecker/pull_request_closed/lint Pipeline was successful Details
ci/woodpecker/push/lint Pipeline was successful Details
ci/woodpecker/pull_request_closed/build Pipeline was successful Details
ci/woodpecker/push/build Pipeline was successful Details
2024-04-04 17:25:27 +00:00
Renovate Bot d9b5a1b49e chore(deps): update registry.mgrote.net/allzweckcontainer docker tag to v1.1.110
ci/woodpecker/pr/lint Pipeline was successful Details
ci/woodpecker/pull_request_closed/lint Pipeline was successful Details
ci/woodpecker/push/lint Pipeline was successful Details
ci/woodpecker/pr/build Pipeline was successful Details
ci/woodpecker/pull_request_closed/build Pipeline was successful Details
ci/woodpecker/push/build Pipeline was successful Details
2024-04-04 17:21:19 +00:00
Renovate Bot cef3235b47 chore(deps): update registry.mgrote.net/allzweckcontainer docker tag to v1.1.109
ci/woodpecker/manual/lint Pipeline was successful Details
ci/woodpecker/manual/build Pipeline was successful Details
2024-03-21 13:40:36 +00:00
Renovate Bot 42db5d5a88 chore(deps): update docker docker tag to v26 (#32)
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| docker | major | `25.0.5` -> `26.0.0` |

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjIuMiIsInVwZGF0ZWRJblZlciI6IjM3LjI2Mi4yIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIn0=-->

Reviewed-on: #32
Co-authored-by: Renovate Bot <renovate@mgrote.net>
Co-committed-by: Renovate Bot <renovate@mgrote.net>
2024-03-21 14:39:30 +01:00
Renovate Bot b6cf68d1ab chore(deps): update registry.mgrote.net/allzweckcontainer docker tag to v1.1.108 2024-03-20 15:39:21 +00:00
Renovate Bot 984b9469fd chore(deps): update docker docker tag to v25.0.5 2024-03-20 07:39:02 +00:00
Michael Grote c8fb52fcca set alpine version 2024-03-13 08:53:28 +01:00
Renovate Bot 3efa0fcf17 chore(deps): update registry.mgrote.net/allzweckcontainer docker tag to v1.1.107 2024-03-13 07:39:16 +00:00
Renovate Bot c63a9e2b12 chore(deps): update docker docker tag to v25.0.4 2024-03-07 23:37:44 +00:00
Renovate Bot 99ea8afd61 chore(deps): update registry.mgrote.net/allzweckcontainer docker tag to v1.1.106 2024-02-19 23:40:26 +00:00
Renovate Bot 59e5b83d78 chore(deps): update pipelinecomponents/hadolint docker tag to v0.26.1 2024-02-19 23:36:12 +00:00
Renovate Bot 59801b2d43 chore(deps): update registry.mgrote.net/allzweckcontainer docker tag to v1.1.105 2024-02-17 14:48:12 +00:00
Michael Grote b1d2e4bec5 ci: new build step 2024-02-17 15:36:16 +01:00
Renovate Bot 10ba8b02e5 chore(deps): update registry.mgrote.net/allzweckcontainer docker tag to v1.1.102 2024-02-09 10:21:52 +00:00
Renovate Bot cb399f1ae1 chore(deps): update registry.mgrote.net/allzweckcontainer docker tag to v1.1.101 2024-02-09 10:19:45 +00:00
Michael Grote 0fa5ba29ac ci: variable for name 2024-02-09 11:15:46 +01:00
Renovate Bot 9af694e1df chore(deps): update registry.mgrote.net/allzweckcontainer docker tag to v1.1.100 2024-02-07 20:29:24 +00:00
Michael Grote 074dad265a remove image digests 2024-02-07 21:20:35 +01:00
Michael Grote d9d5392a84 ci: new build step 2024-02-07 21:11:47 +01:00
Renovate Bot 5abf99bf95 chore(deps): update woodpeckerci/plugin-docker-buildx docker tag to v3.1.0 (#21)
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [woodpeckerci/plugin-docker-buildx](https://codeberg.org/woodpecker-plugins/docker-buildx) ([source](https://codeberg.org/woodpecker-plugins/docker-buildx.git)) | minor | `3.0.1` -> `3.1.0` |

---

### Release Notes

<details>
<summary>woodpecker-plugins/docker-buildx (woodpeckerci/plugin-docker-buildx)</summary>

### [`v3.1.0`](https://codeberg.org/woodpecker-plugins/docker-buildx/releases/tag/v3.1.0)

[Compare Source](https://codeberg.org/woodpecker-plugins/docker-buildx/compare/v3.0.1...v3.1.0)

#### Features

-   Improve support for `cache_to` and `cache_from` & add `cache_images` ([#&#8203;129](https://github.com/woodpecker-plugins/docker-buildx/issues/129))

#### Dependencies

-   chore(deps): update docker docker tag to v25.0.2

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xNzUuMCIsInVwZGF0ZWRJblZlciI6IjM3LjE3NS4wIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIn0=-->

Reviewed-on: #21
Co-authored-by: Renovate Bot <renovate@mgrote.net>
Co-committed-by: Renovate Bot <renovate@mgrote.net>
2024-02-07 17:40:23 +01:00
Michael Grote 1f6a452f74 remove image digest 2024-02-07 15:14:06 +01:00
Renovate Bot 99d693e2a9 chore(deps): update koalaman/shellcheck-alpine:latest docker digest to eed99e4 2024-02-06 19:31:35 +00:00
Michael Grote 59f5dccfd0 ci: typo 2024-02-06 20:20:51 +01:00
Michael Grote 376de2ed54 ci: dont run on renovate updates 2024-02-06 20:17:01 +01:00
Renovate Bot a59ae4da20 chore(deps): pin dependencies (#17)
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| koalaman/shellcheck-alpine | pinDigest |  -> `7b0682c` |
| [woodpeckerci/plugin-docker-buildx](https://codeberg.org/woodpecker-plugins/docker-buildx) ([source](https://codeberg.org/woodpecker-plugins/docker-buildx.git)) | pinDigest |  -> `c7ac0b0` |

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xNjguMiIsInVwZGF0ZWRJblZlciI6IjM3LjE2OC4yIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIn0=-->

Reviewed-on: #17
Co-authored-by: Renovate Bot <renovate@mgrote.net>
Co-committed-by: Renovate Bot <renovate@mgrote.net>
2024-02-06 18:56:25 +01:00
Renovate Bot 981bf4f756 chore(deps): update dependency flask to v3.0.2 (#18)
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| Flask ([changelog](https://flask.palletsprojects.com/changes/)) | patch | `==3.0.1` -> `==3.0.2` |

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xNjguMiIsInVwZGF0ZWRJblZlciI6IjM3LjE2OC4yIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIn0=-->

Reviewed-on: #18
Co-authored-by: Renovate Bot <renovate@mgrote.net>
Co-committed-by: Renovate Bot <renovate@mgrote.net>
2024-02-06 18:56:19 +01:00
Michael Grote a904997096 ci: replace shellcheck image 2024-02-02 22:39:28 +01:00
Renovate Bot 9f9a5e41cc chore(deps): update registry.mgrote.net/allzweckcontainer docker tag to v1.0.131 (#16)
Co-authored-by: Renovate Bot <renovate@mgrote.net>
Co-committed-by: Renovate Bot <renovate@mgrote.net>
2024-02-02 22:22:19 +01:00
Renovate Bot 805ec0c6d7 chore(deps): update registry.mgrote.net/allzweckcontainer docker tag to v1.0.121 (#15)
Co-authored-by: Renovate Bot <renovate@mgrote.net>
Co-committed-by: Renovate Bot <renovate@mgrote.net>
2024-02-02 22:15:40 +01:00
Michael Grote 8ec7178dd3 ci: shellcheck, set tag instead of latest 2024-02-02 22:09:47 +01:00
Michael Grote 88c488106f ci: replace docker-plugin, set SemVer, remove tag 2024-02-02 22:02:00 +01:00
Renovate Bot e25ad9470c chore(deps): update zricethezav/gitleaks docker tag to v8.18.2 (#14)
Co-authored-by: Renovate Bot <renovate@mgrote.net>
Co-committed-by: Renovate Bot <renovate@mgrote.net>
2024-02-01 21:46:49 +01:00
Michael Grote 5c6a06ba6c ci: add shellcheck 2024-01-29 12:21:03 +01:00
Renovate Bot c26c79bcdf chore(deps): update pipelinecomponents/hadolint docker tag to v0.26.0 (#12)
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [pipelinecomponents/hadolint](https://gitlab.com/pipeline-components/hadolint) | minor | `0.25.9` -> `0.26.0` |

---

### Release Notes

<details>
<summary>pipeline-components/hadolint (pipelinecomponents/hadolint)</summary>

### [`v0.26.0`](https://gitlab.com/pipeline-components/hadolint/compare/v0.25.9...v0.26.0)

[Compare Source](https://gitlab.com/pipeline-components/hadolint/compare/v0.25.9...v0.26.0)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xNTIuMSIsInVwZGF0ZWRJblZlciI6IjM3LjE1Mi4xIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIn0=-->

Reviewed-on: #12
Co-authored-by: Renovate Bot <renovate@mgrote.net>
Co-committed-by: Renovate Bot <renovate@mgrote.net>
2024-01-26 23:35:50 +01:00
Renovate Bot 247343453a chore(deps): update pipelinecomponents/hadolint:0.25.9 docker digest to 430e949 (#11)
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [pipelinecomponents/hadolint](https://gitlab.com/pipeline-components/hadolint) | digest | `9cef74a` -> `430e949` |

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xNTIuMSIsInVwZGF0ZWRJblZlciI6IjM3LjE1Mi4xIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIn0=-->

Reviewed-on: #11
Co-authored-by: Renovate Bot <renovate@mgrote.net>
Co-committed-by: Renovate Bot <renovate@mgrote.net>
2024-01-26 23:32:22 +01:00
Michael Grote f116aaffae ci: set image for hadolint 2024-01-26 23:28:29 +01:00
Renovate Bot 1605588186 chore(deps): update zricethezav/gitleaks docker tag to v8.18.1 (#10)
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [zricethezav/gitleaks](https://github.com/gitleaks/gitleaks) | patch | `v8.18.0` -> `v8.18.1` |

---

### Release Notes

<details>
<summary>gitleaks/gitleaks (zricethezav/gitleaks)</summary>

### [`v8.18.1`](https://github.com/gitleaks/gitleaks/releases/tag/v8.18.1)

[Compare Source](https://github.com/gitleaks/gitleaks/compare/v8.18.0...v8.18.1)

#### Changelog

-   [`dab7d02`](https://github.com/gitleaks/gitleaks/commit/dab7d02) dont crash on 100gb files pls ([#&#8203;1292](https://github.com/gitleaks/gitleaks/issues/1292))
-   [`e63b657`](https://github.com/gitleaks/gitleaks/commit/e63b657) remove secretgroup from default config ([#&#8203;1288](https://github.com/gitleaks/gitleaks/issues/1288))
-   [`20fcf50`](https://github.com/gitleaks/gitleaks/commit/20fcf50) feat: Hashicorp Terraform fields for password ([#&#8203;1237](https://github.com/gitleaks/gitleaks/issues/1237))
-   [`b496677`](https://github.com/gitleaks/gitleaks/commit/b496677) perf: avoid allocations with `(*regexp.Regexp).MatchString` ([#&#8203;1283](https://github.com/gitleaks/gitleaks/issues/1283))
-   [`a3ab4e8`](https://github.com/gitleaks/gitleaks/commit/a3ab4e8) refactor: more explicit rules ([#&#8203;1280](https://github.com/gitleaks/gitleaks/issues/1280))
-   [`bd9a25a`](https://github.com/gitleaks/gitleaks/commit/bd9a25a) bugfix: reduce false positives for stripe tokens by using word boundaries in regex ([#&#8203;1278](https://github.com/gitleaks/gitleaks/issues/1278))
-   [`6d0d8b5`](https://github.com/gitleaks/gitleaks/commit/6d0d8b5) add Infracost API rule ([#&#8203;1273](https://github.com/gitleaks/gitleaks/issues/1273))
-   [`2959fc0`](https://github.com/gitleaks/gitleaks/commit/2959fc0) refactor: simplify test asserts ([#&#8203;1271](https://github.com/gitleaks/gitleaks/issues/1271))
-   [`d37b38f`](https://github.com/gitleaks/gitleaks/commit/d37b38f) Update Makefile
-   [`14b1ca9`](https://github.com/gitleaks/gitleaks/commit/14b1ca9) refactor: change detect tests to t.Fatal instead of log.Fatal ([#&#8203;1270](https://github.com/gitleaks/gitleaks/issues/1270))
-   [`d9f86d6`](https://github.com/gitleaks/gitleaks/commit/d9f86d6) feat(rules): Add detection for Scalingo API Token ([#&#8203;1262](https://github.com/gitleaks/gitleaks/issues/1262))
-   [`ed34259`](https://github.com/gitleaks/gitleaks/commit/ed34259) feat(jwt): detect base64-encoded tokens ([#&#8203;1256](https://github.com/gitleaks/gitleaks/issues/1256))
-   [`0d5e46f`](https://github.com/gitleaks/gitleaks/commit/0d5e46f) feat: add --ignore-gitleaks-allow cmd flag ([#&#8203;1260](https://github.com/gitleaks/gitleaks/issues/1260))
-   [`a82ac29`](https://github.com/gitleaks/gitleaks/commit/a82ac29) switch out libs ([#&#8203;1259](https://github.com/gitleaks/gitleaks/issues/1259))
-   [`0b84afa`](https://github.com/gitleaks/gitleaks/commit/0b84afa) fix: no-color option should also affect zerolog output ([#&#8203;1242](https://github.com/gitleaks/gitleaks/issues/1242))
-   [`8976539`](https://github.com/gitleaks/gitleaks/commit/8976539) Fixed lineEnd indexing if the match is the whole line ([#&#8203;1223](https://github.com/gitleaks/gitleaks/issues/1223))
-   [`30c6117`](https://github.com/gitleaks/gitleaks/commit/30c6117) feat: Add optional redaction value, default 100 ([#&#8203;1229](https://github.com/gitleaks/gitleaks/issues/1229))
-   [`e9135cf`](https://github.com/gitleaks/gitleaks/commit/e9135cf) fix(jwt): longer segment lengths ([#&#8203;1214](https://github.com/gitleaks/gitleaks/issues/1214))
-   [`f65f915`](https://github.com/gitleaks/gitleaks/commit/f65f915) Added yarn.lock file to default allowlist paths ([#&#8203;1258](https://github.com/gitleaks/gitleaks/issues/1258))
-   [`abfd0f3`](https://github.com/gitleaks/gitleaks/commit/abfd0f3) Update README.md
-   [`18283bb`](https://github.com/gitleaks/gitleaks/commit/18283bb) feat(rules): make case insensitivity optional ([#&#8203;1215](https://github.com/gitleaks/gitleaks/issues/1215))
-   [`9fb36b2`](https://github.com/gitleaks/gitleaks/commit/9fb36b2) feat(rules): detect Hugging Face access tokens ([#&#8203;1204](https://github.com/gitleaks/gitleaks/issues/1204))
-   [`db4bc0f`](https://github.com/gitleaks/gitleaks/commit/db4bc0f) Resolve [#&#8203;1170](https://github.com/gitleaks/gitleaks/issues/1170) - Enable selection of a single rule  ([#&#8203;1183](https://github.com/gitleaks/gitleaks/issues/1183))
-   [`3cbcda2`](https://github.com/gitleaks/gitleaks/commit/3cbcda2) Update authress.go to include alternate form account dash (-) ([#&#8203;1224](https://github.com/gitleaks/gitleaks/issues/1224))
-   [`46c6272`](https://github.com/gitleaks/gitleaks/commit/46c6272) refactor: remove unnecessary removing temp files in tests ([#&#8203;1255](https://github.com/gitleaks/gitleaks/issues/1255))
-   [`963a697`](https://github.com/gitleaks/gitleaks/commit/963a697) refactor: use os.ReadFile instead of os.Open + io.ReadAll ([#&#8203;1254](https://github.com/gitleaks/gitleaks/issues/1254))
-   [`163ec21`](https://github.com/gitleaks/gitleaks/commit/163ec21) fix(sumologic): improve patterns ([#&#8203;1218](https://github.com/gitleaks/gitleaks/issues/1218))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xNTIuMSIsInVwZGF0ZWRJblZlciI6IjM3LjE1Mi4xIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIn0=-->

Reviewed-on: #10
Co-authored-by: Renovate Bot <renovate@mgrote.net>
Co-committed-by: Renovate Bot <renovate@mgrote.net>
2024-01-26 22:59:00 +01:00
Michael Grote 2f8c002f77 ci: set tag for gitleaks 2024-01-26 22:52:16 +01:00
Renovate Bot 12aca9e18e chore(deps): pin dependencies (#8)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| alpine | final | pinDigest |  -> `9f867dc` |
| hadolint/hadolint |  | pinDigest |  -> `9cef74a` |
| koalaman/shellcheck-alpine |  | pinDigest |  -> `f73b035` |
| plugins/docker |  | pinDigest |  -> `2f15740` |
| zricethezav/gitleaks |  | pinDigest |  -> `6945c62` |

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xNTIuMSIsInVwZGF0ZWRJblZlciI6IjM3LjE1Mi4xIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIn0=-->

Reviewed-on: #8
Co-authored-by: Renovate Bot <renovate@mgrote.net>
Co-committed-by: Renovate Bot <renovate@mgrote.net>
2024-01-26 16:20:43 +01:00
Michael Grote 86d3fafc50 ci: fix woodpecker warnings 2024-01-24 20:00:42 +01:00
Renovate Bot 6918842303 chore(deps): update dependency flask to v3 2024-01-22 20:47:47 +00:00
Michael Grote d3c4cc91a9 test with old version 2024-01-22 21:47:15 +01:00
Michael Grote 5be74d414a set python-packages versions explicit 2024-01-22 21:43:15 +01:00
Michael Grote 0504877ebf remove linter ignore 2024-01-22 21:40:53 +01:00
Michael Grote 9796ed488b revert 47a7e6e3d2
revert set alpine packages versions explicit
2024-01-22 21:40:33 +01:00
Michael Grote 47a7e6e3d2 set alpine packages versions explicit 2024-01-22 21:37:22 +01:00
Renovate Bot e9e7b2dd60 chore(deps): update alpine docker tag to v20231219 2024-01-22 20:34:48 +00:00
Renovate Bot 8348fa7134 Configure Renovate (#4)
Welcome to [Renovate](https://github.com/renovatebot/renovate)! This is an onboarding PR to help you understand and configure settings before regular Pull Requests begin.

🚦 To activate Renovate, merge this Pull Request. To disable Renovate, simply close this Pull Request unmerged.

---
### Detected Package Files

 * `Dockerfile` (dockerfile)
 * `requirements.txt` (pip_requirements)

### What to Expect

With your current configuration, Renovate will create 1 Pull Request:

<details>
<summary>chore(deps): update alpine docker tag to v20231219</summary>

  - Schedule: ["at any time"]
  - Branch name: `renovate/alpine-20231219-x`
  - Merge into: `master`
  - Upgrade alpine to `20231219`

</details>

---

 Got questions? Check out Renovate's [Docs](https://docs.renovatebot.com/), particularly the Getting Started section.
If you need any further assistance then you can also [request help here](https://github.com/renovatebot/renovate/discussions).

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).

Reviewed-on: #4
Co-authored-by: Renovate Bot <renovate@mgrote.net>
Co-committed-by: Renovate Bot <renovate@mgrote.net>
2024-01-22 21:34:05 +01:00
Michael Grote 23e828c481 ci: fix? 2024-01-11 10:05:01 +01:00
Michael Grote f50b01e3ce Domainumstellung: grote.lan -> mgrote.net 2023-11-25 17:45:52 +01:00
Michael Grote 05aaf3960c ci: ignore tests.sh 2023-11-09 09:21:48 +01:00
Michael Grote c9cd4a913d ci: enable shellcheck 2023-11-09 09:20:42 +01:00
Michael Grote 15eec18863 FROM alpine:3 2023-11-08 16:27:34 +01:00
Michael Grote b31d4279f2 fix package name 2023-11-08 16:21:50 +01:00
Michael Grote 408ed58199 ci: disable shellcheck 2023-11-08 16:20:39 +01:00
Michael Grote 017fef9b52 move to alpine 2023-11-08 16:20:13 +01:00
Michael Grote d573f0af84 add badge 2023-11-08 13:24:02 +01:00
Michael Grote 070e57fed7 ci: add shellcheck 2023-11-03 19:32:18 +01:00
Michael Grote 5ee4473e77 drone -> woodpecker 2023-11-03 19:26:10 +01:00
Michael Grote e27473ead4 remove explicit set versions
Signed-off-by: Michael Grote <michael.grote@posteo.de>
2023-10-03 18:07:58 +02:00
Michael Grote e6dceb6ddc set Werktzeug Version explicit (https://stackoverflow.com/questions/77213053/importerror-cannot-import-name-url-quote-from-werkzeug-urls)
Signed-off-by: Michael Grote <michael.grote@posteo.de>
2023-10-03 18:03:18 +02:00
Michael Grote ae6275331e ci: remove push to dockerhub 2023-08-22 09:55:30 +02:00
Michael Grote 6e1c0d79dd ci: remove tests 2023-07-22 08:59:56 +02:00
Michael Grote d5f022fd1e ci: test url 2023-07-04 13:27:14 +02:00
Michael Grote ce52548d69 ci: echo 2023-06-26 23:59:49 +02:00
Michael Grote 9f82084cc2 ci: add gunicorn call 2023-06-26 23:58:45 +02:00
Michael Grote 7c3f608839 ci: apt -y 2023-06-26 23:54:49 +02:00
Michael Grote 7428e1a21f ci: set DEBIAN_FRONTEND: noninteractive for tests 2023-06-26 23:52:00 +02:00
Michael Grote f4919dca39 ci: fix tests 2023-06-26 23:48:45 +02:00
Michael Grote c6435f879b ci: syntax 2023-06-26 23:44:40 +02:00
Michael Grote 51f3a12f52 ci: syntax 2023-06-26 23:44:16 +02:00
Michael Grote 7300cbaeea ci: syntax 2023-06-26 23:43:13 +02:00
Michael Grote 310a6540b6 ci: add tests 2023-06-26 23:42:28 +02:00
Michael Grote 07826d05c4 ci: remove http_proxy/apt-cacher-ng 2023-06-11 21:16:48 +02:00
Michael Grote e2f2f49a13 ci: typo 2023-06-10 11:14:17 +02:00
Michael Grote 8262d4de49 ci: add parallelism 2023-06-10 11:13:39 +02:00
Michael Grote b1acba27b6 revert 4f6176fcb5
revert ci: test proxy with fqdn
2023-04-28 21:56:38 +02:00
Michael Grote 4f6176fcb5 ci: test proxy with fqdn 2023-04-28 21:51:49 +02:00
Michael Grote bfb4f42353 ci: add proxy 2023-04-28 21:45:36 +02:00
Michael Grote 8ad005c568 add web-ui (#3)
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Reviewed-on: mg/python-api-server#3
2023-04-26 19:53:12 +02:00
Michael Grote 47ab99f891 add web-ui (#2)
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Reviewed-on: mg/python-api-server#2
2023-04-26 19:51:53 +02:00
Michael Grote 288816341e revert ed793f95f6
revert ci: remove commit hash
2023-04-25 21:15:38 +02:00
Michael Grote ed793f95f6 ci: remove commit hash 2023-04-25 21:08:15 +02:00
Michael Grote db6ee904de ci: housekeeping 2023-04-25 21:01:50 +02:00
Michael Grote 13a3ab0076 add swagger (#1)
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Reviewed-on: mg/python-api-server#1
2023-04-25 20:52:45 +02:00
Michael Grote ef96c7167a ci: test 2023-04-23 16:18:25 +02:00
Michael Grote 777847c4ad ci: typo 2023-04-23 16:16:40 +02:00
Michael Grote 8a7a8aa7a6 ci: syntax 2023-04-23 16:16:06 +02:00
12 changed files with 327 additions and 202 deletions

View File

@ -1,70 +0,0 @@
---
kind: pipeline
type: docker
name: default
steps:
- name: docker_build_and_push_selfhosted
image: plugins/docker
settings:
dockerfile: Dockerfile
repo: registry.mgrote.net/python-api-server
registry: registry.mgrote.net
tags:
- ${DRONE_COMMIT_SHA:0:8}
- ${DRONE_COMMIT_BRANCH}
- latest
when:
event:
exclude:
- pull_request
- tag
- name: docker_build_and_push_dockerhub
image: plugins/docker
settings:
username:
from_secret: DOCKERHUB_USER
password:
from_secret: DOCKERHUB_PASS
dockerfile: Dockerfile
repo: quotengrote/python-api-server
tags:
- ${DRONE_COMMIT_SHA:0:8}
- ${DRONE_COMMIT_BRANCH}
- latest
when:
event:
exclude:
- pull_request
- tag
- name: docker_build_and_push_selfhosted_tag
image: plugins/docker
settings:
dockerfile: Dockerfile
repo: registry.mgrote.net/python-api-server
registry: registry.mgrote.net
tags:
- $DRONE_TAG
when:
event:
- tag
- name: docker_build_and_push_dockerhub_tag
image: plugins/docker
settings:
username:
from_secret: DOCKERHUB_USER
password:
from_secret: DOCKERHUB_PASS
dockerfile: Dockerfile
repo: quotengrote/python-api-server
tags:
- $DRONE_TAG
when:
event:
- tag

61
.woodpecker/build.yml Normal file
View File

@ -0,0 +1,61 @@
---
depends_on:
- lint
clone:
git:
image: "woodpeckerci/plugin-git:2.5.0"
settings:
depth: 9999 # wird benötigt um die Commits zählen zu können
lfs: false
partial: false
steps:
set_variables:
image: "registry.mgrote.net/allzweckcontainer:latest"
commands:
# set version
- |
MAJOR="1"
MINOR="1"
PATCH="$(git rev-list --count "$CI_COMMIT_BRANCH")"
VERSION="v$MAJOR.$MINOR.$PATCH"
if [ "$CI_COMMIT_BRANCH" != "main" ] && [ "$CI_COMMIT_BRANCH" != "master" ]; then
VERSION=$VERSION-dev
fi
echo "VERSION=$VERSION" >> .variables
# set date
- |
DATE=$(date --iso-8601=seconds)
echo "DATE=$DATE" >> .variables
when:
- event: [push, pull_request, cron]
evaluate: 'CI_COMMIT_AUTHOR_EMAIL != "renovate@mgrote.net"'
build_and_push: # damit dieser Step laufen kann muss das Repo in der Woodpecker-GUI "privilegiert" sein
image: "docker:26.1.4"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
commands:
- cat .variables
- source .variables
# https://unix.stackexchange.com/questions/748633/error-multiple-platforms-feature-is-currently-not-supported-for-docker-driver
- docker buildx create --use --platform=linux/amd64 --name multi-platform-builder
- docker buildx inspect --bootstrap
- |
docker buildx build \
--platform=linux/amd64 \
--push \
--tag registry.mgrote.net/${CI_REPO_NAME}:${CI_COMMIT_SHA:0:8} \
--tag registry.mgrote.net/${CI_REPO_NAME}:${CI_COMMIT_BRANCH} \
--tag registry.mgrote.net/${CI_REPO_NAME}:latest \
--tag registry.mgrote.net/${CI_REPO_NAME}:$VERSION \
--label org.opencontainers.image.url=$CI_REPO_URL \
--label org.opencontainers.image.source=$CI_REPO_URL \
--label org.opencontainers.image.revision=$CI_COMMIT_SHA \
--label org.opencontainers.image.created=$DATE \
--file Dockerfile .
when:
- event: [push, pull_request, cron]
evaluate: 'CI_COMMIT_AUTHOR_EMAIL != "renovate@mgrote.net"'
...

41
.woodpecker/lint.yml Normal file
View File

@ -0,0 +1,41 @@
---
steps:
gitleaks:
image: zricethezav/gitleaks:v8.18.4
commands:
- gitleaks detect --no-git --verbose --source $CI_WORKSPACE
when:
- event: [push, pull_request, cron]
evaluate: 'CI_COMMIT_AUTHOR_EMAIL != "renovate@mgrote.net"'
hadolint:
image: pipelinecomponents/hadolint:0.26.3
commands:
- hadolint Dockerfile
when:
- event: [push, pull_request, cron]
evaluate: 'CI_COMMIT_AUTHOR_EMAIL != "renovate@mgrote.net"'
pylint:
image: "registry.mgrote.net/pylint:master"
commands:
- pip3 install --no-cache-dir --break-system-packages -r requirements.txt
- pylint app.py
when:
- event: [push, pull_request, cron]
evaluate: 'CI_COMMIT_AUTHOR_EMAIL != "renovate@mgrote.net"'
shellcheck:
image: koalaman/shellcheck-alpine:v0.10.0
commands:
- |
find . -type f -not -path './.git/*' -not -path './collections/*' -exec file {} \; | while IFS= read -r line; do
if echo "$line" | grep -q "shell script"; then
file_path=$(echo "$line" | awk -F':' '{print $1}')
shellcheck "$file_path"
fi
done
when:
- event: [push, pull_request, cron]
evaluate: 'CI_COMMIT_AUTHOR_EMAIL != "renovate@mgrote.net"'
...

View File

@ -1,22 +1,18 @@
FROM ubuntu:focal
FROM alpine:3.20.0
# deaktiviert Nachfragen beim installieren von Paketen
ENV DEBIAN_FRONTEND=noninteractive
# hadolint ignore=DL3008,DL3028,DL4006
RUN apt-get update && \
apt-get -y --no-install-recommends install \
python3-pip curl && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /var/tmp/* /tmp/*
# hadolint ignore=DL3018
RUN apk add --no-cache \
py3-pip \
curl
WORKDIR /app
COPY templates/file_list.html ./templates/
COPY requirements.txt .
COPY app.py .
COPY gunicorn_config.py .
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install --no-cache-dir --break-system-packages -r requirements.txt
EXPOSE 5000

119
README.md
View File

@ -1,7 +1,8 @@
# python-api-server
a small flask-application for storing and downloading stuff like small binaries
[![status-badge](https://ci.mgrote.net/api/badges/5/status.svg)](https://ci.mgrote.net/repos/5)
a small flask-application for storing and downloading stuff like small binaries
## Variables
@ -11,94 +12,34 @@ a small flask-application for storing and downloading stuff like small binaries
## Example Docker-Compose
see [docker-compose.yml](./docker-compose.yml)
```yaml
version: '3'
services:
python-api-server:
container_name: httpd-api
image: quotengrote/python-api-server:v2
ports:
- "5040:5000"
volumes:
- uploads:/uploads
environment:
# FLASK_DEBUG: 1 # for debugging
# FLASK_APP: app # for debugging
MAX_CONTENT_LENGTH: 10
UPLOAD_DIRECTORY: /uploads
AUTH_TOKEN: myuploadtoken
ENABLE_WEBSERVER: true # if enabled a list of files can be viewed in a webbrowser (see screenshot)
volumes:
uploads:
```
### ENABLE_WEBSERVER Screenshot
![](./assets/screenshot_webui.png)
## API-Endpoints
### /list
#### input
```bash
curl -H "token: myuploadtoken" http://docker10.host.lan:5040/list | jq
```
#### output
```bash
{
"files": [
{
"last_modified": "2023-04-13 11:43:51",
"name": "file1",
"size": 1034
},
{
"last_modified": "2023-04-13 11:53:59",
"name": "file2",
"size": 5
},
{
"last_modified": "2023-04-13 12:41:18",
"name": "file3",
"size": 3478
}
]
}
```
### /upload
If a existing file has the same name as the newly uploaded file, it will be overwritten.
#### input
```bash
curl -X POST -H "token: myuploadtoken" -F "file=@tests/file" http://docker10.host.lan:5040/upload | jq
```
#### output
```bash
{
"success": "File 'file' successfully uploaded"
}
```
### /download
#### input
```bash
wget http://docker10.host.lan:5040/download/file
```
### /delete
#### input
```bash
curl -X DELETE -H "token: myuploadtoken" http://docker10.host.lan:5040/delete/file | jq
```
#### output
```bash
{
"success": "File 'file' successfully deleted"
}
```
### /health
#### input
```bash
curl http://docker10.host.lan:5040/health
```
#### output
```bash
OK
```
- see [Flasgger](https://github.com/flasgger/flasgger): ``http://<host>:5040/apidocs/``

129
app.py
View File

@ -1,26 +1,82 @@
# pylint: disable=C0114
import os
import re
import uuid
from flask import Flask, request, jsonify, send_from_directory
import datetime
from flask import Flask, request, jsonify, send_from_directory, render_template
from flasgger import Swagger
app = Flask(__name__)
app = Flask(__name__, template_folder='templates')
swagger = Swagger(app)
app.config['UPLOAD_DIRECTORY'] = os.environ.get('UPLOAD_DIRECTORY', '/uploads')
app.config['MAX_CONTENT_LENGTH'] = int(os.environ.get('MAX_CONTENT_LENGTH', '5')) * 1024 * 1024 # in MB
app.config['MAX_CONTENT_LENGTH'] = int(os.environ.get('MAX_CONTENT_LENGTH', '5')) * 1024 * 1024 # in MB # pylint: disable=C0301
app.config['ENABLE_WEBSERVER'] = os.getenv('ENABLE_WEBSERVER', 'True').lower() == 'true'
VALID_FILENAME_REGEX = r'^[a-zA-Z0-9\-_\.]+$'
AUTH_TOKEN = os.environ.get('AUTH_TOKEN', 'myuploadtoken')
def is_valid_filename(filename):
def is_valid_filename(filename): # pylint: disable=C0116
return bool(re.match(VALID_FILENAME_REGEX, filename))
if app.config['ENABLE_WEBSERVER']:
@app.route('/', methods=['GET'])
def file_list():
"""
Endpoint for displaying a list of files in the upload directory.
"""
files = []
for filename in os.listdir(app.config['UPLOAD_DIRECTORY']):
file_path = os.path.join(app.config['UPLOAD_DIRECTORY'], filename)
if os.path.isfile(file_path):
stats = os.stat(file_path)
size = stats.st_size
last_modified = datetime.datetime.fromtimestamp(stats.st_mtime).strftime('%Y-%m-%d %H:%M:%S') # pylint: disable=C0301
files.append({
'name': filename,
'size': size,
'last_modified': last_modified
})
return render_template('file_list.html', files=files)
@app.route('/health', methods=['GET'])
def health_check():
"""
Endpoint for health check.
---
responses:
200:
description: OK
"""
return 'OK'
@app.route('/upload', methods=['POST'])
def upload_file():
"""
Endpoint for uploading files.
Filename can only contain alphanumeric characters, hyphens, underscores, and periods.
If the filename is the same as an existing file, this file will be overwritten.
---
parameters:
- name: file
in: formData
type: file
required: true
description: The file to upload.
- name: token
in: header
type: string
required: true
description: Authentication token.
responses:
200:
description: File uploaded successfully.
400:
description: Bad request.
401:
description: Unauthorized.
"""
if 'file' not in request.files:
return jsonify({'error': 'No file part in the request'}), 400
@ -35,14 +91,29 @@ def upload_file():
return jsonify({'error': 'No file selected for upload'}), 400
if not is_valid_filename(file.filename):
return jsonify({'error': 'Invalid filename. Only alphanumeric characters, hyphens, underscores, and periods are allowed.'}), 400
return jsonify({'error': 'Invalid filename. Only alphanumeric characters, hyphens, underscores, and periods are allowed.'}), 400 # pylint: disable=C0301
filename = file.filename
file.save(os.path.join(app.config['UPLOAD_DIRECTORY'], filename))
return jsonify({'success': 'File \'{}\' successfully uploaded'.format(filename)})
return jsonify({'success': 'File \'{}\' successfully uploaded'.format(filename)}) # pylint: disable=C0209
@app.route('/download/<filename>', methods=['GET'])
def download_file(filename):
"""
Endpoint for downloading files.
---
parameters:
- name: filename
in: path
type: string
required: true
description: The name of the file to download.
responses:
200:
description: File downloaded successfully.
404:
description: File not found.
"""
try:
return send_from_directory(app.config['UPLOAD_DIRECTORY'], filename)
except FileNotFoundError:
@ -50,6 +121,28 @@ def download_file(filename):
@app.route('/delete/<filename>', methods=['DELETE'])
def delete_file(filename):
"""
Endpoint for deleting files.
---
parameters:
- name: filename
in: path
type: string
required: true
description: The name of the file to delete.
- name: token
in: header
type: string
required: true
description: Authentication token.
responses:
200:
description: File deleted successfully.
401:
description: Unauthorized.
404:
description: File not found.
"""
if 'token' not in request.headers:
return jsonify({'error': 'No token supplied'}), 401
@ -61,10 +154,28 @@ def delete_file(filename):
return jsonify({'error': 'File not found'}), 404
os.remove(file_path)
return jsonify({'success': 'File \'{}\' successfully deleted'.format(filename)})
return jsonify({'success': 'File \'{}\' successfully deleted'.format(filename)}) # pylint: disable=C0209
@app.route('/list', methods=['GET'])
def list_files():
"""
Endpoint for listing files.
---
parameters:
- name: token
in: header
type: string
required: true
description: Authentication token.
responses:
200:
description: Listed files successfully.
400:
description: Bad request.
401:
description: Unauthorized.
"""
if 'token' not in request.headers:
return jsonify({'error': 'No token supplied'}), 401
@ -77,7 +188,7 @@ def list_files():
if os.path.isfile(file_path):
stats = os.stat(file_path)
size = stats.st_size
last_modified = datetime.datetime.fromtimestamp(stats.st_mtime).strftime('%Y-%m-%d %H:%M:%S')
last_modified = datetime.datetime.fromtimestamp(stats.st_mtime).strftime('%Y-%m-%d %H:%M:%S') # pylint: disable=C0301
files.append({
'name': filename,
'size': size,

BIN
assets/screenshot_webui.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

View File

@ -1,18 +0,0 @@
version: '3'
services:
python-api-server:
container_name: httpd-api
image: quotengrote/python-api-server:latest
ports:
- "5040:5000"
volumes:
- uploads:/uploads
environment:
# FLASK_DEBUG: 1 # for debugging
# FLASK_APP: app # for debugging
MAX_CONTENT_LENGTH: 10
UPLOAD_DIRECTORY: /uploads
AUTH_TOKEN: myuploadtoken
volumes:
uploads:

13
renovate.json Normal file
View File

@ -0,0 +1,13 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
":dependencyDashboard",
":semanticPrefixFixDepsChoreOthers",
":ignoreModulesAndTests",
"group:monorepos",
"group:recommended",
"replacements:all",
"workarounds:all",
"mergeConfidence:all-badges"
]
}

View File

@ -1,4 +1,5 @@
Flask==2.0.1
Flask-Cors==3.0.10
gunicorn
requests
Flask==3.0.3
Flask-Cors==4.0.1
gunicorn==22.0.0
requests==2.32.3
flasgger==0.9.7.1

48
templates/file_list.html Normal file
View File

@ -0,0 +1,48 @@
<!doctype html>
<html>
<head>
<title>File List</title>
<style>
table {
border-collapse: collapse;
width: 100%;
}
th, td {
text-align: left;
padding: 8px;
border-bottom: 1px solid #ddd;
}
tr:hover {
background-color: #f5f5f5;
}
th {
background-color: #4CAF50;
color: white;
}
</style>
</head>
<body>
<h1>File List</h1>
<table>
<thead>
<tr>
<th>Name</th>
<th>Size (KB)</th>
<th>Last Modified</th>
</tr>
</thead>
<tbody>
{% for file in files %}
<tr>
<td><a href="{{ url_for('download_file', filename=file.name) }}">{{ file.name }}</a>
<td>{{ '%.2f' % (file.size / 1024) }} KB</td>
<td>{{ file.last_modified }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</body>
</html>

View File

@ -1,4 +1,5 @@
#!/bin/bash
# shellcheck disable=all
# führe Script nach Fehlern weiter aus
set +e
@ -7,7 +8,7 @@ RED="\e[31m"
GREEN="\e[32m"
ENDCOLOR="\e[0m"
export TOKEN=myuploadtoken
export URL="http://docker10.grote.lan:5040"
export URL="http://docker10.mgrote.net:5040"
mkdir -p tests