feat: re-enable gitea service in docker-compose and CI env setup

wip-infra-tests
Aravinth Manivannan 2022-06-27 02:42:55 +05:30
parent 9c64690c12
commit 243880f6cc
Signed by: realaravinth
GPG Key ID: AD9F0F08E855ED88
4 changed files with 35 additions and 25 deletions

View File

@ -7,9 +7,9 @@ pipeline:
commands:
- pip install virtualenv
- make env
# - make lint
# - make coverage
- make integration-test
- make lint
- make coverage
# - make integration-test
secrets: [ STRIPE_PUBLIC_KEY, STRIPE_SECRET_KEY ]
services:

View File

@ -25,6 +25,7 @@ docker: ## Build Docker image from source
env: ## Install all dependencies
@-virtualenv venv
. ./venv/bin/activate && pip install -r requirements.txt
. ./venv/bin/activate && ./integration/ci.sh
freeze: ## Freeze python dependencies
@. ./venv/bin/activate && pip freeze > requirements.txt

View File

@ -8,22 +8,22 @@ version: "3"
services:
#gitea:
# image: gitea/gitea:1.16.5
# container_name: hostea-dash-gitea
# network_mode: host
# environment:
# - USER_UID=1000
# - USER_GID=1000
# restart: always
# #networks:
# # - hostea-dash-gitea
# volumes:
# - /etc/timezone:/etc/timezone:ro
# - /etc/localtime:/etc/localtime:ro
# #ports:
# # - "8080:3000"
# # - "2221:22"
gitea:
image: gitea/gitea:1.16.5
container_name: hostea-dash-gitea
network_mode: host
environment:
- USER_UID=1000
- USER_GID=1000
restart: always
#networks:
# - hostea-dash-gitea
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
#ports:
# - "8080:3000"
# - "2221:22"
smtp:
image: maildev/maildev:latest

View File

@ -6,15 +6,24 @@ source integration/lib.sh
main() {
docker_compose_down || true
docker_compose_up
setup_env
wait_for_env
# CI runes these dependencies as part of its config, so skipping
# spinning up deps if running from within CI,
if [ -z ${CI+x} ];
then
docker_compose_down || true
docker_compose_up
setup_env
wait_for_env
fi
gitea_root
support_repo_init
fleet_repo_init
teardown_env
docker_compose_down
if [ -z ${CI+x} ];
then
teardown_env
docker_compose_down
fi
}
main