Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport 1.x] [CI][Build] Use BUILD_NUMBER for building bundles #1381

Merged
merged 1 commit into from
Mar 24, 2022

Conversation

opensearch-trigger-bot[bot]
Copy link
Contributor

Backport 797d988 from #1371

When running a release build for example:

```
yarn build-platform --linux --skip-os-packages --release
```

The build task runs through get_build_number and
checks how many commits you have locally and determines the
build number. From there, and this is the value that
is used to as a cache busting mechanism.

However, in the release build repo
https://github.com/opensearch-project/opensearch-build

When this gets packaged and verified it actually pulls
from the specified branch and only retrieves the HEAD
commit. Thus making the count of commits locally equal
to `1` and get_build_number always return `1` for releases
essentially breaking the cache buster.

The build repo however, sets an env variable of `BUILD_NUMBER`
so if this value is available it will use it instead of commit
count.

The CI runs the unit tests and only gets the latest commit as well
so instead of setting a env build number and basically creating
the same unit test only check this locally.

Issues resolved:
* opensearch-project/opensearch-build#1769
* #1363

Signed-off-by: Kawika Avilla <kavilla414@gmail.com>
(cherry picked from commit 797d988)
@kavilla kavilla self-requested a review March 24, 2022 17:44
@kavilla kavilla merged commit be86cc5 into 1.x Mar 24, 2022
@github-actions github-actions bot deleted the backport/backport-1371-to-1.x branch March 24, 2022 22:55
@tmarkley tmarkley added v1.3.1 and removed v1.4.0 labels Apr 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants