feat: CI: spin up forgeflux intance and init it
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
fcf9412fc6
commit
66e9ec20f9
1 changed files with 59 additions and 5 deletions
|
@ -7,9 +7,11 @@ steps:
|
||||||
POSTGRES_DATABASE_URL: postgres://postgres:password@database:5432/postgres
|
POSTGRES_DATABASE_URL: postgres://postgres:password@database:5432/postgres
|
||||||
commands:
|
commands:
|
||||||
- pip install requests
|
- pip install requests
|
||||||
- sed -i 's/localhost/forgejo/' scripts/gitea.py
|
- sed -i 's/localhost\:3000/forgejo/' scripts/gitea.py
|
||||||
- python ./scripts/gitea.py
|
- python ./scripts/gitea.py
|
||||||
|
# - curl -vv http://forgejo/api/v1/repos/bot/repository_58
|
||||||
|
# - curl -vv http://forge_forgeflux/forgejo/bot/repository_58
|
||||||
|
# - curl -vv http://forge_forgeflux/forgejo/bot/repository_01
|
||||||
|
|
||||||
test:
|
test:
|
||||||
image: rust
|
image: rust
|
||||||
|
@ -18,7 +20,8 @@ steps:
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_DATABASE_URL: postgres://postgres:password@database:5432/postgres
|
POSTGRES_DATABASE_URL: postgres://postgres:password@database:5432/postgres
|
||||||
SQLITE_DATABASE_URL: sqlite:///tmp/admin.db
|
SQLITE_DATABASE_URL: sqlite:///tmp/admin.db
|
||||||
FORGEJO_HOST: http://forgejo:3000
|
FORGEJO_HOST: http://forgejo
|
||||||
|
FORGEFLUX_HOST: http://forge_forgeflux
|
||||||
commands:
|
commands:
|
||||||
# - curl -fsSL https://deb.nodesource.com/setup_16.x | bash - &&\
|
# - curl -fsSL https://deb.nodesource.com/setup_16.x | bash - &&\
|
||||||
# - apt update && apt-get -y --no-install-recommends install nodejs tar gpg curl wget
|
# - apt update && apt-get -y --no-install-recommends install nodejs tar gpg curl wget
|
||||||
|
@ -32,7 +35,6 @@ steps:
|
||||||
# - make lint
|
# - make lint
|
||||||
- make test.workspaces
|
- make test.workspaces
|
||||||
|
|
||||||
|
|
||||||
build_docker_img:
|
build_docker_img:
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
when:
|
when:
|
||||||
|
@ -42,6 +44,20 @@ steps:
|
||||||
repo: forgeflux/starchart
|
repo: forgeflux/starchart
|
||||||
tags: latest
|
tags: latest
|
||||||
|
|
||||||
|
build_and_publish_docker_img:
|
||||||
|
image: plugins/docker
|
||||||
|
when:
|
||||||
|
event: [push, tag, deployment]
|
||||||
|
branch: master
|
||||||
|
settings:
|
||||||
|
username: forgeflux
|
||||||
|
password:
|
||||||
|
from_secret: DOCKER_TOKEN
|
||||||
|
repo: forgeflux/starchart
|
||||||
|
tags:
|
||||||
|
latest
|
||||||
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
forgejo:
|
forgejo:
|
||||||
image: codeberg.org/forgejo/forgejo:9
|
image: codeberg.org/forgejo/forgejo:9
|
||||||
|
@ -49,9 +65,47 @@ services:
|
||||||
FORGEJO__security__INSTALL_LOCK: true
|
FORGEJO__security__INSTALL_LOCK: true
|
||||||
FORGEJO__federation__ENABLED: true
|
FORGEJO__federation__ENABLED: true
|
||||||
FORGEJO__server__ROOT_URL: http://forgejo
|
FORGEJO__server__ROOT_URL: http://forgejo
|
||||||
FORGEJO__server__HTTP_PORT: 3000
|
FORGEJO__server__HTTP_PORT: 80
|
||||||
|
|
||||||
database:
|
database:
|
||||||
image: postgres
|
image: postgres
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_PASSWORD: password
|
POSTGRES_PASSWORD: password
|
||||||
|
|
||||||
|
forge_forgeflux_database:
|
||||||
|
image: postgres
|
||||||
|
environment:
|
||||||
|
POSTGRES_PASSWORD: password
|
||||||
|
|
||||||
|
forge_forgeflux:
|
||||||
|
image: forgeflux/forgeflux:latest
|
||||||
|
depends_on:
|
||||||
|
- forgeflux_postgres
|
||||||
|
environment:
|
||||||
|
FORGEFLUX_server_PUBLIC_URL_HAS_HTTPS: false
|
||||||
|
FORGEFLUX_debug: true
|
||||||
|
FORGEFLUX_source_code: https://git.batsense.net/ForgeFlux/ForgeFlux
|
||||||
|
FORGEFLUX_allow_registration: true
|
||||||
|
FORGEFLUX_database_POOL: 2
|
||||||
|
FORGEFLUX_forges_FORGEJO_url: http://forgejo
|
||||||
|
FORGEFLUX_forges_FORGEJO_client_id: foo
|
||||||
|
FORGEFLUX_forges_FORGEJO_client_secret: foo
|
||||||
|
FORGEFLUX_forges_FORGEJO_user_USERNAME: foo
|
||||||
|
FORGEFLUX_forges_FORGEJO_user_API_TOKEN: foo
|
||||||
|
DATABASE_URL: postgres://postgres:password@forgeflux_postgres:5432/postgres
|
||||||
|
PORT: 80
|
||||||
|
FORGEFLUX_server_DOMAIN: forge_forgeflux
|
||||||
|
FORGEFLUX_server_COOKIE_SECRET: 995cde0721b6e41602dd111438cc7c1b2506dc14bad31d2653fb9a4adce1f84e
|
||||||
|
FORGEFLUX_server_IP: 0.0.0.0
|
||||||
|
FORGEFLUX_forges_GITHUB_url: https://github.com
|
||||||
|
FORGEFLUX_forges_GITHUB_api_url: https://api.github.com
|
||||||
|
FORGEFLUX_forges_GITHUB_client_id: foo
|
||||||
|
FORGEFLUX_forges_GITHUB_client_secret: foo
|
||||||
|
FORGEFLUX_forges_GITHUB_user_USERNAME: foo
|
||||||
|
FORGEFLUX_forges_GITHUB_user_PERSONAL_ACCESS_TOKEN: foo
|
||||||
|
FORGEFLUX_starchart_enable: true
|
||||||
|
|
||||||
|
forgeflux_postgres:
|
||||||
|
image: postgres:17.2
|
||||||
|
environment:
|
||||||
|
POSTGRES_PASSWORD: password # change password
|
||||||
|
|
Loading…
Add table
Reference in a new issue