Remove the package_and_publish_release_dryrun workflow (#38533)

Summary:
The `package_and_publish_release_dryrun` workflow does the same steps that we are actually already doing in the `tests` workflow.
Both workflows are triggered when `run_nightly_workflow == false && run_release_workflow == false` so the triggering condition **is the same**

The following table highlights and compares the steps performed by the two workflows:

| Package_and_publish_release_dryrun | Tests |
| --- | --- |
| `prepare_package_for_release(version: ‘’, latest: false, dryrun: true)` | |
| `prepare_hermes_workspace` | `prepare_hermes_workspace` |
| `build_hermesc_linux` | `build_hermesc_linux` |
| `build_hermes_macos(flavor: Debug | Release)` | `build_hermes_macos(flavor: Debug | Release)` |
| `build_hermesc_windows` | `build_hermesc_windows` |
| `build_npm_package (release_type: dry-run)` | `build_npm_package(release_type: dry-run)` |

The only missing job in `tests` workflow is `prepare_package_for_release`. This job has the following features:
1. It invokes the `prepare-package-for-release.js` scripts, actually testing it.
2. It doesn’t cache anything,
3. it doesn’t attach any workspace

Due to 2 and 3, it means that it does not influence any job that follow it in the pipeline as they won't access any of the results from this job.

So, we are adding this job in the Test pipeline, so we exercise the `prepare-package-for-release.js` making sure that it works,  and remove
the whole `package_and_publish_release_dryrun` wroflow as it will now be completely duplicated

## Changelog:

[Internal] - Remove the `package_and_publish_release_dryrun` workflow

Pull Request resolved: https://github.com/facebook/react-native/pull/38533

Test Plan: CircleCI stays green

Reviewed By: cortinico

Differential Revision: D47633526

Pulled By: cipolleschi

fbshipit-source-id: 28ea9c5944931b992ad07fdeecf08e1d1a86b775
This commit is contained in:
Riccardo Cipolleschi
2023-07-30 07:57:49 -07:00
committed by Facebook GitHub Bot
parent 265f72f6da
commit 62c9aaea9b
2 changed files with 7 additions and 48 deletions
+5 -34
View File
@@ -1752,6 +1752,11 @@ workflows:
- equal: [ false, << pipeline.parameters.run_release_workflow >> ]
- equal: [ false, << pipeline.parameters.run_nightly_workflow >> ]
jobs:
- prepare_package_for_release:
name: prepare_package_for_release
version: ''
latest : false
dryrun: true
- prepare_hermes_workspace
- test_ios_rntester_hermes_xcode_integration
- build_hermesc_linux:
@@ -1939,40 +1944,6 @@ workflows:
- build_hermes_macos
- build_hermesc_windows
package_and_publish_release_dryrun:
when:
and:
- equal: [ false, << pipeline.parameters.run_release_workflow >> ]
- equal: [ false, << pipeline.parameters.run_nightly_workflow >> ]
jobs:
- prepare_package_for_release:
name: prepare_package_for_release
version: ''
latest : false
dryrun: true
- prepare_hermes_workspace:
requires:
- prepare_package_for_release
- build_hermesc_linux:
requires:
- prepare_hermes_workspace
- build_hermes_macos:
requires:
- prepare_hermes_workspace
matrix:
parameters:
flavor: ["Debug", "Release"]
- build_hermesc_windows:
requires:
- prepare_hermes_workspace
- build_npm_package:
name: build_and_publish_npm_package
release_type: "dry-run"
requires:
- build_hermesc_linux
- build_hermes_macos
- build_hermesc_windows
analysis:
when:
and:
+2 -14
View File
@@ -26,16 +26,8 @@ async function initialize(circleCIToken, baseTempPath, branchName) {
baseTemporaryPath = baseTempPath;
exec(`mkdir -p ${baseTemporaryPath}`);
const pipeline = await _getLastCircleCIPipelineID(branchName);
const packageAndReleaseWorkflow = await _getPackageAndReleaseWorkflow(
pipeline.id,
);
const testsWorkflow = await _getTestsWorkflow(pipeline.id);
const jobsPromises = [
_getCircleCIJobs(packageAndReleaseWorkflow.id),
_getCircleCIJobs(testsWorkflow.id),
];
const jobsResults = await Promise.all(jobsPromises);
const jobsResults = await _getCircleCIJobs(testsWorkflow.id);
jobs = jobsResults.flatMap(j => j);
}
@@ -96,10 +88,6 @@ function _throwIfWorkflowNotFound(workflow, name) {
}
}
async function _getPackageAndReleaseWorkflow(pipelineId) {
return _getSpecificWorkflow(pipelineId, 'package_and_publish_release_dryrun');
}
async function _getTestsWorkflow(pipelineId) {
return _getSpecificWorkflow(pipelineId, 'tests');
}
@@ -165,7 +153,7 @@ async function artifactURLHermesDebug() {
}
async function artifactURLForMavenLocal() {
return _findUrlForJob('build_and_publish_npm_package-2', 'maven-local.zip');
return _findUrlForJob('build_npm_package', 'maven-local.zip');
}
async function artifactURLForHermesRNTesterAPK(emulatorArch) {