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

Support command line parameters for 1build yaml configuration file #100

Open
gopinath-langote opened this issue Jun 18, 2019 · 3 comments
Open
Labels
new_feature New features Team Discussion Team Discussion (not ready for pickup yet)

Comments

@gopinath-langote
Copy link
Owner

Description

Imagine you have to run specific command just toggling one value in it. For example, running your spring boot application with a different profile. The current 1build configuration might look like –

project: spring project
commands:
  - run: mvn spring-boot:run -Dspring-boot.run.profiles=local
  - run-dev: mvn spring-boot:run -Dspring-boot.run.profiles=dev
  - run-staging: mvn spring-boot:run -Dspring-boot.run.profiles=staging
  - run-uat: mvn spring-boot:run -Dspring-boot.run.profiles=uat

With this new feature, you can just write like configuration file like,

project: spring project
commands:
  - run: mvn spring-boot:run -Dspring-boot.run.profiles={{profile:=local}}

Where profile is variable and the default value is local.

Now you can use command 1build run dev to run the application using dev profile

OR

1build run --profile staging to run using staging profile.

Acceptance Criteria

  • Use of variables in 1build configuration file.
  • If a named variable is not present use the sequence of input at variable left to right

@landpro and @Ritabrata-TW
WDYT about this feature?

@gopinath-langote gopinath-langote added new_feature New features Team Discussion Team Discussion (not ready for pickup yet) labels Jun 18, 2019
@gopinath-langote gopinath-langote added this to To do in Feature Ideas / Bug tracker via automation Jun 18, 2019
@that-data-scientist
Copy link
Contributor

Sounds like a handy thing to have. +1

@AdeshAtole
Copy link

AdeshAtole commented Jun 19, 2019

Isn't the whole purpose of 1build to avoid commands with long list of options?

@gopinath-langote
Copy link
Owner Author

@AdeshAtole Yes, you are right.

As you can see above, the duplication of commands run , run-dev , run-staging

  • you duplicating a lot of configuration just for 1/2 place changes. This feature might be useful for developers who prefer to parameterize the commands instead of duplicating.

We can hold on this until we get some more feedbacks on this.

@alexluix alexluix changed the title set dynamic values with 1build yaml configuration file Support command line parameters for 1build yaml configuration file Jun 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new_feature New features Team Discussion Team Discussion (not ready for pickup yet)
Projects
Development

No branches or pull requests

3 participants