Skip to content
This repository has been archived by the owner on Mar 25, 2020. It is now read-only.
/ git2pantheon Public archive

Microservice to push docs to pantheon using git.

License

Notifications You must be signed in to change notification settings

jmarrero/git2pantheon

Repository files navigation

Initial work for the Pantheon git integration microservice. This repo is now archived as the code now lives in: https://github.com/redhataccess/pantheon/tree/master/tools/git2pantheon

Setting up your development environment

  1. Install golang

For fedora follow: https://developer.fedoraproject.org/tech/languages/go/go-installation.html

For any other OS, reffer to the golang website: https://golang.org/doc/install

  1. Install go-git dependency
go get gopkg.in/src-d/go-git.v4
  1. Clone this repo on your go root. Assuming the default go root... do this:
cd ~/go
git clone YOUR_FORK_OF_THIS_REPO
  1. Build the project
cd git2pantheon
go build
  1. run the service
./git2pantheon
  1. Running go tests
go test

To build and use the application on a container using buildah and podman

  1. Build the container
buildah -t YOURTAG bud .
  1. To run the container using podman
podman run --network=host --rm -p 9666:9666 YOURTAG

Notice the --network flag this is only needed if you are running pantheon on the same localbox, that way this service can upload files to "localhost".

  1. To get inside the container and debug

get the container process

podman ps
podman exec -it PROCESS bash

Submitting a request

The service expects only POST REST calls to http://:9666/clone

The payload must include a repo and branch to be cloned.

The repository is expected to have a pantheon2.yml file defining the pantheon enpoint and general configuration on how to handle the documentation in the repository. Without it no upload will happen.

An example of the payload is:

curl -d '{"repo":"https://github.com/jmarrero/test-adocs.git", "branch":"master"}' -H "Content-Type: application/json" -X POST http://localhost:9666/clone

For information about pantheon see: https://github.com/redhataccess/pantheon

About

Microservice to push docs to pantheon using git.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published