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

Groovy scripts with leading numbers to ensure execution order #1

Open
avoidik opened this issue Oct 3, 2017 · 4 comments
Open

Groovy scripts with leading numbers to ensure execution order #1

avoidik opened this issue Oct 3, 2017 · 4 comments

Comments

@avoidik
Copy link

avoidik commented Oct 3, 2017

Subj

@oleg-nenashev
Copy link
Owner

It could be done for sure though I am thinking about a better approach with the dependency declaration once I https://github.com/librecores/librecores-ci/blob/master/init_scripts/src/main/groovy/GroovyBootstrap.groovy added to this repository

@reinholdfuereder
Copy link
Contributor

I think you already did it? See

@avoidik
Copy link
Author

avoidik commented Apr 12, 2019

For instance let's imagine the case where we have the following files sorted by the logical order of execution

  1. base-config.groovy - we're applying basic configuration
  2. config-ldap.groovy - we're adding LDAP configuration
  3. add-users.groovy - we're adding users

If we're going to keep them as is the logical order will be kind of nonsense after scripts.sort().each { being applied.

  1. add-users.groovy - we're adding users to something that doesn't exist yet
  2. base-config.groovy
  3. config-ldap.groovy

By introducing a certain naming convention the required order of execution will be ensured, e.g.

  1. 01-config-ldap.groovy
  2. 02-base-config.groovy
  3. 03-add-users.groovy

Please correct me if I'm wrong

@reinholdfuereder
Copy link
Contributor

Sorry for causing confusion:

  • @avoidik I think your idea/suggestion makes perfectly sense
  • and I had thought/hoped that @oleg-nenashev current implementation might already allow/support that?

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

3 participants