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

brig project create templates #816

Open
radu-matei opened this issue Feb 22, 2019 · 6 comments

Comments

Projects
3 participants
@radu-matei
Copy link
Member

commented Feb 22, 2019

It would be really helpful if brig project create would have a template for a Git vs non-Git projects at creation time. When selecting the non-Git option, the following would happen:

  • repository information would not be configurable
  • clone URL information would not be configurable
  • the custom VCS sidecar would be automatically set to NONE
  • Git submodules inforrmation would not be configurable
  • a Brigade.js file would be mandatory (either config map, or local)
  • a secret for the generic gateway would be required
@dgkanatsios

This comment has been minimized.

Copy link
Collaborator

commented Feb 22, 2019

I'd love that. Currently, the second prompt of brig project create asks for a repo, which, to the eyes of a new user, makes Brigade appear as a VCS-centric utility. We should align this with the docs enhancement on #806 (i.e. provide more non-Git samples).

Do you think that a simple prompt Do you want Brigade to pull files from a Git repo on every Build? after naming the project would suffice?

@radu-matei radu-matei added this to Backlog in Brigade Feb 25, 2019

@AlverezYari

This comment has been minimized.

Copy link

commented Apr 1, 2019

Can confirm.. new user trying it out for the first time today and that was the impression I got. Also curious if you actually have to have a job.task = ["somethinghere?"] command in your brigade.js file. The containers we'll be using already have entry points defined, we really just want Brigade to run them to completion in a set order.

@dgkanatsios

This comment has been minimized.

Copy link
Collaborator

commented Apr 8, 2019

The containers we'll be using already have entry points defined, we really just want Brigade to run them to completion in a set order.

Have you checked the scripting guide here on how to write the brigade.js file? Jobs run asynchronously but you can chain them together using JS Promises:

const { events, Job } = require("brigadier")

events.on("exec", () => {
  var hello = new Job("hello", "alpine:3.4")
  hello.tasks = [
    "echo Hello",
    "echo World"
  ]

  var goodbye = new Job("goodbye", "alpine:3.4")
  goodbye.tasks = [
    "echo Goodbye",
    "echo World"
  ]

  hello.run().then(() => {
    goodbye.run()
  })
})
@dgkanatsios

This comment has been minimized.

Copy link
Collaborator

commented Apr 8, 2019

@radu-matei
question: on the new brig project create, if you do want to create a VCS Project, would you be able to configure Generic Gateway secret? I guess not, since if you use a VCS you wouldn't need another Gateway. WDYT?

btw, when you mention template, is this a reference to anything cobra related or this switch from VCS to non-VCS questions should be manually created?

@AlverezYari

This comment has been minimized.

Copy link

commented Apr 8, 2019

@dgkanatsios Yep, working through it now. I was just curious if you had to have to actually have anything within task brackets, or if you left it blank it would still run the container with its default set entry point which appears to appears to work fine.

@radu-matei

This comment has been minimized.

Copy link
Member Author

commented Apr 11, 2019

@AlverezYari -- yeah, not passing tasks should execute the default entrypoint of the container.

@dgkanatsios -- no, nothing Cobra-related, I used template as a way to differentiate between the VCS vs. non-VCS scenarios.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.