Skip to content

Commit

Permalink
chore: add gitea test environment
Browse files Browse the repository at this point in the history
  • Loading branch information
moshloop committed Jan 4, 2024
1 parent 566ea34 commit ecc0655
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
16 changes: 16 additions & 0 deletions fixtures/git/_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,19 @@ kubectl create namespace canaries || true

kubectl create secret generic github-token --from-literal=GITHUB_TOKEN="${GH_TOKEN}" --namespace canaries
kubectl get secret github-token -o yaml --namespace canaries

helm repo add gitea-charts https://dl.gitea.io/charts
helm repo update
helm install gitea gitea-charts/gitea -f gitea.values --create-namespace --namespace gitea --wait

kubectl port-forward svc/gitea-http -n gitea 3001:3000 &
PID=$!

sleep 5

curl -vvv -u gitea_admin:admin -H "Content-Type: application/json" http://localhost:3001/api/v1/user/repos -d '{"name":"test_repo","auto_init":true}'

kill $PID


kubectl create secret generic gitea --from-literal=username=gitea_admin --from-literal=password=admin --from-literal=url=http:///gitea-http.gitea.svc:3000/gitea_admin/test_repo.git
37 changes: 37 additions & 0 deletions fixtures/git/gitea.values
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
gitea:
additionalConfigFromEnvs: []
additionalConfigSources: []
admin:
email: gitea@local.domain
existingSecret: null
password: admin
username: gitea_admin
config:
security:
PASSWORD_COMPLEXITY: "off"
server:
SSH_LISTEN_PORT: 2222
SSH_PORT: 22
persistence:
enabled: false
postgresql-ha:
enabled: false
redis-cluster:
enabled: false
postgresql:
enabled: true
persistence:
enabled: false
global:
postgresql:
persistence:
enabled: false
auth:
database: gitea
password: gitea
username: gitea
service:
ports:
postgresql: 5432
test:
enabled: true

0 comments on commit ecc0655

Please sign in to comment.