Procedure: GitLab / Configure applications and environment for hosted GitLab

Objective

  • To provide guidance on needed changes for out of date git repositories referring to the legacy on premise instance of GitLab (git.itapps.miamioh.edu)
    • Updating references to the gitlab-ci-includes project to allow the pipeline to work
    • updating git remotes for local repositories

User

  • Git users
    • Solution Delivery
    • Enterprise Operations

Environment

  • 1068805: GitLab (SaaS)
  • 66438: GitLab - Miami IT (on premise)

Procedure

Update projects to use the new location of the gitlab-ci-includes project

This project is referenced by any project using the GitLab pipeline and houses all php templates (among others). After migration, update your project's .gitlab-ci.yml file to use the new location (please note the new format using relative paths):

Replace all instances of https://git.itapps.miamioh.edu/operations/gitlab-ci-includes/... using this format:

project: "MiamiOH/uit/operations/gitlab-ci-includes"
    ref: "2.0"
    file: "<path to yaml file>"

So, for example, the PHP job templates reference would be changed from

- 'https://git.itapps.miamioh.edu/operations/gitlab-ci-includes/raw/2.0/php/php-job-templates.yaml'

to

project: "MiamiOH/uit/operations/gitlab-ci-includes"
    ref: "2.0"
    file: "/php/php-job-templates.yaml"

 

Laravel Pipeline

In most cases, this will be the new block of code which replaces the existing references for Laravel projects (but always check your work beforehand). This process is documented in the README file for the GitLab CI Includes project.

include:
  - project: 'MiamiOH/uit/operations/gitlab-ci-includes'
    ref: '2.0'
    # Include the templates for php jobs
    file: 
    - '/php/php-job-templates.yaml'
    # Set up the standard Laravel pipeline
    - '/php/laravel-pipeline.yaml'
    # Include unit testing, analysis and feature testing jobs
    - '/php/php-unit.yaml'
    - '/php/php-analysis.yaml'
    - '/php/php-feature.yaml'
    # Run the php code quality assessment (coverage and CRAP score)
    - '/php/php-quality.yaml'
    # Included parameters used in following job definitions
    - '/build/k8svars.yaml'
    # Include jobs to build and publish the container
    - '/build/create-image.yaml'
    - '/deploy/container.yaml'
    # Include needed to instruct helm to update the container with the new version of your application
    - '/apply/helm.yaml'
    # Include the template for linting Docker files
    - '/docker/docker-lint.yaml'

 

MU Banner Pipeline

In most cases, this will be the new block of code which replaces the existing references for Banner projects (but always check your work beforehand). This process is documented in the README file for the GitLab CI Includes project.

include:
  - project: 'MiamiOH/uit/operations/gitlab-ci-includes'
    ref: '2.0'
    file:
    # Include the standard pipeline for mu-banner-deploy
    - '/mu-banner/mu-banner-pipeline.yaml'
    # Include the create-tar template file
    - '/prepare/create-tar.yaml'
    # If a shell file is in the project then this should also be included
    - '/shell/shell-analysis.yaml'

 

Update existing local repositories with the new SaaS GitLab remote URL

This change will be required if you do not do a fresh clone of a project after it is migrated to GitLab.com. There are walkthroughs at the links below:

 

Note

  • Questions on these changes and migration to GitLab.com can be directed to Don Kidd, Matt Morgan, or Bryan Powell

 

Print Article

Details

Article ID: 139446
Created
Mon 11/15/21 1:52 PM
Modified
Wed 5/8/24 8:47 AM
Can you resolve this issue yourself?
Yes! This is self-service with a smile.
Supported Office or Community
Myaamia Center