Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • C cmssw-docker
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 13
    • Issues 13
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Issue
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • cms-cloud
  • cmssw-docker
  • Merge requests
  • !17

CI add comments and test buidling

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Adelina Eleonora Lintuluoto requested to merge ci into master Jul 16, 2020
  • Overview 2
  • Commits 22
  • Pipelines 7
  • Changes 2

Added comments to gitlab-ci.yml and check.sh as well as added a test template.

How it works:

The job check_changes_pipeline is triggered at push or merge request. It has two jobs

  1. to trigger the build of "production images" if on master (--form ref=$CI_DEFAULT_BRANCH )
  2. to trigger "testing images" if on non-master branch (--form ref=$CI_COMMIT_BRANCH)

The job test_all_pipeline is triggered only on non-master branches and expects a variable $TEST in addition to $IMAGE_NAME. (The variable $TEST is probably unnecessary since it only runs on non-master branches and check.sh only triggers the build of "testing images" only on non-master branches.) The test images are pushed to https://gitlab.cern.ch/cms-cloud/cmssw-docker/test.

The jobs build_cms_cvmfs_pipeline and build_standalone_pipeline are only triggered on master.

One issue:

It seems like the first line of check.sh (git diff-tree --no-commit-id --name-only -r $CI_COMMIT_SHA) is empty if the commit came from a merge request. This means that in a scenario like

  1. Changes are pushed to a branch
  2. check.sh triggers the build of "testing images"
  3. If everything looks good we merge the branch into master
  4. check.sh is triggered however it doesn't find any changed files
  5. No "production images" are built

I haven't found a way around this yet.

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: ci