From 1169a1bf63953845e328f7cac882cf819abd0d09 Mon Sep 17 00:00:00 2001 From: Oleh Fedorenko Date: Fri, 23 Jul 2021 14:33:35 +0200 Subject: [PATCH] Update rel-eng notebook (#573) --- rel-eng/gem_release.ipynb | 247 +++++++++----------------------------- 1 file changed, 55 insertions(+), 192 deletions(-) diff --git a/rel-eng/gem_release.ipynb b/rel-eng/gem_release.ipynb index e5d5269ef..a99cecd54 100644 --- a/rel-eng/gem_release.ipynb +++ b/rel-eng/gem_release.ipynb @@ -4,35 +4,27 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Release of hammer-cli-foreman gem\n", + "## Release of hammer-cli-foreman gem\n", "\n", - "## Requirements\n", + "### Requirements\n", "- push access to https://github.com/theforeman/hammer-cli-foreman\n", "- push access to rubygems.org for hammer-cli-foreman\n", "- sudo yum install transifex-client python-slugify asciidoc\n", "- ensure neither the `git push` or `gem push` don't require interractive auth. If you can't use api key or ssh key to auth skip these steps and run them form the shell manually \n", - "- to push translations you need an account on Transifex\n", + "- to push translations you need an account on Transifex (https://docs.transifex.com/client/client-configuration#~/-transifexrc)\n", "\n", - "## Release process\n", + "### Release process\n", "- Follow the steps with `+` or `+,`\n", "- If anything fails, fix it and re-run the step if applicable\n", "\n", - "## Release settings" + "### Release settings" ] }, { "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "/home/mshira/git/hammer-cli-foreman\n" - ] - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "%cd .." ] @@ -46,19 +38,19 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ - "NEW_VERSION = '2.3.0'\n", - "LAST_VERSION = '2.2.0'\n", - "DEVELOP_VERSION = '2.4.0-develop'\n", - "NEXT_FUTURE_VERSION = '2.4.0'\n", + "NEW_VERSION = '3.0.0'\n", + "LAST_VERSION = '2.5.1'\n", + "DEVELOP_VERSION = '2.6.0-develop'\n", + "NEXT_FUTURE_VERSION = '3.0.0'\n", "MAJOR_RELEASE = True\n", - "STABLE_BRANCH = '2.3-stable'\n", + "STABLE_BRANCH = '2.5-stable'\n", "GIT_REMOTE_UPSTREAM = 'origin'\n", "WORK_BRANCH = 'master' if MAJOR_RELEASE else STABLE_BRANCH\n", - "\n" + "CHERRY_PICKS = []\n" ] }, { @@ -70,57 +62,49 @@ }, { "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Already on 'master'\r\n" - ] - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "! git checkout {WORK_BRANCH}" ] }, { "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "From github.com:theforeman/hammer-cli-foreman\r\n", - " 7cec74e2e..5a5a25fbf 2.1-stable -> origin/2.1-stable\r\n", - " bb8cfdde2..bba9dfe58 2.2-stable -> origin/2.2-stable\r\n" - ] - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "! git fetch {GIT_REMOTE_UPSTREAM}" ] }, { "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Current branch master is up to date.\r\n" - ] - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "! git rebase {GIT_REMOTE_UPSTREAM}/{WORK_BRANCH}" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Cherry picks for minor release" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "if not MAJOR_RELEASE:\n", + " for cp in CHERRY_PICKS:\n", + " ! git cherry-pick -x {cp}" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -130,110 +114,18 @@ }, { "cell_type": "code", - "execution_count": 7, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Fetching gem metadata from https://rubygems.org/........\n", - "Resolving dependencies...\n", - "Using rake 10.1.1\n", - "Using amazing_print 1.2.2\u001b[32m (was 1.2.1)\u001b[0m\n", - "Using json 2.3.1\n", - "Using oauth 0.5.4\n", - "Using http-accept 1.7.0\n", - "Using unf_ext 0.0.7.7\n", - "Using unf 0.1.4\n", - "Using domain_name 0.5.20190701\n", - "Using http-cookie 1.0.3\n", - "Using mime-types-data 3.2020.0512\n", - "Using mime-types 3.3.1\n", - "Using netrc 0.11.0\n", - "Using rest-client 2.1.0\n", - "Using apipie-bindings 0.4.0\n", - "Using builder 3.2.4\n", - "Using bundler 2.1.4\n", - "Using byebug 11.1.3\n", - "Using ci_reporter 2.0.0\n", - "Using minitest 5.14.1\n", - "Using ci_reporter_minitest 1.0.0\n", - "Using clamp 1.1.2\n", - "Using coderay 1.1.3\n", - "Using docile 1.3.2\n", - "Using fast_gettext 2.0.3\n", - "Using locale 2.1.3\n", - "Using text 1.3.1\n", - "Using gettext 3.3.6\n", - "Using highline 2.0.3\n", - "Using little-plugger 1.1.4\n", - "Using multi_json 1.15.0\n", - "Using logging 2.3.0\n", - "Using unicode 0.4.4.4\n", - "Using unicode-display_width 1.7.0\n", - "Using hammer_cli 2.3.0.pre.develop from source at `../hammer-cli`\n", - "Using jwt 2.2.2\n", - "Using hammer_cli_foreman 2.3.0.pre.develop from source at `.`\n", - "Using hammer_cli_foreman_kubevirt 0.1.4 from source at `../hammer-cli-foreman-kubevirt`\n", - "Using interception 0.5\n", - "Using method_source 1.0.0\n", - "Using minitest-spec-context 0.0.4\n", - "Using mocha 1.11.2\n", - "Using pry 0.13.1\n", - "Using pry-byebug 3.9.0\n", - "Using yard 0.9.25\n", - "Using pry-doc 1.1.0\n", - "Using pry-rails 0.3.9\n", - "Using pry-rescue 1.5.2\n", - "Using rb-readline 0.5.5\n", - "Using simplecov-html 0.12.3\n", - "Using simplecov 0.19.1\u001b[32m (was 0.19.0)\u001b[0m\n", - "Using thor 1.0.1\n", - "\u001b[32mBundle updated!\u001b[0m\n" - ] - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "! bundle update" ] }, { "cell_type": "code", - "execution_count": 8, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "/home/mshira/.rvm/rubies/ruby-2.5.5/bin/ruby -I\"lib:lib\" -I\"/home/mshira/.rvm/gems/ruby-2.5.5/gems/rake-10.1.1/lib\" \"/home/mshira/.rvm/gems/ruby-2.5.5/gems/rake-10.1.1/lib/rake/rake_test_loader.rb\" \"test/unit/image_test.rb\" \"test/unit/messages_test.rb\" \"test/unit/config_group_test.rb\" \"test/unit/option_sources/id_params_test.rb\" \"test/unit/option_sources/ids_params_test.rb\" \"test/unit/exception_handler_test.rb\" \"test/unit/user_test.rb\" \"test/unit/api/session_authenticator_wrapper_test.rb\" \"test/unit/api/interactive_basic_auth_test.rb\" \"test/unit/api/oauth/oauth_authentication_code_grant_test.rb\" \"test/unit/api/oauth/oauth_password_grant_test.rb\" \"test/unit/api/void_auth_test.rb\" \"test/unit/hostgroup_test.rb\" \"test/unit/realm_test.rb\" \"test/unit/auth_source_ldap_test.rb\" \"test/unit/audit_test.rb\" \"test/unit/smart_class_parameter_test.rb\" \"test/unit/partition_table_test.rb\" \"test/unit/operating_system_test.rb\" \"test/unit/media_test.rb\" \"test/unit/architecture_test.rb\" \"test/unit/usergroup_test.rb\" \"test/unit/role_test.rb\" \"test/unit/location_test.rb\" \"test/unit/param_filters_test.rb\" \"test/unit/option_builders_test.rb\" \"test/unit/api_test.rb\" \"test/unit/sessions_test.rb\" \"test/unit/organization_test.rb\" \"test/unit/settings_test.rb\" \"test/unit/template_test.rb\" \"test/unit/dependency_resolver_test.rb\" \"test/unit/smart_proxy_test.rb\" \"test/unit/domain_test.rb\" \"test/unit/defaults_test.rb\" \"test/unit/model_test.rb\" \"test/unit/puppet_class_test.rb\" \"test/unit/compute_resource_test.rb\" \"test/unit/id_resolver_test.rb\" \"test/unit/filter_test.rb\" \"test/unit/puppet_environment_test.rb\" \"test/unit/output/formatters_test.rb\" \"test/unit/host_test.rb\" \"test/unit/config_report_test.rb\" \"test/unit/fact_test.rb\" \"test/unit/external_usergroup_test.rb\" \"test/unit/commands_test.rb\" \"test/unit/common_parameter_test.rb\" \"test/unit/subnet_test.rb\" \"test/functional/http_proxy_test.rb\" \"test/functional/commands/list_test.rb\" \"test/functional/user_mail_notification_test.rb\" \"test/functional/user_test.rb\" \"test/functional/realm_test.rb\" \"test/functional/personal_access_token_test.rb\" \"test/functional/audit_test.rb\" \"test/functional/mail_notification_test.rb\" \"test/functional/ping_test.rb\" \"test/functional/smart_class_parameter_test.rb\" \"test/functional/media_test.rb\" \"test/functional/role_test.rb\" \"test/functional/location_test.rb\" \"test/functional/hostgroup/create_test.rb\" \"test/functional/hostgroup/update_test.rb\" \"test/functional/subnet/create_test.rb\" \"test/functional/subnet/update_test.rb\" \"test/functional/organization_test.rb\" \"test/functional/settings_test.rb\" \"test/functional/template_test.rb\" \"test/functional/proxy_test.rb\" \"test/functional/compute_resource_test.rb\" \"test/functional/compute_attribute_test.rb\" \"test/functional/filter_test.rb\" \"test/functional/report_template_test.rb\" \"test/functional/compute_profile_test.rb\" \"test/functional/host_test.rb\" \"test/functional/ssh_keys_test.rb\" \"test/functional/status_test.rb\" \"test/functional/associating_commands_test.rb\" \"test/functional/auth_source_test.rb\" \"test/functional/virtual_machine_test.rb\" \"test/functional/bookmark_test.rb\" \n", - "environment command is deprecated and will be removed in one of the future versions. Please use puppet-environment command instead.\n", - "report command is deprecated and will be removed in one of the future versions. Please use config-report command instead.\n", - "Run options: --seed 20363\n", - "\n", - "# Running:\n", - "\n", - ".....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................Warning: Option --environment-id is deprecated. Use --puppet-environment[-id] instead\n", - ".Warning: Option --environment-id is deprecated. Use --puppet-environment[-id] instead\n", - ".Warning: Option --environment-id is deprecated. Use --puppet-environment[-id] instead\n", - ".Warning: Option --environment-id is deprecated. Use --puppet-environment[-id] instead\n", - ".Warning: Option --environment-id is deprecated. Use --puppet-environment[-id] instead\n", - ".Warning: Option --environment-id is deprecated. Use --puppet-environment[-id] instead\n", - "..............................................................Warning: Option --environment-id is deprecated. Use --puppet-environment[-id] instead\n", - ".Warning: Option --environment-id is deprecated. Use --puppet-environment[-id] instead\n", - "...Warning: Option --environment-id is deprecated. Use --puppet-environment[-id] instead\n", - ".Warning: Option --environment-id is deprecated. Use --puppet-environment[-id] instead\n", - ".Warning: Option --environment-id is deprecated. Use --puppet-environment[-id] instead\n", - ".................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................\n", - "\n", - "Finished in 20.589601s, 90.8711 runs/s, 382.8146 assertions/s.\n", - "\n", - "1871 runs, 7882 assertions, 0 failures, 0 errors, 0 skips\n", - "Coverage report generated for MiniTest to /home/mshira/git/coverage. 7780 / 9153 LOC (85.0%) covered.\n" - ] - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "! bundle exec rake test" ] @@ -247,7 +139,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -256,38 +148,9 @@ }, { "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [ - { - "data": { - "text/markdown": [ - "* Hammer ping skip authentication ([PR #550](https://github.com/theforeman/hammer-cli-foreman/pull/550)), [#31140](http://projects.theforeman.org/issues/31140)\n", - "* Return non-zero exit code if services failed, [#30496](http://projects.theforeman.org/issues/30496)\n", - "* Better option assignment for nested params ([PR #544](https://github.com/theforeman/hammer-cli-foreman/pull/544)), [#30910](http://projects.theforeman.org/issues/30910)\n", - "* Use parent resource instead of hardcoded one, [#30938](http://projects.theforeman.org/issues/30938)\n", - "* Added missing tests to setting, [#30886](http://projects.theforeman.org/issues/30886)\n", - "* Added missing tests to installation medium test, [#30805](http://projects.theforeman.org/issues/30805)\n", - "* Added missing tests to location test, [#30829](http://projects.theforeman.org/issues/30829)\n", - "* Added missing tests to organization test, [#30794](http://projects.theforeman.org/issues/30794)\n", - "* Added missing tests to audit test ([PR #537](https://github.com/theforeman/hammer-cli-foreman/pull/537)), [#30740](http://projects.theforeman.org/issues/30740)\n", - "* Use underscores in `login oauth` option values ([PR #536](https://github.com/theforeman/hammer-cli-foreman/pull/536)), [#30720](http://projects.theforeman.org/issues/30720)\n", - "* Drop trends from hammer-cli-foreman ([PR #535](https://github.com/theforeman/hammer-cli-foreman/pull/535)), [#30134](http://projects.theforeman.org/issues/30134)\n", - "* Added highly available option to ovirt ([PR #532](https://github.com/theforeman/hammer-cli-foreman/pull/532)), [#30494](http://projects.theforeman.org/issues/30494)\n", - "* Add ptables and realms to location and organization info ([PR #534](https://github.com/theforeman/hammer-cli-foreman/pull/534)), [#30663](http://projects.theforeman.org/issues/30663)\n", - "* Bump to 2.3.0-develop\n", - "* Bump to 2.2.0\n", - "* Added missing tests to user test, [#30593](http://projects.theforeman.org/issues/30593)" - ], - "text/plain": [ - "" - ] - }, - "execution_count": 11, - "metadata": {}, - "output_type": "execute_result" - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "# Parse git changelog\n", "from IPython.display import Markdown as md\n", @@ -321,7 +184,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -613,7 +476,7 @@ "source": [ "## Congratulations\n", "\n", - "Release is public now." + "Release is public now. Please, don't forget to do packaging (https://github.com/theforeman/foreman-packaging)." ] } ], @@ -633,7 +496,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.9" + "version": "3.6.8" } }, "nbformat": 4,