Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
D
dorie
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 31
    • Issues 31
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 9
    • Merge Requests 9
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • dorie
  • dorie
  • Issues
  • #203

Closed
Open
Opened Jul 16, 2020 by Lukas Riedel@lriedelOwner

Use more elaborate "rules" in GitLab CI/CD configuration

Description

GitLab has recently introduced rules to the GitLab CI/CD configuration. rules is meant to replace except/only and is much more capable. In particular, we can run certain jobs based on changes to specific source files, which should come in handy with the Docker image jobs.

Proposal

  • Run setup and prep jobs when respective files change:

    setup:dune-env: &setup
      stage: setup
      rules:
        - changes:
            - docker/dune-env.dockerfile
      # ...
    
    prep:update-dune: &update
      <<: *setup
      stage: prep
      allow_failure: true
      rules:
        # Run after pushes to master and tags
        - if: '$CI_COMMIT_BRANCH == "master"'
        - if: $CI_COMMIT_TAG
        # Run after Dockerfile changed. Do not allow failure then.
        - changes:
            - docker/dune-env-update.dockerfile
          allow_failure: false
  • Add empty needs for test:python-tests, as https://gitlab.com/gitlab-org/gitlab/-/issues/30631 is resolved.

How to test the implementation?

  • Pipeline passes regularly.
  • Changes to Dockerfiles trigger jobs.

Related issues

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: dorie/dorie#203