FTP, SFTP uploader for Gitea webhook
CLONED_REPO_ROOT
in webhook-basket.ini
ftp
or sftp
webhook-basket
webhook-basket -h
# Because of pkg name, not work yet. just download this repo
# go get github.com/practice-golang/webhook-basket
build.ps1
# Because of pkg name, not work yet. just download this repo
# go get github.com/practice-golang/webhook-basket
build.sh
webhook-basket
should be run with each of ini
filesini
files have to be set different number nohup webhook-basket -ini config_a.ini &
nohup webhook-basket -ini config_b.ini &
...
start webhook-basket.exe -ini config_a.ini
start webhook-basket.exe -ini config_b.ini
...
secret
should be added if set it in ini
filehttp://localhost:7749/deploy
# Files will be copied to DEPLOYMENT_ROOT/json_repository_name
# DEPLOYMENT_ROOT variable is in ini file
# json_repository_name is in requested json data
deploy-name
parameter when site name is different from name of the repository
http://localhost:7749/deploy?deploy-name=othername
# Files will be copied to DEPLOYMENT_ROOT/othername
# DEPLOYMENT_ROOT variable is in ini file
deploy-root
parameter when deployment root is different from the path in webhook-basket.ini
http://localhost:7749/deploy?deploy-root=/home/newroot
# Files will be copied to /home/newroot/json_repository_name
# json_repository_name is in requested json data
http://localhost:7749/deploy?deploy-name=othername&deploy-root=/home/newroot
# Files will be copied to /home/newroot/othername/
http://localhost:7749/deploy?deploy-name=othername&deploy-root=/
# Files will be copied to /othername/
webhook-basket
use only following data from Gitea sending
{
"repository": {
"name": "sample-repo",
"full_name": "practice-golang/sample-repo",
"clone_url": "http://localhost:3000/practice-golang/sample-repo.git",
}
}
webhook-basket
read one header of following signatures which generated with secret
in ini
and in secret form
in webhook
.
X-Gitea-Signature: 2f8e..
X-Gogs-Signature: 2f8e..
X-Hub-Signature-256: sha256=2f8e..
.wbignore
to the target repository.gitignore
.
```.gitignore
/.git
.gitignore
.wbignoreREADME.md
## Delete temporary repository root
* Send following request
```sh
DELETE uri/deploy-root
Secret secRET12345 # optional. If not set in ini, this will be ignored
app.ini
of Gitea
[webhook]
ALLOWED_HOST_LIST = *
DELIVER_TIMEOUT = 120
GET health
- Health checkPOST deploy
- Receive webhook and deployDELETE repos-root
- Delete temporary repository rootrequests.http