Skip to content

Commit

Permalink
feat: remove the json dump to terminal
Browse files Browse the repository at this point in the history
  • Loading branch information
ReeceM committed May 1, 2021
1 parent 27a4183 commit 404346c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,21 @@
To use this in a ci file, do the following

```bash
VERSION='v1.0.0' # Get the latest tagged version
VERSION='v1.0.1' # Get the latest tagged version
tar xvf <(curl -sL https://github.com/ReeceM/koyeb-touch/releases/download/$VERSION/koyeb-touch-$VERSION-linux-amd64.tar.gz)
chmod +x koyeb-touch
./koyeb-touch $KOYEB_API_TOKEN $KOYEB_APP_NAME $KOYEB_SERVICE_NAME
```

For GitLab it can be something like so:

You need to add the following to your CI/CD pipeline settings as variables:
|`KOYEB_API_TOKEN` | `KOYEB_APP_NAME` | `KOYEB_SERVICE_NAME`|
| ---------------- | ---------------- | ------------------- |
| ---------------- | ---------------- | ------------------- |
| This is the API token created in Koyeb | The name of the app, you can get it in the URL or what you called it | The name of the service, usually `main` |
```yml
variables:
VERSION: 'v1.0.0'
VERSION: 'v1.0.1'

koyeb:
stage: deploy
Expand Down
7 changes: 5 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,10 @@ func (k *KoyebApplication) touchRevision(service KoyebService) {
log.Fatalln(err)
}

body, _ := ioutil.ReadAll(res.Body)
if res.StatusCode == 200 {
fmt.Println("Completed Successfully")
}
// body, _ := ioutil.ReadAll(res.Body)

fmt.Println(string(body))
fmt.Println("Result is not determinate, please check Koyeb dashboard")
}

0 comments on commit 404346c

Please sign in to comment.