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
Screenshot 2025-12-10 at 19.36.43.png Screenshot 2025-12-10 at 18.21.42.png

How to set up and validate locally

  1. Checkout ah/convert-to-gitlab-ci-flow-registry

  2. 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]
    }
  3. Click on the Convert to GitLab CI/CD button and confirm that the workflow started is convert_to_gl_ci

    Screenshot 2025-12-10 at 18.18.58.png

    Screenshot 2025-12-10 at 19.35.41.png

    Screenshot 2025-12-10 at 19.36.43.png

  4. Enable the FF

    Feature.enable(:convert_to_gl_ci_flow_registry, user)
  5. Re-run step 3; confirm that this time the workflow is convert_to_gl_ci/v1

    Screenshot 2025-12-10 at 18.21.35.png

    Screenshot 2025-12-10 at 18.21.42.png

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

Merge request reports

Loading