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

adding build scripts to extract stack resources #180

Merged
merged 1 commit into from
Aug 28, 2023

Conversation

mike-hoang
Copy link
Contributor

Please specify the area for this PR

/area registry

What does does this PR do / why we need it:

Adds extract_resources.sh

  • Extracts the archive.tar inside the stack directory which contains outerloop resources that are referenced by the devfiles

Adds dl_parent_devfiles.sh

  • Downloads all parent uri devfiles and updates the child devfile to point to the downloaded parent

Which issue(s) this PR fixes:

Fixes devfile/api#1220

PR acceptance criteria:

  • Test Coverage
    • Are your changes sufficiently tested, and are any applicable test cases added or updated to cover your changes?

Documentation (WIP)

How to test changes / Special notes to the reviewer:
To test locally:

  1. Update the STACK_DIR to STACKS_DIR=tests/registry/stacks
  2. Run the scripts; bash /registry-support/build-tools/extract_resources.sh, bash /registry-support/build-tools/dl_parent_devfiles.sh

To test with the registry build script:

Verify that resources are inside the stack:

  • docker run --rm -it --entrypoint bash devfile-index
  • cd /registry/stacks/

@openshift-ci
Copy link

openshift-ci bot commented Aug 22, 2023

@mike-hoang: The label(s) area/registry cannot be applied, because the repository doesn't have them.

In response to this:

Please specify the area for this PR

/area registry

What does does this PR do / why we need it:

Adds extract_resources.sh

  • Extracts the archive.tar inside the stack directory which contains outerloop resources that are referenced by the devfiles

Adds dl_parent_devfiles.sh

  • Downloads all parent uri devfiles and updates the child devfile to point to the downloaded parent

Which issue(s) this PR fixes:

Fixes devfile/api#1220

PR acceptance criteria:

  • Test Coverage
    • Are your changes sufficiently tested, and are any applicable test cases added or updated to cover your changes?

Documentation (WIP)

How to test changes / Special notes to the reviewer:
To test locally:

  1. Update the STACK_DIR to STACKS_DIR=tests/registry/stacks
  2. Run the scripts; bash /registry-support/build-tools/extract_resources.sh, bash /registry-support/build-tools/dl_parent_devfiles.sh

To test with the registry build script:

Verify that resources are inside the stack:

  • docker run --rm -it --entrypoint bash devfile-index
  • cd /registry/stacks/

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@codecov
Copy link

codecov bot commented Aug 22, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (b136d19) 35.93% compared to head (0894ff1) 35.93%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #180   +/-   ##
=======================================
  Coverage   35.93%   35.93%           
=======================================
  Files           7        7           
  Lines        1347     1347           
=======================================
  Hits          484      484           
  Misses        816      816           
  Partials       47       47           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@michael-valdron michael-valdron left a comment

Choose a reason for hiding this comment

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

Aside from the change requests it would be good to have a few additional stacks (or stack versions) with a parent stack uri to test the dl_parent_devfiles.sh script on.

build-tools/dl_parent_devfiles.sh Outdated Show resolved Hide resolved
build-tools/extract_resources.sh Outdated Show resolved Hide resolved
build-tools/dl_parent_devfiles.sh Outdated Show resolved Hide resolved
build-tools/extract_resources.sh Outdated Show resolved Hide resolved
Signed-off-by: Michael Hoang <mhoang@redhat.com>
Copy link
Member

@michael-valdron michael-valdron left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 28, 2023
@openshift-ci
Copy link

openshift-ci bot commented Aug 28, 2023

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: michael-valdron, mike-hoang
Once this PR has been reviewed and has the lgtm label, please assign elsony for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@mike-hoang mike-hoang merged commit 049028b into devfile:main Aug 28, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm Indicates that a PR is ready to be merged.
Projects
None yet
2 participants