A stripped-back version of Amazeeio's rest2tasks service which is now deprecated in Lagoon. It serves as a replacement which performs nothing other than reporting back to the sender and receiver.
The sender will receive a json response which can be used programmatically if needed. The receiver will log a message to the stdout based on the input.
A public Docker image is available, you can pull it using the following:
$ docker pull quay.io/govcms/rest2tasks
There're three ways to run this application at the moment
- Using docker to build
$ git clone [email protected]:govcms/rest2tasks.git && \ cd rest2tasks && docker build -t rest2tasks . && \ docker run -p 3000:3000 rest2tasks;
- Using docker to pull/run
$ docker pull quay.io/govcms/rest2tasks && \ docker run -p 3000:3000 quay.io/govcms/rest2tasks;
- Using local compilation
$ git clone [email protected]:govcms/rest2tasks.git && \ cd rest2tasks && \ go run main.go;
It accepts two possible input values - branchName
and projectName
and will simply provide messages back containing those values.
You can use -X GET
fine however, the application assumes the user uses -X POST
to interact with this application.
# Trigger deploy (based on MR/PR)
$ curl http://localhost:3000/pullrequest/deploy -X POST -d projectName=myproject -d branchName=master
# Trigger deploy (not based on MR/PR)
$ curl http://localhost:3000/deploy -X POST -d projectName=myproject -d branchName=master
# Trigger promote deploy
$ curl http://localhost:3000/promote -X POST -d projectName=myproject -d branchName=master
This is intended to be a drop-in replacement for the service provided by Amazee.io which has since been deprecated for the Lagoon API. This could be re-purposed to accommodate the API if you were prepared to make it do so using the Lagoon CLI API.
MIT - This is a recreation of a small subset of features rest2tasks came with and this repository comes with no guarantees or warranties.