All Projects β†’ getsentry β†’ Zeus

getsentry / Zeus

Licence: apache-2.0
WIP: A dashboard for CI

Programming Languages

python
139335 projects - #7 most used programming language
python3
1442 projects

Projects that are alternatives of or similar to Zeus

Xrm Ci Framework
xRM CI Framework provides you with the tools automate the build and deployment of your CRM Solution. Using the framework to implement a fully automated DevOps pipeline will allow you to deploy more frequently with added consistency and quality.
Stars: ✭ 172 (-18.1%)
Mutual labels:  continuous-integration
Wflow
πŸ† EXPERIMENTAL -- Runs GitHub Actions workflows locally (local) -- Don't run your YAML like a πŸͺ
Stars: ✭ 187 (-10.95%)
Mutual labels:  continuous-integration
Platform Ststm32
ST STM32: development platform for PlatformIO
Stars: ✭ 201 (-4.29%)
Mutual labels:  continuous-integration
Buildhelpers
Helper functions for PowerShell CI/CD scenarios
Stars: ✭ 174 (-17.14%)
Mutual labels:  continuous-integration
Greenkeeper Lockfile
πŸ”’ Your lockfile, up to date, all the time
Stars: ✭ 181 (-13.81%)
Mutual labels:  continuous-integration
Hands On Devops
A hands-on DevOps course covering the culture, methods and repeated practices of modern software development involving Packer, Vagrant, VirtualBox, Ansible, Kubernetes, K3s, MetalLB, Traefik, Docker-Compose, Docker, Taiga, GitLab, Drone CI, SonarQube, Selenium, InSpec, Alpine 3.10, Ubuntu-bionic, CentOS 7...
Stars: ✭ 196 (-6.67%)
Mutual labels:  continuous-integration
Argo Ci
Continuous integration and delivery for Kubernetes powered by Argo workflows.
Stars: ✭ 171 (-18.57%)
Mutual labels:  continuous-integration
Werf
The CLI tool gluing Git, Docker, Helm, and Kubernetes with any CI system to implement CI/CD and Giterminism
Stars: ✭ 2,814 (+1240%)
Mutual labels:  continuous-integration
Tox
Command line driven CI frontend and development task automation tool.
Stars: ✭ 2,523 (+1101.43%)
Mutual labels:  continuous-integration
Cml
♾️ CML - Continuous Machine Learning | CI/CD for ML
Stars: ✭ 2,843 (+1253.81%)
Mutual labels:  continuous-integration
Env Ci
Get environment variables exposed by CI services
Stars: ✭ 180 (-14.29%)
Mutual labels:  continuous-integration
Cirrus Ci Docs
Documentation for Cirrus CI πŸ“š
Stars: ✭ 180 (-14.29%)
Mutual labels:  continuous-integration
Ex check
One task to efficiently run all code analysis & testing tools in an Elixir project. Born out of πŸ’œ to Elixir and pragmatism.
Stars: ✭ 198 (-5.71%)
Mutual labels:  continuous-integration
Legacy Old Hercules
Abandoned
Stars: ✭ 174 (-17.14%)
Mutual labels:  continuous-integration
Jenkins Rest
Java client, built on top of jclouds, for working with Jenkins REST API
Stars: ✭ 201 (-4.29%)
Mutual labels:  continuous-integration
Nevergreen
🐀 A build monitor with attitude
Stars: ✭ 170 (-19.05%)
Mutual labels:  continuous-integration
Android Tdd Playground
Android application using TDD Tools and Continuous Integration
Stars: ✭ 187 (-10.95%)
Mutual labels:  continuous-integration
Lncs
Improved Lecture Notes in Computer Science (LNCS) template
Stars: ✭ 208 (-0.95%)
Mutual labels:  continuous-integration
Graphql Doctor
Prevent Breaking Changes in a GraphQL API with GitHub Checks
Stars: ✭ 203 (-3.33%)
Mutual labels:  continuous-integration
Escape
Release engineering, life-cycle management and Continuous Delivery of software platforms and artefacts
Stars: ✭ 199 (-5.24%)
Mutual labels:  continuous-integration

Zeus

This project is under development.

Zeus is a frontend and analytics provider for CI solutions. It is inspired by the work done at Dropbox on Changes.

User Guide

Currently Zeus publicly supports GitHub.com as well as easy integration with Travis CI.

