Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use hook.pipelinesascode.com now, smee.io is not active anymore #1196

Merged
merged 2 commits into from
Mar 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/content/dev/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ it's enforced).
The `install.sh` script will by default spin up a new instance of GITEA to play
with and run the Gitea E2E tests.

You will need to create a Smee URL generated from <https://smee.io/new>
You will need to create a Hook URL generated from <https://hook.pipelinesascode.com/new>
into the environment variable `TEST_GITEA_SMEEURL`.

The defaults are :
Expand All @@ -123,7 +123,7 @@ The E2E tests will automatically create repo using the admin username for each t

## Debugging controller

Create a [smee](https://smee.io) URL and point your app/webhook to it. Use
Create a [hook](https://hook.pipelinesascode.com) URL and point your app/webhook to it. Use
[gosmee](https://github.com/chmouel/gosmee) to forward the requests from github
to your locally installed controller (this can be either run on your debugger or
inside kind).
Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/guide/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ application.
On Kubernetes, tkn-pac will attempt to detect the tekton-dashboard Ingress URL.

It will also ask you if you want to install a webhook forwarder called
[gosmee](https://github.com/chmouel/gosmee) on <https://smee.io>.
[gosmee](https://github.com/chmouel/gosmee) on <https://hook.pipelinesascode.com>.
This allows you to connect the Pipelines as Code controller to GitHub even if
it's is not directly accessible from the internet.

Expand Down
8 changes: 4 additions & 4 deletions docs/content/docs/install/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,15 +146,15 @@ Pipelines as Code requires an externally accessible URL to receive events from G
If you're developing locally (such as on kind or Minikube) or don't want to set up an ingress on your cluster,
you can also use a proxy service to expose the `pipelines-as-code-controller` service and allow it to receive events.

### Proxying with smee.io
### Proxying with hook.pipelinesascode.com

To handle such scenario for minikube/kind cluster let's use [smee.io](https://smee.io/)
To handle such scenario for minikube/kind cluster let's use [hook.pipelinesascode.com](https://hook.pipelinesascode.com/)

- Generate your own URL by going to [smee.io/new](https://smee.io/new)
- Generate your own URL by going to [hook.pipelinesascode.com/new](https://hook.pipelinesascode.com/new)
- Copy `Webhook Proxy URL`
- Add `Webhook Proxy URL` URL in container args of `deployment.yaml`.

Ex: `'<replace Webhook Proxy URL>'` -> `'https://smee.io/oLHu7IjUV4wGm2tJ'`
ex: `'<replace Webhook Proxy URL>'` -> `'https://hook.pipelinesascode.com/oLHu7IjUV4wGm2tJ'`

```yaml
kind: Deployment
Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/install/kubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ your Git provider. You can find the ingress's address via
If you are quickly trying pipelines-as-code and do not want to setup the Ingress
access, the `tkn pac bootstrap` [cli](../../guide/cli) command will let you
set-up a [gosmee](https://github.com/chmouel/gosmee) deployment using the
webhook URL remote forwarder `https://smee.io`.
webhook URL remote forwarder `https://hook.pipelinesascode.com`.

### [GKE](https://cloud.google.com/kubernetes-engine)

Expand Down
2 changes: 1 addition & 1 deletion hack/dev/kind/gitea/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This will :
- create a user/password
- create a token for user/password
- create a empty repository
- create a hook to go to a smee.io URL
- create a hook to go to a hook.pipelinesascode.com URL
- create a deployment with gosmee to forward smee URL to the pipelines as code controller
- create a rpo crd to bind to it.
- create a secret for the Git provider with the token generated previously
Expand Down
2 changes: 1 addition & 1 deletion hack/dev/kind/gitea/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
GITEA_SMEE_HOOK_URL = os.environ.get("TEST_GITEA_SMEEURL", "") # will fail if not set
if GITEA_SMEE_HOOK_URL == "":
print(
"You need to setupo a SMEE URL in https://smee.io and set it up as environement variable in the `TEST_GITEA_SMEEURL` variable"
"You need to setupo a Hook URL in https://hook.pipelinesascode.com and set it up as environement variable in the `TEST_GITEA_SMEEURL` variable"
)
sys.exit(1)

Expand Down
6 changes: 3 additions & 3 deletions hack/dev/kind/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
# This should create a dashboard and a PAAC URL at the end on http
#
# You should forward the URL via smee,
# - create a URL in there by going to https://smee.io
# - create a URL in there by going to https://hook.pipelinesascode.com
# - install gosmee: go install -v github.com/chmouel/gosmee@latest
# - run somewhere in a terminal :
# gosmee client https://smee.io/aBcDeF http://controller.paac-127-0-0-1.nip.io
# gosmee client https://hook.pipelinesascode.com/aBcDeF http://controller.paac-127-0-0-1.nip.io
#
# You probably need to install passwordstore https://www.passwordstore.org/ and
# add your github secrets : github-application-id github-private-key
Expand Down Expand Up @@ -192,7 +192,7 @@ function configure_pac() {
echo "Set Active Namespace to pipelines-as-code"
kubectl config set-context --current --namespace=pipelines-as-code >/dev/null
type -p gosmee || echo "You may want to install psmee with: go install -v github.com/chmouel/gosmee@latest and run:
gosmee client --saveDir /tmp/replays https://smee.io/SMEEID http://controller.${DOMAIN_NAME}"
gosmee client --saveDir /tmp/replays https://hook.pipelinesascode.com/SMEEID http://controller.${DOMAIN_NAME}"
}

function install_gitea ()
Expand Down
3 changes: 1 addition & 2 deletions pkg/cmd/tknpac/bootstrap/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ const (
openShiftRouteResource = "routes"
secretName = "pipelines-as-code-secret"
defaultProviderType = "github-app"
// https://webhook.chmouel.com/ is a good value too :p
defaultWebForwarderURL = "https://smee.io"
defaultWebForwarderURL = "https://hook.pipelinesascode.com"
)

var providerTargets = []string{"github-app", "github-enterprise-app"}
Expand Down
4 changes: 2 additions & 2 deletions pkg/cmd/tknpac/bootstrap/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const (
gosmeeInstallHelpText = `Pipelines as Code does not install a Ingress object to make the controller accessing from the internet
we can install a webhook forwarder called gosmee (https://github.com/chmouel/gosmee) using a %s URL
this will let your git platform provider (ie: Github) to reach the controller without having to be having public access`
minNumOfCharForRandomForwarderID = 16
minNumOfCharForRandomForwarderID = 12
)

func getLatestRelease(ctx context.Context, k8release string) (string, string, error) {
Expand Down Expand Up @@ -106,7 +106,7 @@ func getDashboardURL(ctx context.Context, opts *bootstrapOpts, run *params.Run)
return nil
}

// installGosmeeForwarder Install a gosmee forwarded to smee.io
// installGosmeeForwarder Install a gosmee forwarded to hook.pipelinesascode.com
func installGosmeeForwarder(opts *bootstrapOpts) error {
gosmeInstall, err := askYN(true, fmt.Sprintf(gosmeeInstallHelpText, opts.forwarderURL), "Do you want me to install the gosmee forwarder?", opts.ioStreams.Out)
if err != nil {
Expand Down
8 changes: 4 additions & 4 deletions pkg/cmd/tknpac/webhook/add_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func TestWebhookAdd(t *testing.T) {
},
Data: map[string]string{
"version": "devel",
"controller-url": "https://smee.io/WKR2cP3ug5K6A92T",
"controller-url": "https://hook.pipelinesascode.com/WKR2cP3ug5K6A92T",
},
}

Expand Down Expand Up @@ -135,7 +135,7 @@ func TestWebhookAdd(t *testing.T) {
},
configMaps: []*corev1.ConfigMap{configMap},
wantErr: true, // returning error while creating webhook because it requires actual personal access token in order to connect github
wantMsg: "✓ Setting up GitHub Webhook for Repository https://anurl.com/owner/repo\n👀 I have detected a controller url: https://smee.io/WKR2cP3ug5K6A92T\nℹ ️You now need to create a GitHub personal access token, please checkout the docs at https://is.gd/KJ1dDH for the required scopes\n",
wantMsg: "✓ Setting up GitHub Webhook for Repository https://anurl.com/owner/repo\n👀 I have detected a controller url: https://hook.pipelinesascode.com/WKR2cP3ug5K6A92T\nℹ ️You now need to create a GitHub personal access token, please checkout the docs at https://is.gd/KJ1dDH for the required scopes\n",
}, {
name: "failed to configure webhook when git_provider secret is empty",
namespaces: []*corev1.Namespace{namespace2},
Expand Down Expand Up @@ -184,7 +184,7 @@ func TestWebhookAdd(t *testing.T) {
askStubs: func(as *prompt.AskStubber) {
as.StubOne("github")
as.StubOne("Yes")
as.StubOne("https://smee.io/WKR2cP3ug5K6A92T")
as.StubOne("https://hook.pipelinesascode.com/WKR2cP3ug5K6A92T")
as.StubOne("53353")
as.StubOne("https://github.com")
},
Expand All @@ -196,7 +196,7 @@ func TestWebhookAdd(t *testing.T) {
opts: &cli.PacCliOpts{
Namespace: namespace2.GetName(),
},
wantMsg: "✓ Setting up GitHub Webhook for Repository https://github.com/owner/repo\n👀 I have detected a controller url: https://smee.io/WKR2cP3ug5K6A92T\n",
wantMsg: "✓ Setting up GitHub Webhook for Repository https://github.com/owner/repo\n👀 I have detected a controller url: https://hook.pipelinesascode.com/WKR2cP3ug5K6A92T\n",
wantErr: true, // error out because creating webhook in a repository requires valid provider token

}}
Expand Down