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

[build] Add task skips intended for partial builds #92076

Merged
merged 4 commits into from
Feb 23, 2021

Conversation

jbudz
Copy link
Member

@jbudz jbudz commented Feb 19, 2021

Currently the build supports skips for leaf nodes: archive creation and OS
packages. This adds skip options for folder cleanup and source build
folders. This is intended to support two scenarios:

  1. Debugging. Creating the build source folders and compiling assets
    takes up the bulk of build time. This can make testing package
    creation changes time consuming.

  2. Build resuming. When creating docker images, we want the option to
    drop an archive in the target folder and run only the docker build step.

Three flags have been added:

--skip-initialize Don't clean the target and build folders
--skip-generic-folders Don't create the base source folders
--skip-platform-folders Don't create the platform specific folders

The build syntax for this is verbose and probably due for refactoring.
The long term goal is to migrate this to bazel, and the changes here are
intended as stopgap until then.

Testing - standalone Docker image
https://snapshots.elastic.co/8.0.0-000145a6/downloads/kibana/kibana-8.0.0-SNAPSHOT-linux-x86_64.tar.gz
https://snapshots.elastic.co/8.0.0-000145a6/downloads/kibana/kibana-8.0.0-SNAPSHOT-linux-aarch64.tar.gz

yarn kbn clean
yarn kbn bootstrap
mv ~/Downloads/kibana-8.0.0-SNAPSHOT-linux-x86_64.tar.gz target
node scripts/build \
  --no-oss \
  --skip-initialize \
  --skip-generic-folders \
  --skip-platform-folders \
  --skip-archives \
  --docker-images \
  --skip-docker-ubi \
  --skip-docker-contexts

Currently the build supports skips for leaf nodes: archive creation and OS
packages.  This adds skip options for folder cleanup and source build
folders.  This is intended to support two scenarios:

1) Debugging.  Creating the build source folders and compiling assets
takes up the bulk of build time.  This can make testing package
creation changes time consuming.

2) Build resuming.  When creating docker images, we want the option to
drop an archive in the target folder and run only the docker build step.

Three flags have been added:
```
--skip-initialize Don't clean the target and build folders
--skip-generic-folders Don't create the base source folders
--skip-platform-folders Don't create the platform specific folders
```

The build syntax for this is verbose and probably due for refactoring.
The long term goal is to migrate this to bazel, and the changes here are
intended as stopgap until then.

Testing - standalone Docker image
```
yarn kbn clean
yarn kbn bootstrap
mv ~/Downloads/kibana-8.0.0-SNAPSHOT-linux-x86_64.tar.gz target
node scripts/build \
  --no-oss \
  --skip-initialize \
  --skip-generic-folders \
  --skip-platform-folders \
  --skip-archives \
  --docker-images \
  --skip-docker-ubi \
  --skip-docker-contexts
```
@jbudz jbudz added Team:Operations Team label for Operations Team v8.0.0 release_note:skip Skip the PR/issue when compiling release notes v7.13.0 labels Feb 19, 2021
@jbudz jbudz requested a review from a team as a code owner February 19, 2021 19:39
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations (Team:Operations)

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Copy link
Contributor

@spalger spalger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jbudz jbudz merged commit 8fac02f into elastic:master Feb 23, 2021
@jbudz jbudz deleted the build/skip-resume branch February 23, 2021 19:46
@jbudz
Copy link
Member Author

jbudz commented Feb 23, 2021

7.x: 7bb628b

jbudz added a commit that referenced this pull request Feb 24, 2021
jbudz added a commit that referenced this pull request Feb 24, 2021
gmmorris added a commit to gmmorris/kibana that referenced this pull request Feb 25, 2021
…bana into task-manager/docs-monitoring

* 'task-manager/docs-monitoring' of github.com:gmmorris/kibana: (120 commits)
  Bump the CI Node.js version from 14.15.4 to 14.16.0 (elastic#92578)
  [Uptime] Search made easy (elastic#88581)
  [Lens] Stop requesting stats on Records field (elastic#92508)
  [APM] Correlations style polish in prep for release (elastic#92514)
  [Lens] Fix sorting undefined, null and NaN values (elastic#92575)
  Put environment back in uiFilters (elastic#92561)
  [Discover] Fix sorting by _score behavior (elastic#92132)
  Add metricbeat steps to jenkins_build_load_testing.sh (elastic#90290)
  [Usage Collection] Remove unused UI Metric APIs (elastic#91620)
  Fix timelion deprecation documentation links (elastic#92576)
  [TSVB] Enable `dual mode`, support index patterns and strings (elastic#92395)
  Fix text align in Safari (elastic#92374)
  [Actions][Doc] Clean up Actions README (elastic#91789)
  chore(NA): add missing files to exclude when building bazel prod packages (elastic#92506)
  [Security Solution][Endpoint][Admin] Match Policy Details in Security Solution with Fleet (elastic#92047)
  Revert "[build] Add task skips intended for partial builds (elastic#92076)"
  [Enterprise Search] Change icon for error in EuiCallouts (elastic#92527)
  [Alerts][Docs] Alert types doc update. Added refs to applications specific alerts groups. (elastic#91787)
  [Security Solution][Exceptions] - Update exceptions modal to use existing lists plugin useApi hook (elastic#92348)
  [DOCS] Updates refresh text in index pattern doc (elastic#92469)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes reverted Team:Operations Team label for Operations Team v7.13.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants