rename to gitdeploy
This commit is contained in:
parent
83e91a1fd8
commit
96c416176f
|
@ -1,3 +1,5 @@
|
|||
/gitdeploy
|
||||
|
||||
*_vfsdata.go
|
||||
/gitdeploy
|
||||
/git-deploy
|
||||
|
|
22
README.md
22
README.md
|
@ -1,13 +1,13 @@
|
|||
# [git-deploy](https://git.ryanburnette.com/ryanburnette/git-deploy)
|
||||
# [gitdeploy](https://git.rootprojects.org/root/gitdeploy)
|
||||
|
||||
**git-deploy** is an app for handling continuous deployment of static websites.
|
||||
**gitdeploy** is an app for handling continuous deployment of static websites.
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
echo 'GITHUB_SECRET=xxxxxxx' >> .env
|
||||
./git-deploy init
|
||||
./git-deploy run --listen :3000 --serve-path ./overrides --exec ./path/to/script.sh
|
||||
./gitdeploy init
|
||||
./gitdeploy run --listen :3000 --serve-path ./overrides --exec ./path/to/script.sh
|
||||
```
|
||||
|
||||
To manage `git credentials`
|
||||
|
@ -86,29 +86,29 @@ Sometimes Bitbucket does not give you the option to specify the (`X-Hub-Signatur
|
|||
so you'll have to append an `access_token` instead. Example:
|
||||
|
||||
```txt
|
||||
Title: git-deploy
|
||||
Title: gitdeploy
|
||||
URL: https://YOUR_DOMAIN/api/webhooks/bitbucket?access_token=YOUR_SECRET
|
||||
Triggers: Repository push
|
||||
```
|
||||
|
||||
## TODO
|
||||
|
||||
**git-deploy** is intended for use with static websites that are generated after
|
||||
**gitdeploy** is intended for use with static websites that are generated after
|
||||
changes are pushed to a Git repository. This works with sites that are being
|
||||
edited in code and tracked in Git. Sites that have their content managed with a
|
||||
headless CMS that pushes to Git are also very well-suited.
|
||||
|
||||
**git-deploy** supports verified webhooks from Github, Bitbucket, and Gitea.
|
||||
**gitdeploy** supports verified webhooks from Github, Bitbucket, and Gitea.
|
||||
|
||||
**git-deploy** is written in Go. This means that it's a standalone binary
|
||||
**gitdeploy** is written in Go. This means that it's a standalone binary
|
||||
available on all major operating systems and architectures. It provides an API
|
||||
with endpoints that handle webhooks, allow for initiation of builds, and getting
|
||||
the status of builds and build jobs.
|
||||
|
||||
**git-deploy** comes with a simple interface. The interface be disabled if you
|
||||
**gitdeploy** comes with a simple interface. The interface be disabled if you
|
||||
don't want to use it.
|
||||
|
||||
**git-deploy** also comes with basic authentication via integration with
|
||||
**gitdeploy** also comes with basic authentication via integration with
|
||||
[Pocket ID](https://pocketid.app). Authentication can also be disabled if you
|
||||
don't want to use it. The built-in interface requires the built-in
|
||||
authentication.
|
||||
|
@ -148,7 +148,7 @@ crypto
|
|||
|
||||
## License
|
||||
|
||||
Copyright 2020 The git-deploy Authors
|
||||
Copyright 2020 The gitdeploy Authors
|
||||
|
||||
This Source Code Form is subject to the terms of the Mozilla Public \
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this \
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// +build !dev
|
||||
//go:generate go run -mod vendor github.com/shurcooL/vfsgen/cmd/vfsgendev -source="git.ryanburnette.com/ryanburnette/git-deploy/assets".Assets
|
||||
//go:generate go run -mod vendor github.com/shurcooL/vfsgen/cmd/vfsgendev -source="git.rootprojects.org/root/gitdeploy/assets".Assets
|
||||
|
||||
package assets
|
||||
|
|
|
@ -3,5 +3,5 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
_ "git.ryanburnette.com/ryanburnette/git-deploy/internal/webhooks/bitbucket"
|
||||
_ "git.rootprojects.org/root/gitdeploy/internal/webhooks/bitbucket"
|
||||
)
|
||||
|
|
2
gitea.go
2
gitea.go
|
@ -3,5 +3,5 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
_ "git.ryanburnette.com/ryanburnette/git-deploy/internal/webhooks/gitea"
|
||||
_ "git.rootprojects.org/root/gitdeploy/internal/webhooks/gitea"
|
||||
)
|
||||
|
|
|
@ -3,5 +3,5 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
_ "git.ryanburnette.com/ryanburnette/git-deploy/internal/webhooks/github"
|
||||
_ "git.rootprojects.org/root/gitdeploy/internal/webhooks/github"
|
||||
)
|
||||
|
|
2
go.mod
2
go.mod
|
@ -1,4 +1,4 @@
|
|||
module git.ryanburnette.com/ryanburnette/git-deploy
|
||||
module git.rootprojects.org/root/gitdeploy
|
||||
|
||||
go 1.15
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>git-deploy Dashboard</title>
|
||||
<title>gitdeploy Dashboard</title>
|
||||
<link rel="stylesheet" href="style.css" />
|
||||
<link
|
||||
href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,600;1,400&display=swap"
|
||||
|
@ -23,10 +23,10 @@
|
|||
<div class="column x-l">
|
||||
<p>
|
||||
<a
|
||||
href="https://git.ryanburnette.com/ryanburnette/git-deploy"
|
||||
href="https://git.rootprojects.org/root/gitdeploy"
|
||||
target="_blank"
|
||||
>
|
||||
git-deploy
|
||||
gitdeploy
|
||||
</a>
|
||||
v0.1.0
|
||||
</p>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
</div>
|
||||
<div class="content">
|
||||
<p>
|
||||
<b>git-deploy</b> is a tool for managing continuous deployment of
|
||||
<b>gitdeploy</b> is a tool for managing continuous deployment of
|
||||
statically generated websites.
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div class="container is-fluid">
|
||||
<div class="navbar-brand">
|
||||
<span class="navbar-item brand-text has-text-weight-bold">
|
||||
git-deploy
|
||||
gitdeploy
|
||||
</span>
|
||||
</div>
|
||||
<div id="navMenu" class="navbar-menu">
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<div class="box">
|
||||
<div class="title">
|
||||
<h1 class="is-size-4 has-text-centered has-text-weight-bold">
|
||||
git-deploy
|
||||
gitdeploy
|
||||
</h1>
|
||||
</div>
|
||||
<div class="content has-text-centered signin-info">
|
||||
|
|
|
@ -10,8 +10,8 @@ import (
|
|||
"os"
|
||||
"strings"
|
||||
|
||||
"git.ryanburnette.com/ryanburnette/git-deploy/internal/options"
|
||||
"git.ryanburnette.com/ryanburnette/git-deploy/internal/webhooks"
|
||||
"git.rootprojects.org/root/gitdeploy/internal/options"
|
||||
"git.rootprojects.org/root/gitdeploy/internal/webhooks"
|
||||
|
||||
"github.com/go-chi/chi"
|
||||
"github.com/google/go-github/v32/github"
|
||||
|
|
|
@ -12,8 +12,8 @@ import (
|
|||
"os"
|
||||
"strings"
|
||||
|
||||
"git.ryanburnette.com/ryanburnette/git-deploy/internal/options"
|
||||
"git.ryanburnette.com/ryanburnette/git-deploy/internal/webhooks"
|
||||
"git.rootprojects.org/root/gitdeploy/internal/options"
|
||||
"git.rootprojects.org/root/gitdeploy/internal/webhooks"
|
||||
|
||||
"github.com/go-chi/chi"
|
||||
)
|
||||
|
|
|
@ -8,8 +8,8 @@ import (
|
|||
"os"
|
||||
"strings"
|
||||
|
||||
"git.ryanburnette.com/ryanburnette/git-deploy/internal/options"
|
||||
"git.ryanburnette.com/ryanburnette/git-deploy/internal/webhooks"
|
||||
"git.rootprojects.org/root/gitdeploy/internal/options"
|
||||
"git.rootprojects.org/root/gitdeploy/internal/webhooks"
|
||||
|
||||
"github.com/go-chi/chi"
|
||||
// TODO nix this dependency in favor of a lightweight X-Hub-Signature
|
||||
|
|
26
main.go
26
main.go
|
@ -13,9 +13,9 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"git.ryanburnette.com/ryanburnette/git-deploy/assets"
|
||||
"git.ryanburnette.com/ryanburnette/git-deploy/internal/options"
|
||||
"git.ryanburnette.com/ryanburnette/git-deploy/internal/webhooks"
|
||||
"git.rootprojects.org/root/gitdeploy/assets"
|
||||
"git.rootprojects.org/root/gitdeploy/internal/options"
|
||||
"git.rootprojects.org/root/gitdeploy/internal/webhooks"
|
||||
|
||||
"github.com/go-chi/chi"
|
||||
"github.com/go-chi/chi/middleware"
|
||||
|
@ -339,12 +339,12 @@ func runHook(hook webhooks.Ref) {
|
|||
|
||||
if _, exists := jobs[jobID]; exists {
|
||||
// TODO put job in backlog
|
||||
log.Printf("git-deploy job already started for %s#%s\n", hook.HTTPSURL, hook.RefName)
|
||||
log.Printf("gitdeploy job already started for %s#%s\n", hook.HTTPSURL, hook.RefName)
|
||||
return
|
||||
}
|
||||
|
||||
if err := cmd.Start(); nil != err {
|
||||
log.Printf("git-deploy exec error: %s\n", err)
|
||||
log.Printf("gitdeploy exec error: %s\n", err)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -356,12 +356,12 @@ func runHook(hook webhooks.Ref) {
|
|||
}
|
||||
|
||||
go func() {
|
||||
log.Printf("git-deploy job for %s#%s started\n", hook.HTTPSURL, hook.RefName)
|
||||
log.Printf("gitdeploy job for %s#%s started\n", hook.HTTPSURL, hook.RefName)
|
||||
if err := cmd.Wait(); nil != err {
|
||||
log.Printf("git-deploy job for %s#%s exited with error: %v", hook.HTTPSURL, hook.RefName, err)
|
||||
log.Printf("gitdeploy job for %s#%s exited with error: %v", hook.HTTPSURL, hook.RefName, err)
|
||||
return
|
||||
}
|
||||
log.Printf("git-deploy job for %s#%s finished\n", hook.HTTPSURL, hook.RefName)
|
||||
log.Printf("gitdeploy job for %s#%s finished\n", hook.HTTPSURL, hook.RefName)
|
||||
// TODO check for backlog
|
||||
}()
|
||||
}
|
||||
|
@ -420,17 +420,17 @@ func runPromote(hook webhooks.Ref, promoteTo string) {
|
|||
|
||||
if _, exists := jobs[jobID1]; exists {
|
||||
// TODO put promote in backlog
|
||||
log.Printf("git-deploy job already started for %s#%s\n", hook.HTTPSURL, hook.RefName)
|
||||
log.Printf("gitdeploy job already started for %s#%s\n", hook.HTTPSURL, hook.RefName)
|
||||
return
|
||||
}
|
||||
if _, exists := jobs[jobID2]; exists {
|
||||
// TODO put promote in backlog
|
||||
log.Printf("git-deploy job already started for %s#%s\n", hook.HTTPSURL, promoteTo)
|
||||
log.Printf("gitdeploy job already started for %s#%s\n", hook.HTTPSURL, promoteTo)
|
||||
return
|
||||
}
|
||||
|
||||
if err := cmd.Start(); nil != err {
|
||||
log.Printf("git-deploy exec error: %s\n", err)
|
||||
log.Printf("gitdeploy exec error: %s\n", err)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -448,11 +448,11 @@ func runPromote(hook webhooks.Ref, promoteTo string) {
|
|||
}
|
||||
|
||||
go func() {
|
||||
log.Printf("git-deploy promote for %s#%s started\n", hook.HTTPSURL, hook.RefName)
|
||||
log.Printf("gitdeploy promote for %s#%s started\n", hook.HTTPSURL, hook.RefName)
|
||||
_ = cmd.Wait()
|
||||
killers <- jobID1
|
||||
killers <- jobID2
|
||||
log.Printf("git-deploy promote for %s#%s finished\n", hook.HTTPSURL, hook.RefName)
|
||||
log.Printf("gitdeploy promote for %s#%s finished\n", hook.HTTPSURL, hook.RefName)
|
||||
// TODO check for backlog
|
||||
}()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue