Giter VIP home page Giter VIP logo

horizon's Introduction

Horizon CircleCI

Visual representations of release pipelines.

Quick links

Setup

Local development depends on a .env.shared file (sourced from S3) and a .env file for any overrides or additions. The setup script will initialize these in addition to installing prerequisites and generating seed data:

./bin/setup

Then, to develop with docker:

hokusai dev run 'bundle exec rake db:prepare db:seed:replant'
hokusai dev start

Or on localhost:

yarn install
foreman run bundle exec rails server

# run the webpack-dev-server in a seperate terminal window for hot reloading and faster compilation:
./bin/webpack-dev-server

The UI can then be found at http://localhost:3000.

Design

  • Organizations have many Projects
  • Each Project has an associated list of Stages, with their order determined by Stage#position (e.g., main, staging, and production)
  • Stages must describe how to get information about their current state. This takes the form of a #git_remote (e.g., referring to Github or Heroku), optional #branch name (default: main), optional #hokusai environment (e.g., staging or production), or #tag_pattern (e.g., release-*). The releasecop gem is used internally to determine stage diffs, so see that project for more detail.
  • Stages can optionally be associated with a Profile that stores credentials for accessing git providers or AWS.
  • Snapshots capture the complete state of a project's stages at a point in time. Each Snapshot has associated Comparisons between the consecutive stages of a project (e).g., a comparison between main and staging, and a second between staging and production)
  • A cron periodically reevaluates these comparisons, creating a new snapshot if the state has changed at all.
  • A Stage (such as "production") can have a DeployStrategy for automatically triggering releases. Currently only the "github pull request" provider is implemented. When defined, a deploy strategy will automatically start a release (e.g., by opening a pull request) when a diff exceeds a certain threshold.
  • DeployBlocks indicate that a project should not be released. In addition to appearing on dashboards, any unresolved blocks will prevent new releases from being automated.

