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

Sync Build Artifacts to Devfile component containers #43

Closed
maysunfaisal opened this issue May 6, 2020 · 4 comments
Closed

Sync Build Artifacts to Devfile component containers #43

maysunfaisal opened this issue May 6, 2020 · 4 comments
Milestone

Comments

@maysunfaisal
Copy link
Member

maysunfaisal commented May 6, 2020

I was wondering rather than specifying a custom image in component container like this:

commands:
  - exec:
      id: buildSchema
      label: Build the schema
      commandLine: "./buildSchema.sh"
      component: build-tools
      group:
        kind: build
        isDefault: true
components:
  - container:
      image: "maysunfaisal/myImageWithBuildSchema.sh"
      mountSources: true
      sourceMapping: /home/src
      name: "build-tools"

if we should support syncing of build artifact(s) buildSchema.sh to the component container with a base image, for example maven:latest rather than providing maysunfaisal/myImageWithBuildSchema.sh.

This way, a devfile creator would not require the need to build a custom image with these artifacts burned in.

@l0rd
Copy link
Contributor

l0rd commented May 19, 2020

This use case should be supported with events (look at the 3rd use case in the description "Copy files before workspace startup").

@l0rd l0rd added this to the 2.1.0 milestone Jun 11, 2020
@elsony
Copy link
Contributor

elsony commented Jan 5, 2021

Closing this one since this is an old item that we no longer need. We'll handle it via events.

@elsony elsony closed this as completed Jan 5, 2021
@scottkurz
Copy link
Contributor

@maysunfaisal @elsony just trying to understand this use case better.

Where does the buildSchema.sh that we're trying to "sync" come from? I don't think you're saying it gets mounted from the application project. If it's not built into the "build-tools" container then where does it come from....some other container?

Maybe I'm missing the intent behind calling it a "build artifact" (or just the definition there).

Appreciate your insight here.

@elsony
Copy link
Contributor

elsony commented Jan 8, 2021

@scottkurz This item was created a while ago so in a sense this original proposal is obsolete. The original request on this item is to use some scripts to prime the containers with the necessary build scripts, i.e. for container init. We now have the events that allows stacks to do container init using specific commands defined in the commands section of the devfile. Each command is associated with a component and thus runs within the context of a container. Those commands will have access to the contents of the container image and that's where the resources are stored in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants