feat: Convert_to_gl_ci flow with Flow Registry
❗ Must be merged AFTER gitlab-org/modelops/applied-ml/code-suggestions/ai-assist!4131 (merged) is merged and tested ❗
What does this MR do and why?
This MR adds a new FF to toggle between the current convert_to_gl_ci workflow and the new Flow Registry convert_to_gl_ci flow.
References
Screenshots or screen recordings
| Before | After |
|---|---|
|
|
|
How to set up and validate locally
-
Checkout
ah/convert-to-gitlab-ci-flow-registry -
Navigate to a Jenkinsfile in GDK
# Jenkinsfile node { // Mark the code checkout 'stage'.... stage 'Stage Checkout' // Checkout code from repository and update any submodules checkout scm sh 'git submodule update --init' stage 'Stage Build' //branch name from Jenkins environment variables echo "My branch is: ${env.BRANCH_NAME}" def flavor = flavor(env.BRANCH_NAME) echo "Building flavor ${flavor}" //build your gradle flavor, passes the current build number as a parameter to gradle sh "./gradlew clean assemble${flavor}Debug -PBUILD_NUMBER=${env.BUILD_NUMBER}" stage 'Stage Archive' //tell Jenkins to archive the apks archiveArtifacts artifacts: 'app/build/outputs/apk/*.apk', fingerprint: true stage 'Stage Upload To Fabric' sh "./gradlew crashlyticsUploadDistribution${flavor}Debug -PBUILD_NUMBER=${env.BUILD_NUMBER}" } // Pulls the android flavor out of the branch name the branch is prepended with /QA_ @NonCPS def flavor(branchName) { def matcher = (env.BRANCH_NAME =~ /QA_([a-z_]+)/) assert matcher.matches() matcher[0][1] } -
Click on the
Convert to GitLab CI/CDbutton and confirm that the workflow started isconvert_to_gl_ci -
Enable the FF
Feature.enable(:convert_to_gl_ci_flow_registry, user) -
Re-run step 3; confirm that this time the workflow is
convert_to_gl_ci/v1
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Relates to https://gitlab.com/gitlab-org/gitlab/-/issues/561264
Edited by Andras Herczeg