Adding a new project

  • Navigate to the new project form and specify the name, description, and any tags (often teams) associated with the project.
  • Follow the stages link and click to create a new stage:
    • Choose a "profile" granting access to the repository or deployment (e.g., github...)
    • Enter a name, usually main to start
    • Enter a git remote (e.g., https://github.com/artsy/delta.git)
    • Enter a tag pattern, branch, or hokusai environment associated with the deployment. For "main," these are usually blank.
  • Create additional stages for staging (usually specifying the staging hokusai environment), and production (usually specifying the production hokusai environment), if applicable.
  • After defining the production stage, follow the link to create a new deploy strategy.
    • Choose github pull request as the provider
    • Choose a profile granting necessary access (usually github...)
    • Check the Automatic box so that new release pull requests are opened automatically upon changes being pushed to staging.
    • Provide arguments specifying the relevant branches (usually {"base":"release","head":"staging"})
      • base is the branch name that this deploy PR will merge onto.
      • head is the horizon stage name that this deploy PR will start from.
  • To merge release pull requests automatically, specify the additional merge_after (in seconds) and--for an optional notification--slack_webhook_url (from Horizon's slack settings). E.g.:
{
  "base": "release",
  "head": "staging",
  "merge_after": 86400,
  "slack_webhook_url": ["https://hooks.slack.com/services/T.../B.../Q...", "https://hooks.slack.com/services/O.../C.../U..."],
  "blocked_time_buckets": ["* 1-2 * * *"]

}

Adding a "deploy block"

  • Navigate to the new deploy block form.
  • Choose a project and describe the reason for blocking deploys. Leave "resolved at" blank.
  • While the block is unresolved, Horizon will not open new release pull requests or merge existing ones, but manual merges or deploys are still possible. CircleCI release workflows can use the block step defined in the artsy/release orb to short-circuit release builds.
  • Once resolved, click edit in the list of deploy blocks and specify a "resolved at" time.

TO DO

  • Support hokusai
  • Better visual
  • Allow SSH keys to be configured for each org or project (probably like git config --local core.sshCommand "ssh -i ~/.ssh/some_key_file"...). (Maybe not necessary given github/heroku tokens in https URLs)
  • sanitize URLs with tokens/credentials in them
  • instead of including tokens in each git URL, define "profiles" associated with each organization and project
  • Fix ugly AWS credentials -> hokusai flow
  • Make errors [when refreshing projects] visible and avoid short-circuiting entire cron
  • Make sorting and classifying of projects more sophisticated (penalize staleness and number of contributors and not just number of commits)
  • Add tags to projects and enable filtering dashboard/list view by them
  • re-expose comparison errors in UI
  • Experiment with programmatic git/hokusai access instead of shelling out
  • button to refresh project on-demand

horizon's People

Contributors

joeyaghion avatar eessex avatar renovate-bot avatar dependabot[bot] avatar mc-jones avatar artsyjian avatar izakp avatar icirellik avatar artsy-peril[bot] avatar starsirius avatar kajatiger avatar zephraph avatar dblandin avatar ovasdi avatar ashkan18 avatar sonecabr avatar orta avatar damassi avatar dleve123 avatar mdole avatar mzikherman avatar brainbicycle avatar pvinis avatar peril-staging[bot] avatar

Stargazers

Eric Cheung avatar  avatar  avatar Daniel (dB.) Doubrovkine avatar Barry Hoggard avatar Herbert Treis Neto avatar  avatar

Watchers

 avatar Anandaroop Roy avatar  avatar Oksana avatar Fladson Gomes avatar Sepand Ansari avatar Devang Thakkar avatar  avatar James Cloos avatar Dejan avatar  avatar  avatar  avatar Sarah Weir avatar Ole avatar Christina avatar Lily Pace avatar Samuel Rozenberg avatar Joel Rosenblatt avatar  avatar Nick Spinazze avatar Jacqueline Potts avatar Emma Dickson avatar luisfg avatar Carlos avatar Tam avatar Kizito Egeonu avatar Danger avatar Sultan Al-Maari avatar TanjieM avatar  avatar Adam Iskounen avatar  avatar

horizon's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Repository problems

These problems occurred while renovating this repository. View logs.

  • WARN: Using npm packages for Renovate presets is now deprecated. Please migrate to repository-based presets instead.

Pending Approval

These branches will be created by Renovate only once you click their checkbox below.

  • chore(deps): pin dep glob-parent from 6.0.2 to 6.0.2
  • chore(deps): update dep @rails/webpacker from 5.4.3 to v5.4.4
  • chore(deps): update dep @types/actioncable from 5.2.3 to v5.2.11
  • chore(deps): update dep @types/react-dom from 16.9.8 to v16.9.24
  • chore(deps): update dep enzyme-adapter-react-16 from 1.15.2 to v1.15.8
  • chore(deps): update babel (@babel/core, @babel/plugin-transform-runtime, @babel/preset-env, @babel/preset-react, @babel/preset-typescript)
  • chore(deps): update dep @rails/actioncable from 6.0.3-1 to v6.1.7
  • chore(deps): update dep @rails/activestorage from 6.0.3-1 to v6.1.7
  • chore(deps): update dep @rails/ujs from 6.0.3-1 to v6.1.7
  • chore(deps): update dep @types/react from 16.9.35 to v16.14.60
  • chore(deps): update dep @types/webpack-env from 1.15.2 to v1.18.5
  • chore(deps): update dep @typescript-eslint/eslint-plugin from 3.1.0 to v3.10.1
  • chore(deps): update dep @typescript-eslint/parser from 3.1.0 to v3.10.1
  • chore(deps): update dep babel-loader from 8.2.3 to v8.3.0
  • chore(deps): update dep eslint from 7.1.0 to v7.32.0
  • chore(deps): update dep eslint-config-prettier from 6.11.0 to v6.15.0
  • chore(deps): update dep eslint-plugin-import from 2.20.2 to v2.29.1
  • chore(deps): update dep eslint-plugin-react from 7.20.0 to v7.35.0
  • chore(deps): update dep jest from 26.0.1 to v26.6.3 (jest, @types/jest)
  • chore(deps): update dep lint-staged from 10.2.9 to v10.5.4
  • chore(deps): update dep prettier from 2.0.5 to v2.8.8
  • chore(deps): update dep webpack from 4.46.0 to v4.47.0
  • chore(deps): update dep webpack-bundle-analyzer from 4.5.0 to v4.10.2
  • chore(deps): update dep webpack-dev-server from 4.6.0 to v4.15.2
  • chore(deps): update react from 16.13.1 to v16.14.0 (react, react-dom)
  • chore(deps): update dep @rails/actioncable from 6.0.3-1 to v7
  • chore(deps): update dep @rails/activestorage from 6.0.3-1 to v7
  • chore(deps): update dep @rails/ujs from 6.0.3-1 to v7
  • chore(deps): update dep @types/react from 16.9.35 to v18
  • chore(deps): update dep @types/react-dom from 16.9.8 to v18
  • chore(deps): update dep @types/styled-components from 4.4.3 to v5
  • chore(deps): update dep @typescript-eslint/eslint-plugin from 3.1.0 to v8
  • chore(deps): update dep @typescript-eslint/parser from 3.1.0 to v8
  • chore(deps): update dep babel-loader from 8.2.3 to v9
  • chore(deps): update dep eslint from 7.1.0 to v9
  • chore(deps): update dep eslint-config-prettier from 6.11.0 to v9
  • chore(deps): update dep husky from 4.3.8 to v9
  • chore(deps): update dep jest from 26.0.1 to v29 (jest, @types/jest)
  • chore(deps): update dep lint-staged from 10.2.9 to v15
  • chore(deps): update dep prettier from 2.0.5 to v3
  • chore(deps): update dep styled-components from 4.4.1 to v6
  • chore(deps): update dep webpack from 4.46.0 to v5
  • chore(deps): update dep webpack-dev-server from 4.6.0 to v5
  • chore(deps): update react from 16.13.1 to v18 (major) (react, react-dom)
  • ๐Ÿ” Create all pending approval PRs at once ๐Ÿ”

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

circleci
.circleci/config.yml
npm
package.json
  • @artsy/palette 14.34.0
  • @rails/actioncable 6.0.3-1
  • @rails/activestorage 6.0.3-1
  • @rails/ujs 6.0.3-1
  • @rails/webpacker 5.4.3
  • husky 4.3.8
  • react 16.13.1
  • react-dom 16.13.1
  • styled-components 4.4.1
  • @babel/core 7.10.2
  • @babel/plugin-transform-runtime 7.16.4
  • @babel/preset-env 7.16.4
  • @babel/preset-react 7.10.1
  • @babel/preset-typescript 7.10.1
  • @types/actioncable 5.2.3
  • @types/jest 26.0.0
  • @types/react 16.9.35
  • @types/react-dom 16.9.8
  • @types/styled-components 4.4.3
  • @types/webpack-env 1.15.2
  • @typescript-eslint/eslint-plugin 3.1.0
  • @typescript-eslint/parser 3.1.0
  • babel-loader 8.2.3
  • babel-plugin-transform-react-remove-prop-types 0.4.24
  • enzyme 3.11.0
  • enzyme-adapter-react-16 1.15.2
  • eslint 7.1.0
  • eslint-config-prettier 6.11.0
  • eslint-plugin-import 2.20.2
  • eslint-plugin-react 7.20.0
  • jest 26.0.1
  • lint-staged 10.2.9
  • prettier 2.0.5
  • typescript 4.6.4
  • webpack 4.46.0
  • webpack-bundle-analyzer 4.5.0
  • webpack-dev-server 4.6.0
  • glob-parent ^6.0.1

  • Check this box to trigger a request for Renovate to run again on this repository

Add GitHub auth

The current login process is a little... tedious at times. Because it's triggered by a native modal from the browser we can't use (or I haven't figure out how to use) 1Password's auto fill.

Having GitHub auth would be nice because generally the password becomes a non-issue... also we'd have a bit more granular access control.

Thoughts?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.