Skip to content

Pubgrade is a decoupled, publish-subscribe-based continuous integration (CI) and continuous delivery (CD) microservice that allows developers to notify deploments of available updates

License

Notifications You must be signed in to change notification settings

elixir-cloud-aai/Pubgrade

Repository files navigation

Pubgrade

License Build_status Coverage Status

Description

Pubgrade (Publish-Upgrade) is a decoupled, publish-subscribe-based continuous integration (CI) and continuous delivery (CD) service that allows developers to notify deployments of available updates. These can can then autonomously decide what to do with them. Pubgrade has an optional link with the ELIXIR Cloud Service Registry.

Currently supported features:

  • Register git repository.
  • Create and publish builds.
  • Register subscriptions.
  • Notify subscriptions on build updates.

app-schema

Installation

  1. Install and setup kubernetes.
  2. Install Helm.
  3. Modify deployment/values.yaml.
  4. Create a namespace. kubectl create namespace pubgrade
  5. Create deployment using helm. helm install pubgrade deployment/ -n pubgrade

Usage

  1. Register git repository.
    curl --location --request POST 'http://<host_url>:<host_port>/repositories' \
--header 'Content-Type: application/json' \
--data-raw '{
    "url": "<repository_url>"
}'
  1. Create a user (System administrator).
curl --location --request POST 'http://<host_url>:<host_port>/users/register' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "<name>"
}'
  1. Ask pubgrade admin to verify created user. (Only Admin)
curl --location --request PUT 'http://<host_url>:<host_port>/users/<user-id>/verify' \
--header 'X-Super-User-Access-Token: <Super-User-Access-Token>' \
--header 'X-Super-User-Id: <Super-User-Id>'
  1. Subscribe to repository. (Use admin user)
curl --location --request POST 'http://<host_url>:<host_port>/subscriptions' \
--header 'X-User-Access-Token: <user_access_token>' \
--header 'X-User-Id: <user_identifier>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "repository_id": "<repository_identifier>",
    "callback_url": "<url>",
    "access_token": "<access_token>",
    "type": "<branch OR tag>",
    "value": "<branch_name OR tag_name>"
}'
  1. Register build. (CI should be configured to call this automatically)
    curl --location --request POST 'http://<host_url>:<host_port>/repositories/{repo_id}/builds' \
--header 'X-Project-Access-Token: <access_token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "images": [
        {
            "name": "<image_name>",
            "location": "<docker_file_location>"
       }
    ],
    "head_commit": {
        "branch": "<branch_name>"
   },
    "dockerhub_token": "<echo -n USER:PASSWD | base64>"
}'

List available repositories.

curl --location --request GET 'http://<host_url>:<host_port>/repositories'

List available builds for the repository.

curl --location --request GET 'http://<host_url>:<host_port>/repositories/{repo_id}/builds'

List subscribed repositories

curl --location --request GET 'http://<host_url>:<host_port>/subscriptions' \
--header 'X-User-Access-Token: <user_access_token>' \
--header 'X-User-Id: <user_identifier>'

Contributing

This project is a community effort and lives off your contributions, be it in the form of bug reports, feature requests, discussions, or fixes and other code changes. Please refer to our organization's contribution guidelines if you are interested to contribute. Please mind the code of conduct for all interactions with the community.

Versioning

The project adopts the semantic versioning scheme for versioning. Currently the service is in beta stage, so the API may change without further notice.

License

This project is covered by the Apache License 2.0 also shipped with this repository.

Contact

The project is a collaborative effort under the umbrella of ELIXIR Cloud & AAI. Follow the link to get in touch with us via chat or email. Please mention the name of this service for any inquiry, proposal, question etc.

About

Pubgrade is a decoupled, publish-subscribe-based continuous integration (CI) and continuous delivery (CD) microservice that allows developers to notify deploments of available updates

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •