Add basic CI setup #23

Merged
rafael merged 8 commits from ci-setup into ash-setup 2025-04-24 16:20:37 +02:00
Collaborator
  • Check formatting
  • Check for compilation errors & warnings
  • Run tests with postgres
  • Security audits: sobelow, mix_audit, hex audit
  • Credo code quality hints

New Tasks that arose while working on CI: #24

Sobelow HTTPS Check

Sobelow checks that HTTPS is enabled in the production configuration by default. I'm assuming we'll deploy our app behind a reverse proxy which handles this, so I've added a setting to .sobelow-config to ignore the HTTPS check.

- Check formatting - Check for compilation errors & warnings - Run tests with postgres - Security audits: sobelow, mix_audit, hex audit - Credo code quality hints New Tasks that arose while working on CI: https://git.local-it.org/local-it/mitgliederverwaltung/issues/24 ## Sobelow HTTPS Check Sobelow checks that HTTPS is enabled in the production configuration by default. I'm assuming we'll deploy our app behind a reverse proxy which handles this, so I've added a setting to `.sobelow-config` to ignore the HTTPS check.
rafael self-assigned this 2025-04-21 13:01:51 +02:00
rafael added 2 commits 2025-04-21 13:01:52 +02:00
Add ash framework
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
86437cbb9d
Set up basic CI
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
6dd7c96c0d
rafael force-pushed ci-setup from 6dd7c96c0d to 0be43f43ad 2025-04-21 13:09:23 +02:00 Compare
rafael force-pushed ci-setup from 0be43f43ad to 2574b9416d 2025-04-21 13:33:57 +02:00 Compare
rafael force-pushed ci-setup from 2574b9416d to b3c74176e4 2025-04-21 13:45:18 +02:00 Compare
rafael force-pushed ci-setup from b3c74176e4 to 07fd2df09b 2025-04-21 13:48:28 +02:00 Compare
rafael force-pushed ci-setup from 07fd2df09b to ac8dd25eb8 2025-04-21 13:54:23 +02:00 Compare
rafael force-pushed ci-setup from ac8dd25eb8 to 5f52bd5af9 2025-04-21 13:55:46 +02:00 Compare
rafael force-pushed ci-setup from 5f52bd5af9 to a8504a7fd6 2025-04-21 14:03:59 +02:00 Compare
rafael changed target branch from main to ash-setup 2025-04-21 14:15:00 +02:00
rafael force-pushed ci-setup from a8504a7fd6 to 1dd7f907e5 2025-04-21 14:31:51 +02:00 Compare
rafael force-pushed ci-setup from 1dd7f907e5 to 75d2b15ee1 2025-04-21 14:44:45 +02:00 Compare
rafael force-pushed ci-setup from 75d2b15ee1 to 639a478c81 2025-04-21 14:48:07 +02:00 Compare
rafael force-pushed ci-setup from 639a478c81 to 0a16263a96 2025-04-21 14:53:01 +02:00 Compare
rafael force-pushed ci-setup from 0a16263a96 to 6dd95be7a2 2025-04-21 14:54:34 +02:00 Compare
rafael force-pushed ci-setup from 6dd95be7a2 to 2ec534f440 2025-04-21 15:04:24 +02:00 Compare
rafael force-pushed ci-setup from 2ec534f440 to 509e86b758 2025-04-21 15:06:21 +02:00 Compare
rafael force-pushed ci-setup from 509e86b758 to db3e79b1ec 2025-04-21 15:19:01 +02:00 Compare
requested reviews from moritz, simon, carla 2025-04-21 15:23:24 +02:00
Author
Collaborator

Seems like the drone runner is stuck, the pipelines all stay at "pending". @moritz could you take a look?

