Skip to content

Releasing Core Plans

Nell Shamrell-Harrington edited this page Aug 29, 2017 · 20 revisions

Note: This rebuild process doesn't take Builder into account. It also does not cover a full manual universe rebuild at this time.

  • Make sure you are using the core origin and have the core origin keys (those are in our shared 1password vault - if you don't have access, ask a Habitat core maintainer)
  • If you haven't already, clone the core-plans repo
    $ [email protected]:habitat-sh/core-plans.git
  • Create a branch or switch to the branch containing the PR you want to build
    $ git checkout -b 'new-release-plan'
    or
    (in the case that you're using extended git functionality)
    $ git pr <pr_number>
  • Get the order of reverse dependencies of the core plan you wish to release
    $ find . -name plan.sh | bin/build-dependent-order.rb core/go
    core/prometheus ./prometheus
    core/gox ./gox
    core/shield ./shield
    core/scaffolding-go ./scaffolding-go
    core/node_exporter ./node_exporter
    core/nats-streaming-server ./nats-streaming-server
    core/gnatsd ./gnatsd
    core/mongo-tools ./mongo-tools
    core/shield-agent ./shield-agent
    core/nats-top ./nats-top
  • Run the standard ShellCheck and Pre-commit checks for the package you're planning to release and correct any errors
    $ shellcheck --shell=bash --exclude=SC1090,SC1091,SC2034,SC2039,SC2148,SC2153,SC2154,SC2140 go/hooks/*
    $ pre-commit run --files go/*
    
  • Open up the plan.sh file in the core-plan you wish to do a new release of - bump the version number and commit that change.
  • Enter the studio at the root of the core-plans repo
    $ cd core-plans
    $ hab studio enter
  • Build the package, followed by the reverse dependencies in the order you've received as output from the build-dependent-order.rb script.
    (studio) $ build go
    (studio) $ build prometheus
    (studio) $ build gox
    ... etc ... etc ...
    (studio) $ exit
  • Find your newly built harts in the results directory
    $ ls results
       my_new_build.hart
  • Upload the newly built packages to the public depot
    $ hab pkg upload results/my_new_build.hart
  • Optionally upload the new built packages and promote them to stable
    $ hab pkg upload results/my_new_build.hart -c stable
  • Otherwise, when you first upload the build, it will be in the unstable branch. Vet the build if necessary.
  • Promote the build to stable
    $ hab pkg promote core/your_package/version/release
  • Open a new pull request on core-plans with the incremented version number in your-plan/plan.sh
  • And you should be done!