To add a new project:

  1. Add a repository (via settings).
  2. Go to the repository's settings and generate a new Hook.
  3. Bind ZEUS_HOOK_BASE as a secret environment variable in Travis.
  4. Update your .travis.yml to include the Zeus webhook.
  5. (Optional) Update your .travis.yml to include artifact upload.
  6. (Optional, not yet recommended) Update your .travis.yml to disable Travis' native email notifications.

Once you've added a project Zeus will automatically update with details from any builds you've run.

Some quick caveats:

  • The project is still pretty early on, and may break/change without warning.
  • travis-ci.com and GitHub Enterprise are not yet supported.
  • Notifications will only be triggered for users which have authenticated against Zeus.

If you want to use Zeus with a build system that's not currently supported, see the details on "Hooks" in the documentation.

Supported Artifact Types

While you can upload any kind of Artifact to zeus (e.g. .html output), the platform has knowledge of certain types and will grant additional functionality if they're present.

The recommended way to support artifacts is to configure a post-build step (on both failure and success) to do something similar to the following:

npm install -g @zeus-ci/cli
$(npm bin -g)/zeus upload -t "application/x-junit+xml" jest.junit.xml
$(npm bin -g)/zeus upload -t "application/x-cobertura+xml" coverage.xml

Code Coverage

  • application/x-clover+xml
  • application/x-cobertura+xml

xUnit

  • application/x-bitten+xml
  • application/x-junit+xml
  • application/x-xunit+xml

Style Checks

  • application/x-checkstyle+xml
  • text/x-pep8
  • text/x-pycodestyle
  • test/x-pylint

Webpack Stats

Webpack stats can be generated with:

webpack --profile --json > webpack-stats.json

They should be submitted with the application/x-webpack-stats+json type.

Contributing

Requirements

  • Python 3.8
  • Node (and Volta)
  • Postgres 9.4+

Note: If you're using pyenv for Python and macOS Mojave and having issues installing 3.7.1, take a look here:

https://github.com/pyenv/pyenv/issues/1219

Setup

# install poetry
curl -sSL https://raw.githubusercontent.com/sdispater/poetry/0.12.10/get-poetry.py | python

# load dependencies
make

# initialize config
poetry run zeus init

Note, before running any future Python commands (including zeus), you'll need to activate the environment:

poetry shell

You can also setup direnv to automatically activate the environment.

Once dependencies are resolved, bootstrap the database (see Makefile for details):

make db

Finally, launch the webserver:

zeus devserver

# or alternatively, with workers:
zeus devserver --workers

Getting some data

$ zeus repos add https://github.com/getsentry/zeus.git

Once you've authenticated, give yourself access to the repository:

$ zeus repos access add https://github.com/getsentry/zeus.git [[email protected]]

Additionally, you can generate some mock data:

$ zeus mocks load-all

Layout

zeus
β”œβ”€β”€ setup.py                // server dependencies
β”œβ”€β”€ zeus                    // server code
|   β”œβ”€β”€ artifacts           // artifact handlers
|   β”œβ”€β”€ api
|   |   β”œβ”€β”€ resources       // api endpoints/resources
|   |   └── schemas         // api serializer/schemas
|   β”œβ”€β”€ cli                 // command line utilities
|   β”œβ”€β”€ models              // database schema
|   β”œβ”€β”€ storage             // file storage implementations
|   β”œβ”€β”€ tasks               // async task definitions
|   β”œβ”€β”€ vcs                 // version control system implementations
|   └── web                 // server-rendered web views
β”œβ”€β”€ templates               // server-rendered templates
β”œβ”€β”€ public                  // general static assets
β”œβ”€β”€ package.json            // web client dependencies
└── webapp                  // web client
    β”œβ”€β”€ actions             // redux actions
    β”œβ”€β”€ components          // react components
    β”œβ”€β”€ reducers            // redux reducers
    β”œβ”€β”€ routes.js           // routes (react-router)
    └── pages.js            // react components (pages)

Data Model

  • Most models contain a GUID (UUID) primary key.
  • Some generalized models (such as ItemStat) are keyed by GUID, and do not contain backrefs or constraints.
  • Access is controlled at the repository level, and is generally enforced if you use the {ModelClass}.query utilities.
  • Refs are unresolved (pointers to shas). They are often resolved asynchronously. Models containing a sha will also often contain a parallel ref field.
zeus
β”œβ”€β”€ ApiToken
|   └── ApiTokenRepositoryAccess
β”œβ”€β”€ Hook
β”œβ”€β”€ Repository
|   β”œβ”€β”€ RepositoryAccess
|   β”œβ”€β”€ ItemOption
|   β”œβ”€β”€ Build
|   |   β”œβ”€β”€ ItemStat
|   |   β”œβ”€β”€ Source
|   |   β”œβ”€β”€ FileCoverage
|   |   └── Job
|   |       β”œβ”€β”€ Artifact
|   |       β”œβ”€β”€ ItemStat
|   |       └── TestCase
|   |           β”œβ”€β”€ Artifact
|   |           └── ItemStat
|   β”œβ”€β”€ ChangeRequest
|   |   └── Revision
|   └── Source
|       β”œβ”€β”€ Author
|       β”œβ”€β”€ Patch
|       └── Revision
|           └── Author
└── User
    β”œβ”€β”€ Email
    └── Identity

Hooks

A subset of APIs are exposed using simple hook credentials. These credentials are coupled to a provider (e.g. travis-ci) and a single repository.

To create a new hook:

zeus hooks add https://github.com/getsentry/zeus.git travis-ci

Using the subpath, you'll be able to access several endpoints:

  • {prefix}/builds/{build-external-id}
  • {prefix}/builds/{build-external-id}/jobs/{job-external-id}
  • {prefix}/builds/{build-external-id}/jobs/{job-external-id}/artifacts

The prefix will be generated for you as part of the new hook, and is made up of the Hook's GUID and it's signature:

http://example.com/hooks/{hook-id}/{hook-signature}/{path}

Each endpoint takes an external ID, which is used as a unique query parameter. The constraints are coupled to the parent object. For example, to create or patch a build:

POST http://example.com/hooks/{hook-id}/{hook-signature}/builds/abc

This will look for a Build object with the following characteristics:

  • provider={Hook.provider}
  • external_id=abc
  • repository_id={Hook.repository_id}

If a match is found, it will be updated with the given API parameters. If it isn't found, it will be created. All of these operations are treated like a standard UPSERT (UPDATE IF EXISTS or INSERT).

The process for publishing data generally looks like this:

  1. if applicable, upsert a change request and its source association
  2. upsert the build's basic parameters
  3. upsert the detailed job parameters
  4. publish artifacts

These actions can be also performed manually (without using the native webhooks) with zeus-cli (recommended) or curl.

Updating data with zeus-cli

More information (installation instructions, documentation) about zeus-cli can be found on its project's page: https://github.com/getsentry/zeus-cli

zeus-cli is a command line tool that facilitates interaction with Zeus API for actions such as updating jobs or uploading artifacts.

The following command creates a build and a job for a given git revision:

zeus job update -b $MY_BUILD_ID -j $MY_JOB_ID  --ref=$MY_REF_ID

And here's how you upload an artifact:

zeus upload -b $MY_BUILD_ID -j $MY_JOB_ID -t 'text/xml+coverage' coverage.xml

Updating data with curl

Here's an example of how you can publish job details without the native webhooks with curl from Travis:

#!/bin/bash -eu
if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then
    BUILD_LABEL="PR #${TRAVIS_PULL_REQUEST}"
else
    BUILD_LABEL=""
fi

# ensure the build exists
curl $ZEUS_HOOK_BASE/builds/$TRAVIS_BUILD_NUMBER \
    -X POST \
    -H 'Content-Type: application/json' \
    -d "{\"label\": \"${BUILD_LABEL}\", \"ref\": \"$TRAVIS_COMMIT\", \"url\": \"https://travis-ci.org/${TRAVIS_REPO_SLUG}/builds/${TRAVIS_BUILD_ID}\"}"

# upsert current job details
curl $ZEUS_HOOK_BASE/builds/$TRAVIS_BUILD_NUMBER/jobs/$TRAVIS_JOB_NUMBER \
    -X POST \
    -H 'Content-Type: application/json' \
    -d "{\"status\": \"$1\", \"result\": \"$2\", \"url\": \"https://travis-ci.org/${TRAVIS_REPO_SLUG}/jobs/${TRAVIS_JOB_ID}\", \"allow_failure\": ${TRAVIS_ALLOW_FAILURE}}"

From there you can submit artifacts using zeus-cli and its standard mechanisms.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].