Seems like the drone runner is stuck, the pipelines all stay at "pending". @moritz could you take a look?
Owner
�2025-04-21T11:09:26.830001415Z time="2025-04-21T11:09:26Z" level=error msg="cannot get stage details" error="token was already used" stage.id=8 stage.name=default stage.number=1 thread=1
�2025-04-21T11:54:25.693649704Z time="2025-04-21T11:54:25Z" level=error msg="cannot get stage details" error="token was already used" stage.id=14 stage.name=default stage.number=1 thread=2
'2025-04-21T12:44:47.002218309Z time="2025-04-21T12:44:47Z" level=error msg="cannot accept configuration" build.id=23 build.number=23 error="linter: invalid or missing image" repo.id=47 repo.name=mitgliederverwaltung repo.namespace=local-it stage.id=21 stage.name=default stage.number=1 thread=2
'2025-04-21T12:44:47.610131119Z time="2025-04-21T12:44:47Z" level=error msg="cannot accept configuration" build.id=24 build.number=24 error="linter: invalid or missing image" repo.id=47 repo.name=mitgliederverwaltung repo.namespace=local-it stage.id=22 stage.name=default stage.number=1 thread=4
�2025-04-21T13:06:24.170483961Z time="2025-04-21T13:06:24Z" level=error msg="cannot get stage details" error="token was already used" stage.id=31 stage.name=default stage.number=1 thread=3
�2025-04-21T13:06:24.237252799Z time="2025-04-21T13:06:24Z" level=error msg="cannot get stage details" error="token was already used" stage.id=32 stage.name=default stage.number=1 thread=1
�2025-04-21T13:19:03.196871691Z time="2025-04-21T13:19:03Z" level=error msg="cannot get stage details" error="token was already used" stage.id=33 stage.name=default stage.number=1 thread=4
�2025-04-21T13:19:03.297781232Z time="2025-04-21T13:19:03Z" level=error msg="cannot get stage details" error="token was already used" stage.id=34 stage.name=default stage.number=1 thread=2
m2025-03-18T16:41:28.528045991Z time="2025-03-18T16:41:28Z" level=info msg="starting the server" addr=":3000"
r2025-03-18T16:41:28.847713686Z time="2025-03-18T16:41:28Z" level=info msg="successfully pinged the remote server"
�2025-03-18T16:41:28.847832840Z time="2025-03-18T16:41:28Z" level=info msg="polling the remote server" arch=amd64 capacity=4 endpoint="https://drone.dev.local-it.cloud" kind=pipeline os=linux type=docker
D2025-04-02T03:53:21.451509481Z received signal, terminating process
�2025-04-02T03:53:28.415118244Z time="2025-04-02T03:53:28Z" level=error msg="shutting down the server" error="http: Server closed"
[2025-04-02T03:53:28.982768155Z drone-runner-docker: error: http: Server closed, try --help

I restarted the docker runner. Can you test if it works now?

``` �2025-04-21T11:09:26.830001415Z time="2025-04-21T11:09:26Z" level=error msg="cannot get stage details" error="token was already used" stage.id=8 stage.name=default stage.number=1 thread=1 �2025-04-21T11:54:25.693649704Z time="2025-04-21T11:54:25Z" level=error msg="cannot get stage details" error="token was already used" stage.id=14 stage.name=default stage.number=1 thread=2 '2025-04-21T12:44:47.002218309Z time="2025-04-21T12:44:47Z" level=error msg="cannot accept configuration" build.id=23 build.number=23 error="linter: invalid or missing image" repo.id=47 repo.name=mitgliederverwaltung repo.namespace=local-it stage.id=21 stage.name=default stage.number=1 thread=2 '2025-04-21T12:44:47.610131119Z time="2025-04-21T12:44:47Z" level=error msg="cannot accept configuration" build.id=24 build.number=24 error="linter: invalid or missing image" repo.id=47 repo.name=mitgliederverwaltung repo.namespace=local-it stage.id=22 stage.name=default stage.number=1 thread=4 �2025-04-21T13:06:24.170483961Z time="2025-04-21T13:06:24Z" level=error msg="cannot get stage details" error="token was already used" stage.id=31 stage.name=default stage.number=1 thread=3 �2025-04-21T13:06:24.237252799Z time="2025-04-21T13:06:24Z" level=error msg="cannot get stage details" error="token was already used" stage.id=32 stage.name=default stage.number=1 thread=1 �2025-04-21T13:19:03.196871691Z time="2025-04-21T13:19:03Z" level=error msg="cannot get stage details" error="token was already used" stage.id=33 stage.name=default stage.number=1 thread=4 �2025-04-21T13:19:03.297781232Z time="2025-04-21T13:19:03Z" level=error msg="cannot get stage details" error="token was already used" stage.id=34 stage.name=default stage.number=1 thread=2 m2025-03-18T16:41:28.528045991Z time="2025-03-18T16:41:28Z" level=info msg="starting the server" addr=":3000" r2025-03-18T16:41:28.847713686Z time="2025-03-18T16:41:28Z" level=info msg="successfully pinged the remote server" �2025-03-18T16:41:28.847832840Z time="2025-03-18T16:41:28Z" level=info msg="polling the remote server" arch=amd64 capacity=4 endpoint="https://drone.dev.local-it.cloud" kind=pipeline os=linux type=docker D2025-04-02T03:53:21.451509481Z received signal, terminating process �2025-04-02T03:53:28.415118244Z time="2025-04-02T03:53:28Z" level=error msg="shutting down the server" error="http: Server closed" [2025-04-02T03:53:28.982768155Z drone-runner-docker: error: http: Server closed, try --help ``` I restarted the docker runner. Can you test if it works now?
moritz approved these changes 2025-04-23 14:00:23 +02:00
moritz left a comment
Owner

Local run works fine.

Local run works fine.
rafael force-pushed ci-setup from db3e79b1ec to 054528d288 2025-04-23 15:25:48 +02:00 Compare
Author
Collaborator

Hmm, seems like forgejo is not running the checks now.

Hmm, seems like forgejo is not running the checks now.
moritz added 1 commit 2025-04-23 18:08:46 +02:00
drone test
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is failing
581c5e9c83
Owner
/usr/lib/postgresql/17/bin/pg_isready: invalid option -- 'u'
pg_isready: hint: Try "pg_isready --help" for more information.
Postgres did not become available, aborting.
``` /usr/lib/postgresql/17/bin/pg_isready: invalid option -- 'u' pg_isready: hint: Try "pg_isready --help" for more information. Postgres did not become available, aborting. ```
moritz added 1 commit 2025-04-23 18:38:30 +02:00
fix wait_for_postgres
Some checks reported errors
continuous-integration/drone/push Build encountered an error
continuous-integration/drone/pr Build encountered an error
018268f9be
Owner

The runner now outputs this logs:

2025-04-23T16:38:31.710283434Z time="2025-04-23T16:38:31Z" level=error msg="cannot get stage details" error="token was already used" stage.id=40 stage.name=default stage.number=1 thread=1

And drone shows Error response from daemon: invalid reference format

The runner now outputs this logs: ``` 2025-04-23T16:38:31.710283434Z time="2025-04-23T16:38:31Z" level=error msg="cannot get stage details" error="token was already used" stage.id=40 stage.name=default stage.number=1 thread=1 ``` And drone shows `Error response from daemon: invalid reference format`
Owner

The test stage is always failing without any output

The test stage is always failing without any output
moritz added 1 commit 2025-04-23 19:12:32 +02:00
disable test stage
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
f8e6eb424e
moritz added 1 commit 2025-04-23 21:19:17 +02:00
fix test stage
Some checks reported errors
continuous-integration/drone/push Build was killed
continuous-integration/drone/pr Build was killed
8f3d7128a8
moritz added 1 commit 2025-04-23 21:22:00 +02:00
fix dependency stage
Some checks reported errors
continuous-integration/drone/push Build was killed
continuous-integration/drone/pr Build was killed
9ed2194d78
moritz added 1 commit 2025-04-23 21:26:16 +02:00
remove dependencies
Some checks reported errors
continuous-integration/drone/pr Build was killed
continuous-integration/drone/push Build is passing
b300a394bc
moritz added 1 commit 2025-04-23 21:51:27 +02:00
only run ci on push, prevent double execution
All checks were successful
continuous-integration/drone/push Build is passing
532fc49583
rafael changed title from WIP: Add basic CI setup to Add basic CI setup 2025-04-24 16:20:15 +02:00
rafael merged commit 73b5b90ecd into ash-setup 2025-04-24 16:20:37 +02:00
Sign in to join this conversation.
No description provided.