1# 2# Licensed to the Apache Software Foundation (ASF) under one or more 3# contributor license agreements. See the NOTICE file distributed with 4# this work for additional information regarding copyright ownership. 5# The ASF licenses this file to You under the Apache License, Version 2.0 6# (the "License"); you may not use this file except in compliance with 7# the License. You may obtain a copy of the License at 8# 9# http://www.apache.org/licenses/LICENSE-2.0 10# 11# Unless required by applicable law or agreed to in writing, software 12# distributed under the License is distributed on an "AS IS" BASIS, 13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14# See the License for the specific language governing permissions and 15# limitations under the License. 16# 17 18# ===================================================================== 19# This file contains the definition TO-DO steps and commands to run for the 20# releaseWizard.py script. It also contains Jinja2 templates for use in those 21# definitions. See documentation for "groups" below the templates. 22# Edit this file with an editor with YAML support, such as Sublime Text 23# for syntax highlighting and context sensitive tag suggestion 24# ===================================================================== 25# 26# Templates may be included in any text by starting a line with this syntax: 27# (( template=my_template_name )) 28# Templates may contain other templates for easy re-use of snippets 29# And of course all Jinja2 syntax for inclusion of variables etc is supported. 30# See http://jinja.pocoo.org/docs/2.10/templates/ for details 31# To add new global variables or functions/filters, edit releaseWizard.py 32# 33templates: 34 help: | 35 Welcome to the role as Release Manager for Lucene, and the releaseWizard! 36 37 The Release Wizard aims to walk you through the whole release process step by step, 38 helping you to to run the right commands in the right order, generating 39 e-mail templates for you with the correct texts, versions, paths etc, obeying 40 the voting rules and much more. It also serves as a documentation of all the 41 steps, with timestamps, preserving log files from each command etc. 42 43 As you complete each step the tool will ask you if the task is complete, making 44 it easy for you to know what is done and what is left to do. If you need to 45 re-spin a Release Candidata (RC) the Wizard will also help. 46 47 The Lucene project has automated much of the release process with various scripts, 48 and this wizard is the glue that binds it all together. 49 50 In the first TODO step in the checklist you will be asked to read up on the 51 Apache release policy and other relevant documents before you start the release. 52 53 NOTE: Even if we have great tooling and some degree of automation, there are 54 still many manual steps and it is also important that the RM validates 55 and QAs the process, validating that the right commands are run, and that 56 the output from scripts are correct before proceeding. 57 vote_logic: | 58 {% set passed = plus_binding >= 3 and minus < plus_binding %} 59 {% set too_few = plus_binding < 3 %} 60 {% set veto = plus_binding < minus %} 61 {% set reason = 'too few binding votes' if too_few else 'too many negative votes' if veto else 'unknown' %} 62 vote_macro: | 63 {% macro end_vote_result(plus_binding, plus_other, zero, minus) -%} 64 (( template=vote_logic )) 65 .Mail template {% if passed %}successful{% else %}failed{% endif %} vote 66 ---- 67 To: dev@lucene.apache.org 68 Subject: [{% if passed %}RESULT{% else %}FAILED{% endif %}] [VOTE] Release Lucene {{ release_version }} RC{{ rc_number }} 69 70 It's been >72h since the vote was initiated and the result is: 71 72 +1 {{ plus_binding + plus_other }} ({{ plus_binding }} binding) 73 0 {{ zero }} 74 -1 {{ minus }} 75 76 {% if not passed %} 77 Reason for fail is {{ reason }}. 78 79 {% endif %} 80 This vote has {% if passed %}PASSED{% else %}FAILED{% endif %} 81 ---- 82 {%- endmacro %} 83 announce_lucene: | 84 Title: Apache Lucene™ {{ release_version }} available 85 category: core/news 86 URL: 87 save_as: 88 89 The Lucene PMC is pleased to announce the release of Apache Lucene {{ release_version }}. 90 91 Apache Lucene is a high-performance, full-featured search engine library written entirely in Java. It is a technology suitable for nearly any application that requires structured search, full-text search, faceting, nearest-neighbor search across high-dimensionality vectors, spell correction or query suggestions. 92 93 This release contains numerous bug fixes, optimizations, and improvements, some of which are highlighted below. The release is available for immediate download at: 94 95 <https://lucene.apache.org/core/downloads.html> 96 97 ### Lucene {{ release_version }} Release Highlights: 98 99 * Feature 1 pasted from WIKI release notes 100 * Feature 2 ... 101 102 Please read CHANGES.txt for a full list of {% if is_feature_release %}new features and {% endif %}changes: 103 104 <https://lucene.apache.org/core/{{ release_version_underscore }}/changes/Changes.html> 105 announce_lucene_mail: | 106 The template below can be used to announce the Lucene release to the 107 internal mailing lists. 108 109 .Mail template 110 ---- 111 To: dev@lucene.apache.org, general@lucene.apache.org, java-user@lucene.apache.org 112 Subject: [ANNOUNCE] Apache Lucene {{ release_version }} released 113 114 (( template=announce_lucene_mail_body )) 115 ---- 116 announce_lucene_sign_mail: | 117 The template below can be used to announce the Lucene release to the 118 `announce@apache.org` mailing list. The mail *should be signed with PGP.* 119 and sent *from your `@apache.org` account*. 120 121 .Mail template 122 ---- 123 From: {{ gpg.apache_id }}@apache.org 124 To: announce@apache.org 125 Subject: [ANNOUNCE] Apache Lucene {{ release_version }} released 126 127 (( template=announce_lucene_mail_body )) 128 ---- 129 announce_lucene_mail_body: | 130 {% for line in load_lines(lucene_news_file, 5) -%} 131 {{ line }} 132 {%- endfor %} 133 134 135 Note: The Apache Software Foundation uses an extensive mirroring network for 136 distributing releases. It is possible that the mirror you are using may not have 137 replicated the release yet. If that is the case, please try another mirror. 138 This also applies to Maven access. 139# TODOs belong to groups for easy navigation in menus. Todo objects may contain asciidoc 140# descriptions, a number of commands to execute, some links to display, user input to gather 141# etc. Here is the documentation of each type of object. For further details, please consult 142# the corresponding Python object in releaseWizard.py, as these are parsed 1:1 from yaml. 143# 144# - !TodoGroup 145# id: unique_id 146# title: Title which will appear in menu 147# description: Longer description that will appear in sub-menu 148# depends: ['group1_id', 'group2_id'] # Explicit dependencies for groups 149# is_in_rc_loop: Tells that a group is thrown away on RC re-psin (default=False) 150# todos: # Array of !Todo objects beloning to the group 151# !Todo 152# id: todo_id 153# title: Short title that will appear in menu and elsewhere 154# description: | 155# The main description being printed when selecing the todo item. Here 156# you should introduce the task in more detail. You can use {{ jinja_var }} to 157# reference variables. See `releaseWizard.py` for list of global vars supported. 158# You can reference state saved from earlier TODO items using syntax 159# {{ todi_id.var_name }} 160# with `var_name` being either fetched from user_input or persist_vars 161# depends: # One or more dependencies which will bar execution 162# - todo_id1 163# - todo_id2 164# vars: # Dictionary of jinja2 variables local to this TODO, e.g. 165# logfile_path: "{{ [rc_folder, 'logs'] | path_join }}" 166# # Vars can contain global jinja vars or local vars earlier defined (ordered dict) 167# persist_vars: ['var_name', 'var_name'] # List of variables to persist in TODO state 168# asciidoc: | 169# Some `asciidoc` text to be included in asciidoc guide 170# *instead of* description/post_description 171# function: my_python_function # Will call the named function for complex tasks 172# commands: !Commands # A !Commands object holding commands to execute for this todo 173# root_folder: '{{ git_checkout_folder }}' # path to where commands will run 174# commands_text: Introduction text to be displayed just before the commands 175# enable_execute: true # Set to false to never offer to run commands automatically 176# confirm_each_command: true # Set to false to run all commands without prompting 177# remove_files: ['file1', 'folder2'] # List of files or folders that must be gone 178# logs_prefix: prefix # Lets you prefix logs file names with this string 179# commands: # List of !Commands to execute 180# - !Command # One single command 181# cmd: "ls {{ folder_to_ls }}" # A single command. May reference jinja vars 182# # Double spaces in a cmd will trigger multi-line display with continuation char \ 183# cwd: relative_path # Where to run command, relative to root_folder 184# comment: # Will display a # or REM comment above the command in printouts 185# vars: {} # Possible to define local vars for this command only 186# logfile: my.og # Overrides log file name which may grow very long :) 187# tee: false # If true, sends output to console and file 188# stdout: false # if true, sends output only to console, not log file 189# live: false # If true, sends output live byte-by-byte to console 190# redirect: file.txt # Send output to file. Use instead of > 191# redirect_append: false # Will cause output to be appended, like >> 192# shell: false $ Set to true to use built-in shell commands 193# user_input: # An array of !UserInput objects for requesting input from user 194# - !UserInput 195# prompt: Please enter your gpg key ID, e.g. 0D8D0B93 196# name: gpg_id # This will be stored in todo state and can be referenced as {{ todo_id.name }} 197# type: int # if no type is given, a string is stored. Supported types are 'int' 198# post_description: | 199# Some `asciidoc` text (with jinja template support) 200# to be printed *after* commands and user_input is done. 201# links: 202# - http://example.com/list/of/links?to&be&displayed 203groups: 204- !TodoGroup 205 id: prerequisites 206 title: Prerequisites 207 description: | 208 Releasing software requires thorough understanding of the process and careful execution, 209 as it is easy to make mistakes. It also requires an environtment and tools such as gpg 210 correctly setup. This section makes sure you're in good shape for the job! 211 todos: 212 - !Todo 213 id: read_up 214 title: Read up on the release process 215 description: |- 216 As a Release Manager (RM) you should be familiar with Apache's release policy, 217 voting rules, create a PGP/GPG key for use with signing and more. Please familiarise 218 yourself with the resources listed below. 219 links: 220 - https://www.apache.org/dev/release-publishing.html 221 - https://www.apache.org/legal/release-policy.html 222 - https://infra.apache.org/release-signing.html 223 - https://cwiki.apache.org/confluence/display/LUCENE/ReleaseTodo 224 - !Todo 225 id: tools 226 title: Necessary tools are installed 227 description: | 228 You will need these tools: 229 230 * Python v3.4 or later, with dependencies listed in requirements.txt 231 * Java 11 in $JAVA11_HOME 232 * gpg 233 * git 234 * svn 235 * asciidoctor (to generate HTML version) 236 237 You should also set the $EDITOR environment variable, else we'll fallback to 238 `vi` on Linux and `notepad.exe` on Windows, and you don't want that :) 239 function: check_prerequisites 240 links: 241 - https://gnupg.org/download/index.html 242 - https://asciidoctor.org 243 - !Todo 244 id: gpg 245 title: GPG key id is configured 246 description: |- 247 To sign the release you need to provide your GPG key ID. This must be 248 the same key ID that you have registered in your Apache account. 249 The ID is the last 8 bytes of your key fingerprint, e.g. 0D8D0B93. 250 251 * Make sure your gpg key is 4096 bits key or larger 252 * Upload your key to the MIT key server, pgp.mit.edu 253 * Put you GPG key's fingerprint in the `OpenPGP Public Key Primary Fingerprint` 254 field in your id.apache.org profile 255 * The tests will complain if your GPG key has not been signed by another Lucene 256 committer. This makes you a part of the GPG "web of trust" (WoT). Ask a committer 257 that you know personally to sign your key for you, providing them with the 258 fingerprint for the key. 259 function: configure_pgp 260 links: 261 - http://www.apache.org/dev/release-signing.html 262 - http://www.apache.org/dev/openpgp.html#apache-wot 263 - https://id.apache.org 264 - https://dist.apache.org/repos/dist/release/lucene/KEYS 265 - !Todo 266 id: jira_permissions 267 title: Obtain the neccessary permissions for Apache Jira 268 description: |- 269 If you are not a PMC member and this is your first time as RM, please ask to be granted extra permissions in Jira in order to complete all steps of the release. 270 271 If you are a PMC member, you will already have the necessary permissions. 272 links: 273 - https://issues.apache.org/jira/projects/LUCENE 274- !TodoGroup 275 id: preparation 276 title: Prepare for the release 277 description: Work with the community to decide when the release will happen and what work must be completed before it can happen 278 todos: 279 - !Todo 280 id: decide_jira_issues 281 title: Select JIRA issues to be included 282 description: Set the appropriate "Fix Version" in JIRA for the issues that should be included in the release. 283 - !Todo 284 id: fix_build_failures 285 title: Look into common build failures 286 description: | 287 Look over recent build results sent to the builds@lucene.apache.org list and try to address any recurring 288 failures. It's best to fix common failures now, so they don't pop up later and interfere with release smoke 289 testing. Build email archives are available at https://lists.apache.org/list.html?builds@lucene.apache.org. 290 - !Todo 291 id: decide_branch_date 292 title: Decide the date for branching 293 types: 294 - major 295 - minor 296 user_input: !UserInput 297 prompt: Enter date (YYYY-MM-DD) 298 name: branch_date 299 - !Todo 300 id: decide_freeze_length 301 title: Decide the length of feature freeze 302 types: 303 - major 304 - minor 305 user_input: !UserInput 306 prompt: Enter end date of feature freeze (YYYY-MM-DD) 307 name: feature_freeze_date 308- !TodoGroup 309 id: branching_versions 310 title: Create branch (if needed) and update versions 311 description: Here you'll do all the branching and version updates needed to prepare for the new release version 312 todos: 313 - !Todo 314 id: clean_git_checkout 315 title: Do a clean git clone to do the release from 316 description: This eliminates the risk of a dirty checkout 317 commands: !Commands 318 root_folder: '{{ release_folder }}' 319 commands_text: Run these commands to make a fresh clone in the release folder 320 remove_files: 321 - '{{ git_checkout_folder }}' 322 commands: 323 - !Command 324 cmd: git clone --progress https://gitbox.apache.org/repos/asf/lucene.git lucene 325 logfile: git_clone.log 326 - !Todo 327 id: gradle_precommit 328 title: Run gradle precommit and fix issues 329 depends: clean_git_checkout 330 commands: !Commands 331 root_folder: '{{ git_checkout_folder }}' 332 commands_text: |- 333 From the base branch {{ base_branch }} we'll run precommit tests. 334 Fix any problems that are found by pushing fixes to the branch 335 and then running this task again. This task will always do `git pull` 336 before `{{ gradle_cmd }} precommit` so it will catch changes to your branch :) 337 confirm_each_command: false 338 commands: 339 - !Command 340 cmd: git checkout {{ base_branch }} 341 stdout: true 342 - !Command 343 cmd: git clean -df && git checkout -- . 344 comment: Make sure checkout is clean and up to date 345 logfile: git_clean.log 346 tee: true 347 - !Command 348 cmd: git pull --ff-only 349 stdout: true 350 - !Command 351 cmd: "{{ gradle_cmd }} localSettings" 352 - !Command 353 cmd: "{{ gradle_cmd }} clean check -x test" 354 - !Todo 355 id: create_stable_branch 356 title: Create a new stable branch, off from main 357 description: In our case we'll create {{ stable_branch }} 358 types: 359 - major 360 depends: clean_git_checkout 361 commands: !Commands 362 root_folder: '{{ git_checkout_folder }}' 363 commands_text: Run these commands to create a stable branch 364 commands: 365 - !Command 366 cmd: git checkout main 367 tee: true 368 - !Command 369 cmd: git pull --ff-only 370 tee: true 371 - !Command 372 cmd: git ls-remote --exit-code --heads origin {{ stable_branch }} 373 stdout: true 374 should_fail: true 375 comment: We expect error code 2 since {{ stable_branch }} does not already exist 376 - !Command 377 cmd: git checkout -b {{ stable_branch }} 378 tee: true 379 - !Command 380 cmd: git push origin {{ stable_branch }} 381 tee: true 382 - !Todo 383 id: create_minor_branch 384 title: Create a new minor branch off the stable branch 385 description: In our case we'll create {{ release_branch }} 386 types: 387 - major 388 - minor 389 depends: clean_git_checkout 390 commands: !Commands 391 root_folder: '{{ git_checkout_folder }}' 392 commands_text: Run these commands to create a release branch 393 commands: 394 - !Command 395 cmd: git checkout {{ stable_branch }} 396 tee: true 397 - !Command 398 cmd: git pull --ff-only 399 tee: true 400 - !Command 401 cmd: git ls-remote --exit-code --heads origin {{ release_branch }} 402 stdout: true 403 should_fail: true 404 comment: This command should fail with exit code 2 to verify branch {{ release_branch }} does not already exist 405 - !Command 406 cmd: git checkout -b {{ release_branch }} 407 tee: true 408 - !Command 409 cmd: git push origin {{ release_branch }} 410 tee: true 411 - !Todo 412 id: add_version_major 413 title: Add a new major version on main branch 414 types: 415 - major 416 depends: clean_git_checkout 417 vars: 418 next_version: "{{ release_version_major + 1 }}.0.0" 419 commands: !Commands 420 root_folder: '{{ git_checkout_folder }}' 421 commands_text: Run these commands to add the new major version {{ next_version }} to the main branch 422 commands: 423 - !Command 424 cmd: git checkout main 425 tee: true 426 - !Command 427 cmd: python3 -u dev-tools/scripts/addVersion.py {{ next_version }} 428 tee: true 429 - !Command 430 comment: Make sure the edits done by `addVersion.py` are ok, then push 431 cmd: git add -u . && git commit -m "Add next major version {{ next_version }}" && git push 432 logfile: commit-stable.log 433 post_description: | 434 Make sure to follow the manual instructions printed by the script: 435 436 * Move backcompat oldIndexes to unsupportedIndexes in TestBackwardsCompatibility 437 * Update IndexFormatTooOldException throw cases 438 439 There may be other steps needed as well 440 - !Todo 441 id: add_version_minor 442 title: Add a new minor version on stable branch 443 types: 444 - major 445 - minor 446 depends: clean_git_checkout 447 vars: 448 next_version: "{{ release_version_major }}.{{ release_version_minor + 1 }}.0" 449 commands: !Commands 450 root_folder: '{{ git_checkout_folder }}' 451 commands_text: Run these commands to add the new minor version {{ next_version }} to the stable branch 452 commands: 453 - !Command 454 cmd: git checkout {{ stable_branch }} 455 tee: true 456 - !Command 457 cmd: python3 -u dev-tools/scripts/addVersion.py {{ next_version }} 458 tee: true 459 - !Command 460 comment: Make sure the edits done by `addVersion.py` are ok, then push 461 cmd: git add -u . && git commit -m "Add next minor version {{ next_version }}" && git push 462 logfile: commit-stable.log 463 - !Todo 464 id: sanity_check_doap 465 title: Sanity check the DOAP files 466 description: |- 467 Sanity check the DOAP files under `dev-tools/doap/`. 468 Do they contain all releases less than the one in progress? 469 470 TIP: The buildAndPushRelease script run later will check this automatically 471 links: 472 - https://projects.apache.org/doap.html 473 - !Todo 474 id: jenkins_builds 475 title: Add Jenkins task for the release branch 476 description: '...so that builds run for the new branch. Consult the JenkinsReleaseBuilds page.' 477 types: 478 - major 479 - minor 480 links: 481 - https://cwiki.apache.org/confluence/display/LUCENEJAVA/JenkinsReleaseBuilds 482 - !Todo 483 id: inform_devs 484 title: Inform Devs of the new Release Branch 485 description: |- 486 Send a note to dev@ to inform the committers that the branch 487 has been created and the feature freeze phase has started. 488 489 This is an e-mail template you can use as a basis for 490 announcing the new branch and feature freeze. 491 492 .Mail template 493 ---- 494 To: dev@lucene.apache.org 495 Subject: New branch and feature freeze for Lucene {{ release_version }} 496 497 NOTICE: 498 499 Branch {{ release_branch }} has been cut and versions updated to {{ release_version_major }}.{{ release_version_minor + 1 }} on stable branch. 500 501 Please observe the normal rules: 502 503 * No new features may be committed to the branch. 504 * Documentation patches, build patches and serious bug fixes may be 505 committed to the branch. However, you should submit all patches you 506 want to commit to Jira first to give others the chance to review 507 and possibly vote against the patch. Keep in mind that it is our 508 main intention to keep the branch as stable as possible. 509 * All patches that are intended for the branch should first be committed 510 to the unstable branch, merged into the stable branch, and then into 511 the current release branch. 512 * Normal unstable and stable branch development may continue as usual. 513 However, if you plan to commit a big change to the unstable branch 514 while the branch feature freeze is in effect, think twice: can't the 515 addition wait a couple more days? Merges of bug fixes into the branch 516 may become more difficult. 517 * Only Jira issues with Fix version {{ release_version_major }}.{{ release_version_minor }} and priority "Blocker" will delay 518 a release candidate build. 519 ---- 520 types: 521 - major 522 - minor 523 - !Todo 524 id: inform_devs_bugfix 525 title: Inform Devs about the planned release 526 description: |- 527 Send a note to dev@ to inform the committers about the rules for committing to the branch. 528 529 This is an e-mail template you can use as a basis for 530 announcing the rules for committing to the release branch 531 532 .Mail template 533 ---- 534 To: dev@lucene.apache.org 535 Subject: Bugfix release Lucene {{ release_version }} 536 537 NOTICE: 538 539 I am now preparing for a bugfix release from branch {{ release_branch }} 540 541 Please observe the normal rules for committing to this branch: 542 543 * Before committing to the branch, reply to this thread and argue 544 why the fix needs backporting and how long it will take. 545 * All issues accepted for backporting should be marked with {{ release_version }} 546 in JIRA, and issues that should delay the release must be marked as Blocker 547 * All patches that are intended for the branch should first be committed 548 to the unstable branch, merged into the stable branch, and then into 549 the current release branch. 550 * Only Jira issues with Fix version {{ release_version }} and priority "Blocker" will delay 551 a release candidate build. 552 ---- 553 types: 554 - bugfix 555 - !Todo 556 id: draft_release_notes 557 title: Get a draft of the release notes in place 558 description: |- 559 These are typically edited on the Wiki 560 561 Clone a page for a previous version as a starting point for your release notes. 562 Edit the contents of `CHANGES.txt` into a more concise format for public consumption. 563 Ask on dev@ for input. Ideally the timing of this request mostly coincides with the 564 release branch creation. It's a good idea to remind the devs of this later in the release too. 565 566 NOTE: Do not add every single JIRA issue, but distill the Release note into important changes! 567 links: 568 - https://cwiki.apache.org/confluence/display/LUCENE/Release+Notes 569 - !Todo 570 id: new_jira_versions 571 title: Add a new version in JIRA for the next release 572 description: |- 573 Go to the JIRA "Manage Versions" Administration pages and add the new version: 574 575 {% if release_type == 'major' -%} 576 . Change name of version `main ({{ release_version_major }}.0)` into `{{ release_version_major }}.0` 577 {%- endif %} 578 . Create a new (unreleased) version `{{ get_next_version }}` 579 types: 580 - major 581 - minor 582 links: 583 - https://issues.apache.org/jira/plugins/servlet/project-config/LUCENE/versions 584- !TodoGroup 585 id: artifacts 586 title: Build the release artifacts 587 description: |- 588 If after the last day of the feature freeze phase no blocking issues are 589 in JIRA with "Fix Version" {{ release_version }}, then it's time to build the 590 release artifacts, run the smoke tester and stage the RC in svn 591 depends: 592 - test 593 - prerequisites 594 is_in_rc_loop: true 595 todos: 596 - !Todo 597 id: run_tests 598 title: Run javadoc tests 599 depends: clean_git_checkout 600 commands: !Commands 601 root_folder: '{{ git_checkout_folder }}' 602 commands_text: Run some tests not ran by `buildAndPublishRelease.py` 603 confirm_each_command: false 604 commands: 605 - !Command 606 cmd: git checkout {{ release_branch }} 607 stdout: true 608 - !Command 609 cmd: "{{ gradle_cmd }} documentation" 610 post_description: Check that the task passed. If it failed, commit fixes for the failures before proceeding. 611 - !Todo 612 id: clear_gradle_cache 613 title: Clear the gradle cache 614 description: | 615 It is recommended to clean your Gradle cache before building the artifacts. 616 This ensures that all Gradle dependencies are freshly downloaded, 617 so we emulate a user that never used the Lucene build system before. 618 commands: !Commands 619 root_folder: '{{ home }}' 620 remove_files: .gradle/caches/modules-2/files-2.1_bak 621 commands_text: These commands will help you rename the folder so you can get it back later if you wish 622 commands: 623 - !Command 624 cmd: "{{ rename_cmd }} files-2.1 files-2.1_bak" 625 cwd: .gradle/caches/modules-2 626 stdout: true 627 - !Todo 628 id: build_rc 629 title: Build the release candidate 630 depends: 631 - gpg 632 - run_tests 633 vars: 634 logfile: '{{ [rc_folder, ''logs'', ''buildAndPushRelease.log''] | path_join }}' 635 git_rev: '{{ current_git_rev }}' # Note, git_rev will be recorded in todo state AFTER completion of commands 636 local_keys: '{% if keys_downloaded %} --local-keys "{{ [config_path, ''KEYS''] | path_join }}"{% endif %}' 637 persist_vars: 638 - git_rev 639 commands: !Commands 640 root_folder: '{{ git_checkout_folder }}' 641 commands_text: |- 642 In this step we will build the RC using python script `buildAndPushRelease.py` 643 We have tried to compile the correct command below, and you can choose whether 644 to let this script kick it off or execute them in another Terminal window yourself 645 646 Note that the build will take a long time. To follow the detailed build 647 log, you can tail the log file {{ logfile | default("<logfile>") }}. 648 confirm_each_command: false 649 remove_files: 650 - '{{ dist_file_path }}' 651 commands: 652 - !Command 653 cmd: git checkout {{ release_branch }} 654 tee: true 655 - !Command 656 cmd: git clean -df && git checkout -- . 657 comment: Make sure checkout is clean and up to date 658 logfile: git_clean.log 659 tee: true 660 - !Command 661 cmd: git pull --ff-only 662 tee: true 663 - !Command 664 cmd: python3 -u dev-tools/scripts/buildAndPushRelease.py {{ local_keys }} --logfile {{ logfile }} --push-local "{{ dist_file_path }}" --rc-num {{ rc_number }} --sign {{ gpg_key | default("<gpg_key_id>", True) }} 665 comment: "NOTE: Remember to type your GPG pass-phrase at the prompt!" 666 logfile: build_rc.log 667 tee: true 668 - !Todo 669 id: smoke_tester 670 title: Run the smoke tester 671 depends: build_rc 672 vars: 673 dist_folder: lucene-{{ release_version }}-RC{{ rc_number }}-rev-{{ build_rc.git_rev | default("<git_rev>", True) }} 674 dist_path: '{{ [dist_file_path, dist_folder] | path_join }}' 675 tmp_dir: '{{ [rc_folder, ''smoketest''] | path_join }}' 676 local_keys: '{% if keys_downloaded %} --local-keys "{{ [config_path, ''KEYS''] | path_join }}"{% endif %}' 677 commands: !Commands 678 root_folder: '{{ git_checkout_folder }}' 679 commands_text: Here we'll smoke test the release by 'downloading' the artifacts, running the tests, validating GPG signatures etc. 680 remove_files: 681 - '{{ tmp_dir }}' 682 commands: 683 - !Command 684 cmd: python3 -u dev-tools/scripts/smokeTestRelease.py {{ local_keys }} --tmp-dir "{{ tmp_dir }}" file://{{ dist_path | expanduser }} 685 logfile: smoketest.log 686 - !Todo 687 id: import_svn 688 title: Import artifacts into SVN 689 description: | 690 Here we'll import the artifacts into Subversion. 691 depends: smoke_tester 692 vars: 693 dist_folder: lucene-{{ release_version }}-RC{{ rc_number }}-rev-{{ build_rc.git_rev | default("<git_rev>", True) }} 694 dist_path: '{{ [dist_file_path, dist_folder] | path_join }}' 695 dist_url: https://dist.apache.org/repos/dist/dev/lucene/{{ dist_folder}} 696 commands: !Commands 697 root_folder: '{{ git_checkout_folder }}' 698 commands_text: Have your Apache credentials handy, you'll be prompted for your password 699 commands: 700 - !Command 701 cmd: svn -m "Lucene {{ release_version }} RC{{ rc_number }}" import {{ dist_path }} {{ dist_url }} 702 logfile: import_svn.log 703 tee: true 704 - !Todo 705 id: verify_staged 706 title: Verify staged artifacts 707 description: | 708 A lightweight smoke testing which downloads the artifacts from stage 709 area and checks hash and signatures, but does not re-run all tests. 710 depends: import_svn 711 vars: 712 dist_folder: lucene-{{ release_version }}-RC{{ rc_number }}-rev-{{ build_rc.git_rev | default("<git_rev>", True) }} 713 dist_url: https://dist.apache.org/repos/dist/dev/lucene/{{ dist_folder}} 714 tmp_dir: '{{ [rc_folder, ''smoketest_staged''] | path_join }}' 715 local_keys: '{% if keys_downloaded %} --local-keys "{{ [config_path, ''KEYS''] | path_join }}"{% endif %}' 716 commands: !Commands 717 root_folder: '{{ git_checkout_folder }}' 718 commands_text: Here we'll verify that the staged artifacts are downloadable and hash/signatures match. 719 remove_files: 720 - '{{ tmp_dir }}' 721 commands: 722 - !Command 723 cmd: python3 -u dev-tools/scripts/smokeTestRelease.py {{ local_keys }} --download-only --tmp-dir "{{ tmp_dir }}" {{ dist_url }} 724 logfile: smoketest_staged.log 725- !TodoGroup 726 id: voting 727 title: Hold the vote and sum up the results 728 description: These are the steps necessary for the voting process. Read up on the link first! 729 is_in_rc_loop: true 730 todos: 731 - !Todo 732 id: initiate_vote 733 title: Initiate the vote 734 depends: verify_staged 735 description: | 736 If the smoke test passes against the staged artifacts, send an email to the dev mailing list announcing the release candidate. 737 738 .Mail template 739 ---- 740 To: dev@lucene.apache.org 741 Subject: [VOTE] Release Lucene {{ release_version }} RC{{ rc_number }} 742 743 Please vote for release candidate {{ rc_number }} for Lucene {{ release_version }} 744 745 The artifacts can be downloaded from: 746 https://dist.apache.org/repos/dist/dev/lucene/lucene-{{ release_version }}-RC{{ rc_number }}-rev-{{ build_rc.git_rev | default("<git_rev>", True) }} 747 748 You can run the smoke tester directly with this command: 749 750 python3 -u dev-tools/scripts/smokeTestRelease.py \ 751 https://dist.apache.org/repos/dist/dev/lucene/lucene-{{ release_version }}-RC{{ rc_number }}-rev-{{ build_rc.git_rev | default("<git_rev>", True) }} 752 753 The vote will be open for at least 72 hours i.e. until {{ vote_close }}. 754 755 [ ] +1 approve 756 [ ] +0 no opinion 757 [ ] -1 disapprove (and reason why) 758 759 Here is my +1 760 ---- 761 762 {% if vote_close_72h_holidays %} 763 [IMPORTANT] 764 ==== 765 The voting period contains one or more holidays. Please consider extending the vote deadline. 766 767 {% for holiday in vote_close_72h_holidays %}* {{ holiday }} 768 {% endfor %} 769 ==== 770 {%- endif %} 771 vars: 772 vote_close: '{{ vote_close_72h }}' 773 vote_close_epoch: '{{ vote_close_72h_epoch }}' 774 persist_vars: 775 - vote_close 776 - vote_close_epoch 777 function: create_ical 778 links: 779 - https://www.apache.org/foundation/voting.html 780 - !Todo 781 id: end_vote 782 title: End vote 783 depends: initiate_vote 784 description: | 785 At the end of the voting deadline, count the votes and send RESULT message to the mailing list. 786 787 {% set vote_close_epoch = initiate_vote.vote_close_epoch | int %} 788 {% if epoch < vote_close_epoch %} 789 WARNING: The planned voting deadline {{ initiate_vote.vote_close }} has not yet passed 790 {% else %} 791 The planned 72h voting deadline {{ initiate_vote.vote_close }} has passed. 792 {% endif %} 793 asciidoc: | 794 (( template=vote_macro )) 795 Note down how many votes were cast, summing as: 796 797 * Binding PMC-member +1 votes 798 * Non-binding +1 votes 799 * Neutral +/-0 votes 800 * Negative -1 votes 801 802 You need 3 binding +1 votes and more +1 than -1 votes for the release to happen. 803 A release cannot be vetoed, see more in provided links. 804 805 Here are some mail templates for successful and failed vote results with sample numbers: 806 807 {{ end_vote_result(3,1,0,2) }} 808 809 {{ end_vote_result(3,1,0,4) }} 810 811 {{ end_vote_result(2,9,0,0) }} 812 user_input: 813 - !UserInput 814 type: int 815 prompt: Number of binding +1 votes (PMC members) 816 name: plus_binding 817 - !UserInput 818 type: int 819 prompt: Number of other +1 votes 820 name: plus_other 821 - !UserInput 822 type: int 823 prompt: Number of 0 votes 824 name: zero 825 - !UserInput 826 type: int 827 prompt: Number of -1 votes 828 name: minus 829 post_description: | 830 (( template=vote_logic )) 831 (( template=vote_macro )) 832 {% if passed -%} 833 Congratulations! The vote has passed. 834 835 {% if minus > 0 %} 836 However, there were negative votes. A release cannot be vetoed, and as long as 837 there are more positive than negative votes you can techically release 838 the software. However, please review the negative votes and consider 839 a re-spin. 840 841 {% endif %} 842 {%- endif %} 843 {{ end_vote_result(plus_binding,plus_other,zero,minus) }} 844 links: 845 - https://www.apache.org/foundation/voting.html 846- !TodoGroup 847 id: publish 848 title: Publishing to the ASF Distribution Directory 849 description: Once the vote has passed, the release may be published to the ASF Distribution Directory and to Maven Central. 850 todos: 851 - !Todo 852 id: tag_release 853 title: Tag the release 854 description: Tag the release from the same revision from which the passing release candidate's was built 855 commands: !Commands 856 root_folder: '{{ git_checkout_folder }}' 857 commands_text: This will tag the release in git 858 logs_prefix: tag_release 859 commands: 860 - !Command 861 cmd: git tag -a releases/lucene/{{ release_version }} -m "Lucene {{ release_version }} release" {{ build_rc.git_rev | default("<git_rev>", True) }} 862 logfile: git_tag.log 863 tee: true 864 - !Command 865 cmd: git push origin releases/lucene/{{ release_version }} 866 logfile: git_push_tag.log 867 tee: true 868 - !Todo 869 id: rm_staged_mvn 870 title: Delete mvn artifacts from staging repo 871 vars: 872 dist_folder: lucene-{{ release_version }}-RC{{ rc_number }}-rev-{{ build_rc.git_rev | default("<git_rev>", True) }} 873 dist_path: '{{ [dist_file_path, dist_folder] | path_join }}' 874 dist_stage_url: https://dist.apache.org/repos/dist/dev/lucene/{{ dist_folder}} 875 commands: !Commands 876 root_folder: '{{ git_checkout_folder }}' 877 confirm_each_command: false 878 commands_text: This will remove maven artifacts so they do not end up in the Distribution Directory 879 commands: 880 - !Command 881 cmd: svn rm -m "Delete the lucene maven artifacts" {{ dist_stage_url }}/lucene/maven 882 logfile: svn_rm_mvn_lucene.log 883 tee: true 884 - !Todo 885 id: mv_to_release 886 title: Move release artifacts to release repo 887 vars: 888 dist_folder: lucene-{{ release_version }}-RC{{ rc_number }}-rev-{{ build_rc.git_rev | default("<git_rev>", True) }} 889 dist_stage_url: https://dist.apache.org/repos/dist/dev/lucene/{{ dist_folder}} 890 dist_release_url: https://dist.apache.org/repos/dist/release/lucene 891 commands: !Commands 892 root_folder: '{{ git_checkout_folder }}' 893 confirm_each_command: false 894 commands_text: This will move the new release artifacts from staging repo to the release repo 895 commands: 896 - !Command 897 cmd: svn move -m "Move Lucene {{ release_version }} RC{{ rc_number }} to release repo" {{ dist_stage_url }}/lucene {{ dist_release_url }}/java/{{ release_version }} 898 logfile: svn_mv_lucene.log 899 tee: true 900 - !Command 901 cmd: svn rm -m "Clean up the RC folder for {{ release_version }} RC{{ rc_number }}" https://dist.apache.org/repos/dist/dev/lucene/lucene-{{ release_version }}-RC{{ rc_number }}-rev-{{ build_rc.git_rev | default("<git_rev>", True) }} 902 logfile: svn_rm_containing.log 903 comment: Clean up containing folder on the staging repo 904 tee: true 905 post_description: 'Note at this point you will see the Jenkins job "Lucene-SmokeRelease-main" begin to fail, until you run the "Generate Backcompat Indexes" ' 906 - !Todo 907 id: stage_maven 908 title: Stage the maven artifacts for publishing 909 vars: 910 dist_folder: lucene-{{ release_version }}-RC{{ rc_number }}-rev-{{ build_rc.git_rev | default("<git_rev>", True) }} 911 commands: !Commands 912 root_folder: '{{ git_checkout_folder }}' 913 confirm_each_command: true 914 commands_text: In the source checkout do the following (note that this step will prompt you for your Apache LDAP credentials) 915 commands: 916 - !Command 917 cmd: ant clean stage-maven-artifacts -Dmaven.dist.dir={{ [dist_file_path, dist_folder, 'lucene', 'maven'] | path_join }} -Dm2.repository.id=apache.releases.https -Dm2.repository.url={{ m2_repository_url }} 918 logfile: publish_lucene_maven.log 919 post_description: The artifacts are not published yet, please proceed with the next step to actually publish! 920 - !Todo 921 id: publish_maven 922 depends: stage_maven 923 title: Publish the staged maven artifacts 924 description: | 925 Once you have transferred all maven artifacts to repository.apache.org, 926 you will need to do some manual steps to actually release them to Maven Central: 927 928 * Close the staging repository 929 . Log in to https://repository.apache.org/ with your ASF credentials 930 . Select "Staging Repositories" under "Build Promotion" from the navigation bar on the left 931 . Select the staging repository containing the Lucene artifacts 932 . Click on the "Close" button above the repository list, then enter a description when prompted, e.g. "Lucene {{ release_version }} RC{{ rc_number }}" 933 * The system will now spend some time validating the artifacts. Grab a coke and come back. 934 * Release the Lucene artifacts 935 . Wait and keep clicking refresh until the "Release" button becomes available 936 . Click on the "Release" button above the repository list, then enter a description when prompted, e.g. "Lucene {{ release_version }}". 937 938 Maven central should show the release after a short while 939 links: 940 - https://wiki.apache.org/lucene-java/PublishMavenArtifacts 941 - https://repository.apache.org/index.html 942 - !Todo 943 id: check_distribution_directory 944 depends: publish_maven 945 title: Check that artifacts are available 946 function: check_artifacts_available 947 description: | 948 The task will attempt to fetch https://dlcdn.apache.org/lucene/java/{{ release_version }}/lucene-{{ release_version }}-src.tgz.asc 949 to validate ASF repo, and https://repo1.maven.org/maven2/org/apache/lucene/lucene-core/{{ release_version }}/lucene-core-{{ release_version }}.pom.asc 950 to validate Maven repo. 951 952 If the check fails, please re-run the task, until it succeeds. 953 954- !TodoGroup 955 id: website 956 title: Update the website 957 description: | 958 For every release, we publish docs on the website, we need to update the 959 download pages etc. The website is hosted in https://github.com/apache/lucene-site 960 but the Javadocs are pushed to SVN and then included in the main site through links. 961 todos: 962 - !Todo 963 id: website_docs 964 title: Publish docs, changes and javadocs 965 description: | 966 Ensure your refrigerator has at least 2 beers - the svn import operation can take a while, 967 depending on your upload bandwidth. We'll publish this directly to the production tree. 968 At the end of the task, the two links below shall work. 969 links: 970 - http://lucene.apache.org/core/{{ version }} 971 vars: 972 release_tag: releases/lucene/{{ release_version }} 973 version: "{{ release_version_major }}_{{ release_version_minor }}_{{ release_version_bugfix }}" 974 commands: !Commands 975 root_folder: '{{ git_checkout_folder }}' 976 commands_text: Build the documentation and add it to SVN production tree 977 commands: 978 - !Command 979 cmd: git fetch && git checkout {{ release_tag }} 980 comment: Checkout the release branch 981 logfile: checkout-release-tag.log 982 tee: true 983 - !Command 984 cmd: "{{ gradle_cmd }} documentation -Dversion.release={{ release_version }}" 985 comment: Build documentation 986 - !Command 987 cmd: svn -m "Add docs, changes and javadocs for Lucene {{ release_version }}" import {{ git_checkout_folder }}/lucene/documentation/build/site https://svn.apache.org/repos/infra/sites/lucene/core/{{ version }} 988 logfile: add-docs-lucene.log 989 comment: Add docs for Lucene 990 - !Todo 991 id: website_git_clone 992 title: Do a clean git clone of the website repo 993 description: This is where we'll commit later updates for the website. 994 commands: !Commands 995 root_folder: '{{ release_folder }}' 996 commands_text: Run this command to clone the website git repo 997 remove_files: 998 - '{{ git_website_folder }}' 999 commands: 1000 - !Command 1001 cmd: git clone --progress https://gitbox.apache.org/repos/asf/lucene-site.git lucene-site 1002 logfile: website_git_clone.log 1003 - !Todo 1004 id: website_update_versions 1005 title: Update website versions 1006 depends: website_git_clone 1007 vars: 1008 release_tag: releases/lucene/{{ release_version }} 1009 description: | 1010 We need to update the website so that the download pages list the new release, and the 1011 "latest" javadoc links point to the new release. 1012 1013 Fortunately the only thing you need to change is a few variables in `pelicanconf.py`. 1014 If you release a current latest release, change the `LUCENE_LATEST_RELEASE` and `LUCENE_LATEST_RELEASE_DATE` 1015 variables. 1016 If you relese a bugfix release for previos version, then change the `LUCENE_PREVIOUS_MAJOR_RELEASE` variable. 1017 commands: !Commands 1018 root_folder: '{{ git_website_folder }}' 1019 commands_text: Edit pelicanconf.py to update version numbers 1020 commands: 1021 - !Command 1022 cmd: "{{ editor }} pelicanconf.py" 1023 comment: Edit the pelicanconf.file 1024 stdout: true 1025 - !Command 1026 cmd: git commit -am "Update version variables for release {{ release_version }}" 1027 logfile: commit.log 1028 stdout: true 1029 post_description: | 1030 You will push and verify all changes in a later step 1031 - !Todo 1032 id: prepare_announce_lucene 1033 title: Author the Lucene release news 1034 depends: website_git_clone 1035 description: | 1036 Edit a news text for the Lucene website. This text will be the basis for the release announcement email later. 1037 This step will open an editor with a template. You will need to copy/paste the final release announcement text 1038 from the Wiki page and format it as Markdown. 1039 function: prepare_announce_lucene 1040 commands: !Commands 1041 root_folder: '{{ git_website_folder }}' 1042 commands_text: | 1043 Copy the Lucene announcement from https://cwiki.apache.org/confluence/display/LUCENE/Release+Notes 1044 You have to exit the editor after edit to continue. 1045 commands: 1046 - !Command 1047 cmd: "{{ editor }} {{ lucene_news_file }}" 1048 comment: Edit the for Lucene announcement news 1049 stdout: true 1050 - !Command 1051 cmd: git add . && git commit -m "Adding Lucene news for release {{ release_version }}" 1052 logfile: commit.log 1053 stdout: true 1054 post_description: | 1055 You will push and verify all changes in a later step 1056 - !Todo 1057 id: update_other 1058 title: Update rest of webpage 1059 depends: website_update_versions 1060 description: | 1061 Update the rest of the web page. Please review all files in the checkout 1062 and consider if any need change based on what changes there are in the 1063 release you are doing. Things to consider: 1064 1065 * System requirements 1066 * Quickstart and tutorial? 1067 commands: !Commands 1068 root_folder: '{{ git_website_folder }}' 1069 commands_text: | 1070 We'll open an editor on the root folder of the site checkout 1071 You have to exit the editor after edit to continue. 1072 commands: 1073 - !Command 1074 cmd: "{{ editor }} ." 1075 comment: Open an editor on the root folder 1076 stdout: true 1077 - !Command 1078 cmd: git commit -am "Other website changes for release {{ release_version }}" 1079 comment: Commit the other changes 1080 logfile: commit.log 1081 stdout: true 1082 - !Todo 1083 id: stage_website 1084 title: Stage the website changes 1085 depends: 1086 - prepare_announce_lucene 1087 description: | 1088 Push the website changes to 'main' branch, and check the staging site. 1089 You will get a chance to preview the diff of all changes before you push. 1090 If you need to do changes, do the changes (e.g. by re-running previous step 'Update rest of webpage') 1091 and commit your changes. Then re-run this step and push when everything is OK. 1092 commands: !Commands 1093 root_folder: '{{ git_website_folder }}' 1094 commands_text: | 1095 Verify that changes look good, and then publish. 1096 You have to exit the editor after review to continue. 1097 commands: 1098 - !Command 1099 cmd: git checkout main && git status 1100 stdout: true 1101 - !Command 1102 cmd: git diff 1103 redirect: "{{ [release_folder, 'website.diff'] | path_join }}" 1104 comment: Make a diff of all edits. Will open in next step 1105 - !Command 1106 cmd: "{{ editor }} {{ [release_folder, 'website.diff'] | path_join }}" 1107 comment: View the diff of the website changes. Abort if you need to do changes. 1108 stdout: true 1109 - !Command 1110 cmd: git push origin 1111 comment: Push all changes 1112 logfile: push-website.log 1113 post_description: | 1114 Wait a few minutes for the build to happen. You can follow the site build at https://ci2.apache.org/#/builders/3 1115 and view the staged site at https://lucene.staged.apache.org 1116 Verify that correct links and versions are mentioned in download pages, download buttons etc. 1117 If you find anything wrong, then commit and push any changes and check again. 1118 1119 Next step is to merge the changes to branch 'production' in order to publish the site. 1120 links: 1121 - https://ci2.apache.org/#/builders/3 1122 - https://lucene.staged.apache.org 1123 - !Todo 1124 id: publish_website 1125 title: Publish the website changes 1126 depends: 1127 - stage_website 1128 description: | 1129 Push the website changes to 'production' branch. This will build and publish the live site on 1130 https://lucene.apache.org 1131 commands: !Commands 1132 root_folder: '{{ git_website_folder }}' 1133 commands: 1134 - !Command 1135 cmd: git checkout production && git pull --ff-only 1136 stdout: true 1137 - !Command 1138 cmd: git merge main 1139 stdout: true 1140 - !Command 1141 cmd: git push origin 1142 comment: Push all changes to production branch 1143 logfile: push-website.log 1144 post_description: | 1145 Wait a few minutes for the build to happen. You can follow the site build at https://ci2.apache.org/#/builders/3 1146 1147 Verify on https://lucene.apache.org that the site is OK. 1148 1149 You can now also verify that http://lucene.apache.org/core/api/core/ redirects to the latest version 1150 links: 1151 - https://ci2.apache.org/#/builders/3 1152 - https://lucene.apache.org 1153 - http://lucene.apache.org/core/api/core/ 1154 - !Todo 1155 id: update_doap 1156 title: Update the DOAP files 1157 description: | 1158 Update the DOAP RDF files on the unstable, stable and release branches to 1159 reflect the new versions (note that the website .htaccess file redirects from their 1160 canonical URLs to their locations in the Lucene Git source repository - see 1161 dev-tools/doap/README.txt for more info) 1162 commands: !Commands 1163 root_folder: '{{ git_checkout_folder }}' 1164 commands_text: Edit DOAP files 1165 commands: 1166 - !Command 1167 cmd: git checkout main && git pull --ff-only 1168 stdout: true 1169 comment: Goto main branch 1170 - !Command 1171 cmd: "{{ editor }} dev-tools/doap/lucene.rdf" 1172 comment: Edit Lucene DOAP, add version {{ release_version }} 1173 stdout: true 1174 - !Command 1175 cmd: git add dev-tools/doap/lucene.rdf && git commit -m "DOAP changes for release {{ release_version }}" 1176 logfile: commit.log 1177 stdout: true 1178 - !Command 1179 cmd: git push origin 1180 logfile: push.log 1181 stdout: true 1182 comment: Push the main branch 1183 - !Command 1184 cmd: "git checkout {{ stable_branch }} && git pull --ff-only" 1185 stdout: true 1186 comment: Checkout the stable branch 1187 - !Command 1188 cmd: "git cherry-pick main" 1189 logfile: commit.log 1190 stdout: true 1191 comment: Cherrypick the DOAP changes from main onto the stable branch. 1192 - !Command 1193 cmd: git show HEAD 1194 stdout: true 1195 comment: Ensure the only change is adding the new version. 1196 - !Command 1197 cmd: git push origin 1198 logfile: push.log 1199 stdout: true 1200 comment: Push the stable branch 1201 - !Command 1202 cmd: "git checkout {{ release_branch }} && git pull --ff-only" 1203 stdout: true 1204 comment: Checkout the release branch 1205 - !Command 1206 cmd: "git cherry-pick {{ stable_branch }}" 1207 logfile: commit.log 1208 stdout: true 1209 comment: Cherrypick the DOAP changes from the stable branch onto the release branch. 1210 - !Command 1211 cmd: git show HEAD 1212 stdout: true 1213 comment: Ensure the only change is adding the new version. 1214 - !Command 1215 cmd: git push origin 1216 logfile: push.log 1217 stdout: true 1218 comment: Push the release branch 1219- !TodoGroup 1220 id: announce 1221 title: Announce the release 1222 description: | 1223 For feature releases, your announcement should describe the main features included 1224 in the release. *Send the announce as Plain-text email, not HTML.* 1225 1226 This step will generate email templates based on the news files you edited earler for the website. 1227 Do any last-minute necessary edits to the text as you copy it over to the email. 1228 todos: 1229 - !Todo 1230 id: announce_lucene 1231 title: Announce the Lucene release (@l.a.o) 1232 description: | 1233 (( template=announce_lucene_mail )) 1234 - !Todo 1235 id: setup_pgp_mail 1236 title: Setup your mail client for PGP 1237 description: | 1238 The announce mail to `announce@apache.org` should be cryptographically signed. 1239 Make sure you have a PGP enabled email client with your apache key installed. 1240 There are plugins for popular email programs, as well as browser plugins for webmail. 1241 See links for help on how to setup your email client for PGP. 1242 1243 If you prefer to sign the announcements manually rather than using a plugin, 1244 you can do so from the command line and then copy the output into your mail program. 1245 1246 gpg --output - --clearsign lucene_announce.txt 1247 links: 1248 - https://www.openpgp.org/software/ 1249 - https://ssd.eff.org/en/module/how-use-pgp-mac-os-x 1250 - https://ssd.eff.org/en/module/how-use-pgp-linux 1251 - https://ssd.eff.org/en/module/how-use-pgp-windows 1252 - https://www.openpgp.org/software/mailvelope/ 1253 - !Todo 1254 id: announce_lucene_sig 1255 title: Announce the Lucene release (announce@a.o) 1256 description: | 1257 (( template=announce_lucene_sign_mail )) 1258 - !Todo 1259 id: add_to_wikipedia 1260 title: Add the new version to Wikipedia 1261 description: | 1262 Go to Wikipedia and edit the page to include the new release. 1263 Major versions should have a small new paragraph under 'History'. 1264 If you know other languages than English, edit those as well. 1265 links: 1266 - https://en.wikipedia.org/wiki/Apache_Lucene 1267 - !Todo 1268 id: add_to_apache_reporter 1269 title: Add the new version to the Apache Release Reporter 1270 description: | 1271 Go to the Apache Release Reporter and add a release for lucene. 1272 Fill in the same date that you used for the release in previous steps. 1273 Do not use a product name prefix for the version, as this is the main release of the lucene PMC. 1274 Just use the version of this release: {{ release_version }} 1275 links: 1276 - https://reporter.apache.org/addrelease.html?lucene 1277- !TodoGroup 1278 id: post_release 1279 title: Tasks to do after release. 1280 description: There are many more tasks to do now that the new version is out there, so hang in there for a few more hours. 1281 todos: 1282 - !Todo 1283 id: add_version_bugfix 1284 title: Add a new bugfix version to stable and unstable branches 1285 types: 1286 - bugfix 1287 commands: !Commands 1288 root_folder: '{{ git_checkout_folder }}' 1289 commands_text: | 1290 Update versions on main and stable branch. 1291 You may have to hand-edit some files before commit, so go slowly :) 1292 confirm_each_command: true 1293 commands: 1294 - !Command 1295 cmd: git checkout main && git pull --ff-only && git clean -df && git checkout -- . 1296 comment: Go to main branch 1297 logfile: checkout-main.log 1298 - !Command 1299 cmd: python3 -u dev-tools/scripts/addVersion.py {{ release_version }} 1300 logfile: addversion-main.log 1301 - !Command 1302 cmd: git diff 1303 logfile: diff-main.log 1304 tee: true 1305 - !Command 1306 cmd: git add -u . && git commit -m "Add bugfix version {{ release_version }}" && git push 1307 logfile: commit-main.log 1308 - !Command 1309 cmd: git checkout {{ stable_branch }} && git pull --ff-only && git clean -df && git checkout -- . 1310 logfile: checkout-stable.log 1311 comment: Now the same for the stable branch 1312 - !Command 1313 cmd: python3 -u dev-tools/scripts/addVersion.py {{ release_version }} 1314 logfile: addversion-stable.log 1315 - !Command 1316 cmd: git diff 1317 logfile: diff-stable.log 1318 tee: true 1319 - !Command 1320 cmd: git add -u . && git commit -m "Add bugfix version {{ release_version }}" && git push 1321 logfile: commit-stable.log 1322 - !Todo 1323 id: synchronize_changes 1324 title: Synchronize CHANGES.txt 1325 description: | 1326 Copy the CHANGES.txt section for this release back to the stable and unstable branches' 1327 CHANGES.txt files, removing any duplicate entries, but only from sections for as-yet 1328 unreleased versions; leave intact duplicate entries for already-released versions. 1329 1330 There is a script to generate a regex that will match JIRAs fixed in a release: 1331 `releasedJirasRegex.py`. The following examples will print regexes matching all JIRAs 1332 fixed in {{ release_version }}, which can then be used to find duplicates in unreleased 1333 version sections of the corresponding CHANGES.txt files. 1334 commands: !Commands 1335 root_folder: '{{ git_checkout_folder }}' 1336 commands_text: Synchronize CHANGES.txt 1337 commands: 1338 - !Command 1339 cmd: git checkout {{ release_branch }} 1340 comment: Go to release branch 1341 logfile: checkout-release.log 1342 stdout: true 1343 - !Command 1344 cmd: python3 -u -B dev-tools/scripts/releasedJirasRegex.py {{ release_version }} lucene/CHANGES.txt 1345 tee: true 1346 comment: Find version regexes 1347 - !Command 1348 cmd: git checkout main && git pull --ff-only && git clean -df && git checkout -- . 1349 comment: Go to main branch 1350 logfile: checkout-main.log 1351 - !Command 1352 cmd: "{{ editor }} lucene/CHANGES.txt" 1353 comment: Edit CHANGES.txt for main branch, do necessary changes 1354 stdout: true 1355 - !Command 1356 cmd: git add -u . && git commit -m "Sync CHANGES for {{ release_version }}" && git push 1357 logfile: commit-main.log 1358 - !Command 1359 cmd: git checkout {{ stable_branch }} && git pull --ff-only && git clean -df && git checkout -- . 1360 comment: Go to stable branch 1361 logfile: checkout-stable.log 1362 - !Command 1363 cmd: "{{ editor }} lucene/CHANGES.txt" 1364 comment: Edit CHANGES.txt for stable branch, do necessary changes 1365 stdout: true 1366 - !Command 1367 cmd: git add -u . && git commit -m "Sync CHANGES for {{ release_version }}" && git push 1368 logfile: commit-stable.log 1369 - !Todo 1370 id: increment_release_version 1371 title: Add the next version on release branch 1372 description: Add the next version after the just-released version on the release branch 1373 depends: publish_maven 1374 vars: 1375 next_version: "{{ release_version_major }}.{{ release_version_minor }}.{{ release_version_bugfix + 1 }}" 1376 commands: !Commands 1377 root_folder: '{{ git_checkout_folder }}' 1378 commands_text: Run these commands to add the new bugfix version {{ next_version }} to the release branch 1379 commands: 1380 - !Command 1381 cmd: git checkout {{ release_branch }} 1382 tee: true 1383 - !Command 1384 cmd: python3 -u dev-tools/scripts/addVersion.py {{ next_version }} 1385 tee: true 1386 - !Command 1387 cmd: git diff 1388 logfile: diff.log 1389 comment: Check the git diff before committing. Do any edits if necessary 1390 tee: true 1391 - !Command 1392 cmd: git add -u . && git commit -m "Add next bugfix version {{ next_version }}" && git push 1393 logfile: commit-stable.log 1394 - !Todo 1395 id: backcompat_release 1396 title: Generate Backcompat Indexes for release branch 1397 description: | 1398 After each version of Lucene is released, compressed CFS, non-CFS, and sorted indexes created with 1399 the newly released version are added to `lucene/backwards-codecs/src/test/org/apache/lucene/index/`, 1400 for use in testing backward index compatibility via org.apache.lucene.index.TestBackwardsCompatibility, 1401 which is also located under the `backwards-codecs/` module. There are also three indexes created only 1402 with major Lucene versions: moreterms, empty, and dvupdates. These indexes are created via methods 1403 on `TestBackwardsCompatibility` itself - see comments in the source for more information. 1404 1405 There is a script (`dev-tools/scripts/addBackcompatIndexes.py`) that automates most of the process. 1406 It downloads the source for the specified release; generates indexes for the current release using 1407 `TestBackwardsCompatibility`; compresses the indexes and places them in the correct place in the source 1408 tree; modifies TestBackwardsCompatibility.java to include the generated indexes in the list of indexes 1409 to test; and then runs `TestBackwardsCompatibility`. 1410 1411 In this and the next two steps we'll guide you through using this tool on each of the branches. 1412 depends: 1413 - increment_release_version 1414 vars: 1415 temp_dir: "{{ [release_folder, 'backcompat'] | path_join }}" 1416 commands: !Commands 1417 root_folder: '{{ git_checkout_folder }}' 1418 commands_text: Run these commands to add back-compat indices to release branch 1419 commands: 1420 - !Command 1421 cmd: git checkout {{ release_branch }} && git pull --ff-only && git clean -df && git checkout -- . 1422 tee: true 1423 logfile: checkout.log 1424 - !Command 1425 cmd: "{{ gradle_cmd }} clean" 1426 - !Command 1427 cmd: python3 -u dev-tools/scripts/addBackcompatIndexes.py --no-cleanup --temp-dir {{ temp_dir }} {{ release_version }} && git add lucene/backward-codecs/src/test/org/apache/lucene/backward_index/ 1428 logfile: add-backcompat.log 1429 - !Command 1430 cmd: git diff --staged 1431 comment: Check the git diff before committing 1432 tee: true 1433 - !Command 1434 cmd: git commit -m "Add back-compat indices for {{ release_version }}" && git push 1435 logfile: commit.log 1436 - !Todo 1437 id: backcompat_stable 1438 title: Generate Backcompat Indexes for stable branch 1439 description: | 1440 Now generate back-compat for stable branch ({{ stable_branch }}) 1441 depends: 1442 - increment_release_version 1443 vars: 1444 temp_dir: "{{ [release_folder, 'backcompat'] | path_join }}" 1445 commands: !Commands 1446 root_folder: '{{ git_checkout_folder }}' 1447 commands_text: Run these commands to add back-compat indices to {{ stable_branch }} 1448 commands: 1449 - !Command 1450 cmd: git checkout {{ stable_branch }} && git pull --ff-only && git clean -df && git checkout -- . 1451 tee: true 1452 logfile: checkout.log 1453 - !Command 1454 cmd: "{{ gradle_cmd }} clean" 1455 - !Command 1456 cmd: python3 -u dev-tools/scripts/addBackcompatIndexes.py --no-cleanup --temp-dir {{ temp_dir }} {{ release_version }} && git add lucene/backward-codecs/src/test/org/apache/lucene/backward_index/ 1457 logfile: add-backcompat.log 1458 - !Command 1459 cmd: git diff --staged 1460 comment: Check the git diff before committing 1461 tee: true 1462 - !Command 1463 cmd: git commit -m "Add back-compat indices for {{ release_version }}" && git push 1464 logfile: commit.log 1465 - !Todo 1466 id: backcompat_main 1467 title: Generate Backcompat Indexes for unstable branch 1468 description: | 1469 Now generate back-compat for unstable (main) branch. 1470 Note that this time we do not specify `--no-cleanup` meaning the tmp folder will be deleted 1471 depends: 1472 - increment_release_version 1473 vars: 1474 temp_dir: "{{ [release_folder, 'backcompat'] | path_join }}" 1475 version: "{{ set_java_home(main_version) }}" 1476 commands: !Commands 1477 root_folder: '{{ git_checkout_folder }}' 1478 commands_text: Run these commands to add back-compat indices to main 1479 commands: 1480 - !Command 1481 cmd: git checkout main && git pull --ff-only && git clean -df && git checkout -- . 1482 tee: true 1483 logfile: checkout.log 1484 - !Command 1485 cmd: "{{ gradle_cmd }} clean" 1486 - !Command 1487 cmd: python3 -u dev-tools/scripts/addBackcompatIndexes.py --temp-dir {{ temp_dir }} {{ release_version }} && git add lucene/backward-codecs/src/test/org/apache/lucene/backward_index/ 1488 logfile: add-backcompat.log 1489 - !Command 1490 cmd: git diff --staged 1491 comment: Check the git diff before committing 1492 tee: true 1493 - !Command 1494 cmd: git commit -m "Add back-compat indices for {{ release_version }}" && git push 1495 logfile: commit.log 1496 post_description: | 1497 When doing a major version release, eg. 8.0.0, you might also need to reenable some 1498 backward compatibility tests for corner cases. To find them, run grep -r assume 1499 lucene/backward-codecs/, which should find tests that have been disabled on main 1500 because there was no released Lucene version to test against. 1501 {{ set_java_home(release_version) }} 1502 - !Todo 1503 id: jira_release 1504 title: Mark version as released in JIRA 1505 description: |- 1506 Go to the JIRA "Manage Versions" Administration pages. 1507 1508 . Next to version {{ release_version }}, click the gear pop-up menu icon and choose "Release" 1509 . Fill in the release date ({{ release_date | formatdate }}) 1510 . It will give the option of transitioning issues marked fix-for the released version to the 1511 next version, but do not do this as it will send an email for each issue :) 1512 links: 1513 - https://issues.apache.org/jira/plugins/servlet/project-config/LUCENE/versions 1514 - !Todo 1515 id: jira_close_resolved 1516 title: Close all issues resolved in the release 1517 description: |- 1518 Go to JIRA search to find all issues that were fixed in the release 1519 you just made, whose Status is Resolved. 1520 1521 . Go to https://issues.apache.org/jira/issues/?jql=project+in+(LUCENE)+AND+status=Resolved+AND+fixVersion={{ release_version }} 1522 . Do a bulk change (Under Tools... menu) to close all of these issues. This is a workflow transition task 1523 . In the 'Comment' box type `Closing after the {{ release_version }} release` 1524 . *Uncheck* the box that says `Send mail for this update` 1525 links: 1526 - https://issues.apache.org/jira/issues/?jql=project+in+(LUCENE)+AND+status=Resolved+AND+fixVersion={{ release_version }} 1527 - !Todo 1528 id: jira_change_unresolved 1529 title: Remove fixVersion for unresolved 1530 description: |- 1531 Do another JIRA search to find all issues with Resolution=_Unresolved_ and fixVersion=_{{ release_version }}_. 1532 1533 . Open https://issues.apache.org/jira/issues/?jql=project+=+LUCENE+AND+resolution=Unresolved+AND+fixVersion={{ release_version }} 1534 . In the `Tools` menu, start a bulk change - operation="Edit issues" 1535 . Identify issues that *are included* in the release, but are unresolved e.g. due to being REOPENED. These shall *not* be bulk changed! 1536 . Check the box next to `Change Fix Version/s` and in the dropdown `Find and remove these`, selecting v {{ release_version }} 1537 . On the bottom of the form, uncheck the box that says `Send mail for this update` 1538 . Click `Next`, review the changes and click `Confirm` 1539 links: 1540 - https://issues.apache.org/jira/issues/?jql=project+=+LUCENE+AND+resolution=Unresolved+AND+fixVersion={{ release_version }} 1541 - !Todo 1542 id: new_jira_versions_bugfix 1543 title: Add a new version in JIRA for the next release 1544 description: |- 1545 Go to the JIRA "Manage Versions" Administration pages and add the new version: 1546 1547 . Create a new (unreleased) version `{{ get_next_version }}` 1548 types: 1549 - bugfix 1550 links: 1551 - https://issues.apache.org/jira/plugins/servlet/project-config/LUCENE/versions 1552 - !Todo 1553 id: stop_promoting_old 1554 title: Stop promoting old releases 1555 description: | 1556 Shortly after new releases are first published, they are automatically copied to the archives. 1557 Only the latest point release from each active branch should be kept under the Lucene PMC 1558 svnpubsub area `dist/releases/lucene/`. Older releases can be 1559 safely deleted, since they are already backed up in the archives. 1560 1561 Currenlty these versions exist in the distribution directory: 1562 1563 *{{ mirrored_versions|join(', ') }}* 1564 1565 The commands below will remove old versions automatically. If this suggestion is wrong, 1566 please do *not* execute the commands automatically, but edit the command and run manually. 1567 Versions to be deleted from the distribution directory are: 1568 1569 *{{ mirrored_versions_to_delete|join(', ') }}* 1570 1571 commands: !Commands 1572 root_folder: '{{ git_checkout_folder }}' 1573 commands_text: | 1574 Run these commands to delete proposed versions from distribution directory. 1575 1576 WARNING: Validate that the proposal is correct! 1577 commands: 1578 - !Command 1579 cmd: | 1580 svn rm -m "Stop publishing old Lucene releases"{% for ver in mirrored_versions_to_delete %} https://dist.apache.org/repos/dist/release/lucene/java/{{ ver }}{% endfor %} 1581 logfile: svn-rm-lucene.log 1582