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

[BXMSPROD-2019] Productized branch creation #967

Merged
merged 7 commits into from
Jun 26, 2023
Merged

[BXMSPROD-2019] Productized branch creation #967

merged 7 commits into from
Jun 26, 2023

Conversation

lampajr
Copy link
Contributor

@lampajr lampajr commented May 9, 2023

JIRA: https://issues.redhat.com/browse/BXMSPROD-2019

Referenced Pull Requests:

deploy artifacts configurable

Improvements:

  • Update build chain configuration on DSL config repository
  • Update prod branch on all repos
  • Downgrade Quarkus

String repoCredsId = repoConfig.author?.credentials_id ?: readMainBranchConfig().git.author.credentials_id

// TODO is this value saved somewhere such that we do not have to hardcode?
String jobsGroovyPath = '.ci/jenkins/dsl/jobs.groovy'
Copy link
Contributor Author

@lampajr lampajr May 9, 2023

Choose a reason for hiding this comment

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

where could we save this path in order to avoid hardcoding it? maybe we can simply save it on the branch.yaml, wdyt?

Copy link
Contributor

Choose a reason for hiding this comment

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

in the env ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I decided to put it in the branch.yaml > jenkins > jobs_definition_file [1] to make it more customizable, wdyt?

[1] https://github.com/kiegroup/kogito-pipelines/pull/967/files#diff-e528bf449969213a2b24315837341a4cbe03d928d66ade752bdab2a628b6424eR144

// def jobsGroovy = readFile file: jobsGroovyPath
// remove fullProfile
sh "sed -i 's/, addFullProfileJobParamsGetter)/)/g' ${jobsGroovyPath}"
// TODO: disable pr checks in getMultijobPRConfig, get them from params
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This should be the last remaining part to implement, disable PR checks from jobs.groovy file.
I would do that in a separate PR as I need to re-think a bit what is the best way to handle it.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we need to redo the way the PR checks are generated in those repositories, to make it more dynamic, based on:

  • build-chain-config
  • or a file in .ci folder (name to be considered)

we can discuss about that if you want

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree as at the moment to disable them we should manipulate the file and it could be tricky to fully automate, furthermore changes on the file could also easily break the automation as it would be. So I agree on rethink how to setup those jobs.

@lampajr
Copy link
Contributor Author

lampajr commented May 9, 2023

Jenkins DSL / Drools DSL Downstream tests - lampajr/drools (pull_request) is failing for this:

org.kie.jenkins.jobdsl.JobScriptsSpec > test script /tmp/tmp.kqlIuPlzrE/dsl/seed/jobs/jobs.groovy FAILED
    org.spockframework.runtime.UnallowedExceptionThrownError at JobScriptsSpec.groovy:76
        Caused by: javaposse.jobdsl.dsl.DslScriptException at JobScriptsSpec.groovy:72
            Caused by: groovy.lang.MissingMethodException at JobScriptsSpec.groovy:72

@lampajr
Copy link
Contributor Author

lampajr commented May 11, 2023

Jenkins DSL / Drools DSL Downstream tests - lampajr/drools (pull_request) is failing for this:

org.kie.jenkins.jobdsl.JobScriptsSpec > test script /tmp/tmp.kqlIuPlzrE/dsl/seed/jobs/jobs.groovy FAILED
    org.spockframework.runtime.UnallowedExceptionThrownError at JobScriptsSpec.groovy:76
        Caused by: javaposse.jobdsl.dsl.DslScriptException at JobScriptsSpec.groovy:72
            Caused by: groovy.lang.MissingMethodException at JobScriptsSpec.groovy:72

looks like it was a temporary/random issue :/ it was using forked drools branch that was not existing anymore (maybe cached?) - now all green

@lampajr
Copy link
Contributor Author

lampajr commented May 25, 2023

Linked https://github.com/kiegroup/optaplanner/pull/2845 to setup DSL changes on OptaPlanner repo too

@lampajr lampajr marked this pull request as ready for review June 5, 2023 11:00
dsl/seed/jobs/root_jobs.groovy Outdated Show resolved Hide resolved
dsl/seed/jenkinsfiles/Jenkinsfile.prod.prepare Outdated Show resolved Hide resolved
dsl/seed/jenkinsfiles/Jenkinsfile.prod.prepare Outdated Show resolved Hide resolved
String repoCredsId = repoConfig.author?.credentials_id ?: readMainBranchConfig().git.author.credentials_id

// TODO is this value saved somewhere such that we do not have to hardcode?
String jobsGroovyPath = '.ci/jenkins/dsl/jobs.groovy'
Copy link
Contributor

Choose a reason for hiding this comment

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

in the env ?

// def jobsGroovy = readFile file: jobsGroovyPath
// remove fullProfile
sh "sed -i 's/, addFullProfileJobParamsGetter)/)/g' ${jobsGroovyPath}"
// TODO: disable pr checks in getMultijobPRConfig, get them from params
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we need to redo the way the PR checks are generated in those repositories, to make it more dynamic, based on:

  • build-chain-config
  • or a file in .ci folder (name to be considered)

we can discuss about that if you want

dsl/seed/jenkinsfiles/Jenkinsfile.prod.prepare Outdated Show resolved Hide resolved
dsl/seed/jenkinsfiles/Jenkinsfile.prod.prepare Outdated Show resolved Hide resolved
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

Successfully merging this pull request may close these issues.

2 participants