diff --git a/.gitpod.yml b/.gitpod.yml index 605d9b488..42bb481c1 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -40,6 +40,19 @@ tasks: -d "{ \"name\": \"Woodpecker CI\", \"redirect_uris\": [ \"https://8000-${GITPOD_WORKSPACE_ID}.${GITPOD_WORKSPACE_CLUSTER_HOST}/authorize\" ] }") echo WOODPECKER_GITEA_CLIENT=$(echo $GITEA_OAUTH_APP | jq -r .client_id) >> .env echo WOODPECKER_GITEA_SECRET=$(echo $GITEA_OAUTH_APP | jq -r .client_secret) >> .env + curl -X 'POST' \ + 'http://localhost:3000/api/v1/user/repos' \ + -H 'accept: application/json' \ + -H 'Content-Type: application/json' \ + -H "Authorization: token ${GITEA_TOKEN}" \ + -d '{ "auto_init": false, "name": "woodpecker-test", "private": true, "template": false, "trust_model": "default" }' + cd contrib/woodpecker-test-repo + git init + git checkout -b main + git remote add origin http://woodpecker:${GITEA_TOKEN}@localhost:3000/woodpecker/woodpecker-test.git + git add . + git commit -m ":tada: Initial commit" + git push -u origin main gp sync-done gitea $DOCKER_COMPOSE_CMD logs -f - name: App diff --git a/contrib/woodpecker-test-repo/.woodpecker/demo.yml b/contrib/woodpecker-test-repo/.woodpecker/demo.yml new file mode 100644 index 000000000..3d824208a --- /dev/null +++ b/contrib/woodpecker-test-repo/.woodpecker/demo.yml @@ -0,0 +1,5 @@ +pipeline: + demo: + image: 'alpine' + commands: + - echo 'Demo' diff --git a/contrib/woodpecker-test-repo/.woodpecker/test.yml b/contrib/woodpecker-test-repo/.woodpecker/test.yml new file mode 100644 index 000000000..68f632f80 --- /dev/null +++ b/contrib/woodpecker-test-repo/.woodpecker/test.yml @@ -0,0 +1,15 @@ +pipeline: + test_1: + image: 'alpine' + commands: + - echo 'Test 1' + + test_2: + image: 'alpine' + commands: + - echo 'Test 2' + + test_3: + image: 'alpine' + commands: + - echo 'Test 3' diff --git a/docker-compose.gitpod.yml b/docker-compose.gitpod.yml index f7c8af7cb..8acf4104d 100644 --- a/docker-compose.gitpod.yml +++ b/docker-compose.gitpod.yml @@ -25,7 +25,7 @@ services: USER_UID: 1000 USER_GID: 1000 # GITEA__server__DOMAIN: gitea.local.self - GITEA__server__ROOT_URL: http://gitea:3000 + GITEA__server__ROOT_URL: https://3000-${GITPOD_WORKSPACE_ID}.${GITPOD_WORKSPACE_CLUSTER_HOST} GITEA__database__DB_TYPE: postgres GITEA__database__HOST: gitea-database:5432 GITEA__database__NAME: gitea @@ -33,6 +33,7 @@ services: GITEA__database__PASSWD: 123456 GITEA__webhook__ALLOWED_HOST_LIST: "*" GITEA__security__INSTALL_LOCK: "true" + GITEA__security__INTERNAL_TOKEN: "123456" extra_hosts: - "host.docker.internal:host-gateway"