Skip to content
This repository has been archived by the owner on Nov 20, 2024. It is now read-only.

govCMS/rest2tasks

Repository files navigation

Rest2Tasks - ARCHIVED

Travis CI build status

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.

Availability

A public Docker image is available, you can pull it using the following:

$ docker pull quay.io/govcms/rest2tasks

Getting started

There're three ways to run this application at the moment

  1. Using docker to build
    $ git clone [email protected]:govcms/rest2tasks.git && \
      cd rest2tasks && 
      docker build -t rest2tasks . && \
      docker run -p 3000:3000 rest2tasks;
  2. Using docker to pull/run
    $ docker pull quay.io/govcms/rest2tasks && \
      docker run -p 3000:3000 quay.io/govcms/rest2tasks;
  3. Using local compilation
    $ git clone [email protected]:govcms/rest2tasks.git && \
      cd rest2tasks && \
      go run main.go;

Usage

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

Limitations

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.

License

MIT - This is a recreation of a small subset of features rest2tasks came with and this repository comes with no guarantees or warranties.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published