Repository: opensearch-project/opensearch-build

Issue:
[RELEASE] Release version 1.3.8
## Release OpenSearch and OpenSearch Dashboards 1.3.8

I noticed that a manifest was automatically created in [manifests/1.3.8](/opensearch-project/opensearch-build/tree/main/manifests/1.3.8). Please follow the following checklist to make a release.

<details><summary>How to use this issue</summary>
<p>

## This Release Issue

This issue captures the state of the OpenSearch release, its assignee is responsible for driving the release. Please contact them or @mention them on this issue for help. There are linked issues on components of the release where individual components can be tracked.  More details are included in the Maintainers [Release owner](https://github.com/opensearch-project/opensearch-build/blob/main/MAINTAINERS.md#release-owner) section.

## Release Steps

There are several steps to the release process, these steps are completed as the whole release and components that are behind present risk to the release.  The release owner completes the tasks in this ticket, whereas component owners resolve tasks on their ticket in their repositories.

Steps have completion dates for coordinating efforts between the components of a release; components can start as soon as they are ready far in advance of a future release.

### Component List

To aid in understanding the state of the release there is a table with status indicating each component state. This is updated based on the status of the component issues.

</p>
</details>

### Preparation

- [x] Assign this issue to a release owner.
- [x] Declare a pencils down date for new features to be merged. 
- [x] Jan 26th is pencils down date for feature freeze.
- [x] Update the Campaigns section to include monitoring campaigns during this release. 
- [x] Update this issue so all `__REPLACE_RELEASE-__` placeholders have actual dates.
- [x] Document any new quality requirements or changes.
- [x] Finalize scope and feature set and update [the Public Roadmap](https://github.com/orgs/opensearch-project/projects/1). 
- [x] [Create a release issue in every component repo](https://github.com/opensearch-project/opensearch-build/blob/main/meta/README.md#create-a-release-issue) that links back to this issue, update Components section with these links.
- [x] Ensure the label is created in each component repo for this new version, and the next minor release. [Create a version label](https://github.com/opensearch-project/opensearch-plugins/blob/main/META.md#create-or-update-labels-in-all-plugin-repos)
- [x] Ensure that all release issues created above are assigned to an owner in the component team.
- [x] Increase the build frequency for the this release from once a day (H 1 * * *) to once every hour (H/60 * * * *) in [jenkinsFile](https://github.com/opensearch-project/opensearch-build/blob/main/jenkins/check-for-build.jenkinsfile).

### Campaigns

__REPLACE with OpenSearch wide initiatives to improve quality and consistency.__

### Release Branch - 01/26/2023

- [x] Component versions are auto-incremented to 1.3.8 version.
- [x] Plugins team to ensure working CI in component repositories and merge the version increment PRs.
- [x] OpenSearch / OpenSearch-Dashboards core cut branch `<MajorVersion>.<MinorVersion>` early.
- [x] All component repos create `<MajorVersion>.<MinorVersion>` branch for the release.

### Feature Freeze - 01/26/2023

- [x] OpenSearch / OpenSearch-Dashboards core and components teams finalize their features.
- [x] Create Jenkins workflows that run daily snapshot builds for [OpenSearch](https://build.ci.opensearch.org/job/distribution-build-opensearch/) and [OpenSearch Dashboards](https://build.ci.opensearch.org/job/distribution-build-opensearch-dashboards/).
- [x] Make pull requests to add each component to [manifests/1.3.8/opensearch-1.3.8.yml](/opensearch-project/opensearch-build/tree/main/manifests/1.3.8/opensearch-1.3.8.yml) and [manifests/1.3.8/opensearch-dashboards-1.3.8.yml](/opensearch-project/opensearch-build/tree/main/manifests/1.3.8/opensearch-dashboards-1.3.8.yml) with the corresponding checks.

### Code Complete - 01/26/2023 - 01/27/2023

- [x] Code Complete: Make sure that the code for this specific version of the release is ready and the branch corresponding to this release has been added to this release version manifest.
- [x] Verify pull requests to add each component to [manifests/1.3.8/opensearch-1.3.8.yml](/opensearch-project/opensearch-build/tree/main/manifests/1.3.8/opensearch-1.3.8.yml) and [manifests/1.3.8/opensearch-dashboards-1.3.8.yml](/opensearch-project/opensearch-build/tree/main/manifests/1.3.8/opensearch-dashboards-1.3.8.yml) have been merged.
- [x] Gather, review and combine the release notes from components repositories.

### Release testing - 01/27/2023 - 01/30/2023

- [x] Declare a release candidate build, and provide the instructions with the release candidates for teams on testing (__REPLACE_RELEASE-minus-8-days__).
- [x] Stop builds for this version of OpenSearch and/or OpenSearch Dashboards in order to avoid accidental commits going in unknowingly. Restart only if necessary else manually run the build workflow and declare new release candidate.
- [x] After generate the release candidates, raise PR to lock input manifest refs of both OS and OSD builds with the commit ids from distribution manifest of the release candidates.
- [x] Sanity Testing (__REPLACE_RELEASE-minus-8-days__ - __REPLACE_RELEASE-minus-6-days__): Sanity testing and fixing of critical issues found by teams. Teams test their components within the distribution, ensuring integration, backwards compatibility, and perf tests pass.
- [x] Publish all test results in the comments of this issue.

~~### Performance testing validation - _Ends __REPLACE_RELEASE-minus-6-days___~~

~~- [ ] Performance tests do not show a regression.~~
~~- [ ] Longevity tests do not show any issues.~~

### Release - 02/01/2023 - 02/02/2023

- [x] Verify [all issues labeled `v1.3.8` in all projects](https://github.com/opensearch-project/project-meta#find-labeled-issues) have been resolved.
- [x] Complete [documentation](https://github.com/opensearch-project/documentation-website) for this release.
- [ ] Author [blog post](https://github.com/opensearch-project/project-website) for this release.
- [ ] __REPLACE_RELEASE-minus-1-day - Publish this release on [opensearch.org](https://opensearch.org/downloads.html).
- [ ] __REPLACE_RELEASE-day - Publish a [blog post](https://github.com/opensearch-project/project-website) - release is launched!

### Post Release

- [x] Create [release tags](https://github.com/opensearch-project/opensearch-build/blob/main/jenkins/release-tag/release-tag.jenkinsfile) for each component (Jenkins job name: release-tag-creation).
- [x] Replace refs in [manifests/1.3.8](/opensearch-project/opensearch-build/tree/main/manifests/1.3.8) with tags and remove checks.
- [ ] If this is a major or minor version release, stop building previous patch version.
- [x] Generate distribution release notes reviewed by PM team for opensearch-build repository.
- [x] Increment version for Helm Charts [(sample PR)](https://github.com/opensearch-project/helm-charts/pull/246) for the `1.3.8` release.
- [x] Increment version for Ansible Charts [(sample PR)](https://github.com/opensearch-project/ansible-playbook/pull/50) for the `1.3.8` release.
- [x] Prepare [for next patch release](https://github.com/opensearch-project/opensearch-plugins/blob/main/META.md#increment-a-version-in-every-plugin) by incrementing patch versions for each component.
- [x] Update [this template](https://github.com/opensearch-project/opensearch-build/blob/main/.github/ISSUE_TEMPLATE/release_template.md) with any new or missed steps.
- [x] Create an issue for a retrospective, solicit feedback, and publish a summary.

### Components

__Replace with links to all component tracking issues.__

| Component | On track | Release Notes |
| --------- | -------- | ----- |
| {COMPONENT_ISSUE_LINK} | {INDICATOR}} | {STATUS} |

<details><summary>Legend</summary>
<p>

| Symbol | Meaning |
| -------- | ---------- |
| :green_circle: | On track with overall release |
| :yellow_circle: | Missed last milestone |
| :red_circle: | Missed multiple milestones |

</p>
</details>



Discussion:

Resolving patch:
diff --git a/src/manifests_workflow/input_manifests.py b/src/manifests_workflow/input_manifests.py
--- a/src/manifests_workflow/input_manifests.py
+++ b/src/manifests_workflow/input_manifests.py
@@ -28,6 +28,10 @@ class InputManifests(Manifests):
         "opensearch": "linux macos windows",
         "opensearch-dashboards": "linux windows"
     }
+    BUILD_DISTRIBUTION = {
+        "opensearch": "tar rpm deb zip",
+        "opensearch-dashboards": "tar rpm deb zip"
+    }
 
     def __init__(self, name: str) -> None:
         self.name = name
@@ -170,10 +174,12 @@ def add_to_cron(self, version: str) -> None:
             data = f.read()
 
         build_platform = self.BUILD_PLATFORM.get(self.prefix, "linux")
+        build_distribution = self.BUILD_DISTRIBUTION.get(self.prefix, "tar")
 
         cron_entry = f"H 1 * * * %INPUT_MANIFEST={version}/{self.prefix}-{version}.yml;" \
                      f"TARGET_JOB_NAME=distribution-build-{self.prefix};" \
-                     f"BUILD_PLATFORM={build_platform}\n"
+                     f"BUILD_PLATFORM={build_platform};" \
+                     f"BUILD_DISTRIBUTION={build_distribution}\n"
 
         if cron_entry in data:
             raise ValueError(f"{jenkinsfile} already contains an entry for {self.prefix} {version}")


Test patch:
diff --git a/tests/tests_manifests_workflow/test_input_manifests.py b/tests/tests_manifests_workflow/test_input_manifests.py
--- a/tests/tests_manifests_workflow/test_input_manifests.py
+++ b/tests/tests_manifests_workflow/test_input_manifests.py
@@ -126,7 +126,7 @@ def test_add_to_cron(self, mock_open: MagicMock) -> None:
         mock_open.assert_has_calls([call(InputManifests.cron_jenkinsfile(), 'r')])
         mock_open().write.assert_called_once_with(
             f"parameterizedCron '''\n{' ' * 12}H 1 * * * %INPUT_MANIFEST=0.1.2/test-0.1.2.yml;"
-            f"TARGET_JOB_NAME=distribution-build-test;BUILD_PLATFORM=linux\n"
+            f"TARGET_JOB_NAME=distribution-build-test;BUILD_PLATFORM=linux;BUILD_DISTRIBUTION=tar\n"
         )
 
     def test_versionincrement_workflow(self) -> None: