Commit 1b453cec authored by Ruben ten Hove's avatar Ruben ten Hove
Browse files

Merge branch 'cinchors' into 'main'

ci: use anchor and increase test coverage

See merge request just-ci/templates!173
parents f6f3fb3b ec5d6cf0
Loading
Loading
Loading
Loading
+27 −25
Original line number Diff line number Diff line
@@ -26,8 +26,10 @@ jobs:c:
    strategy: depend
  rules:
    - if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
      changes:
      changes: &c_changes
        - c/**/*
        - pipelines/c.yml
        - tests/**/c.yml

jobs:kaniko:
  stage: test
@@ -37,8 +39,11 @@ jobs:kaniko:
    strategy: depend
  rules:
    - if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
      changes:
      changes: &kaniko_changes
        - container/**/*
        - tests/**/*kaniko*.yml
        - tests/**/*container*.yml
        - pipelines/container.yml

jobs:buildah:
  stage: test
@@ -48,8 +53,9 @@ jobs:buildah:
    strategy: depend
  rules:
    - if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
      changes:
      changes: &buildah_changes
        - container/**/*
        - tests/**/*buildah*.yml

jobs:docker-arm64:
  stage: test
@@ -59,8 +65,9 @@ jobs:docker-arm64:
    strategy: depend
  rules:
    - if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
      changes:
      changes: &docker_changes
        - container/**/*
        - tests/**/*docker*.yml

jobs:docs:
  stage: test
@@ -70,8 +77,9 @@ jobs:docs:
    strategy: depend
  rules:
    - if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
      changes:
      changes: &docs_changes
        - docs/**/*
        - tests/jobs/docs.yml

jobs:python:
  stage: test
@@ -81,8 +89,10 @@ jobs:python:
    strategy: depend
  rules:
    - if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
      changes:
      changes: &python_changes
        - python/**/*
        - pipelines/python.yml
        - tests/**/*python*.yml

jobs:python:no-exclude:
  stage: test
@@ -95,8 +105,7 @@ jobs:python:no-exclude:
    strategy: depend
  rules:
    - if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
      changes:
        - python/**/*
      changes: *python_changes

jobs:python:old:
  stage: test
@@ -108,8 +117,7 @@ jobs:python:old:
    strategy: depend
  rules:
    - if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
      changes:
        - python/**/*
      changes: *python_changes

jobs:python:custom-image:
  stage: test
@@ -119,10 +127,9 @@ jobs:python:custom-image:
    strategy: depend
  rules:
    - if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
      changes:
        - python/**/*
      changes: *python_changes

jobs:pages:
jobs:web:
  stage: test
  trigger:
    include:
@@ -130,8 +137,9 @@ jobs:pages:
    strategy: depend
  rules:
    - if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
      changes:
      changes: &web_changes
        - web/**/*
        - tests/**/web.yml

# child pipelines to test our off-the-shelf pipelines
pipelines:c:
@@ -142,8 +150,7 @@ pipelines:c:
    strategy: depend
  rules:
    - if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
      changes:
        - c/**/*
      changes: *c_changes

pipelines:python:
  stage: test
@@ -153,8 +160,7 @@ pipelines:python:
    strategy: depend
  rules:
    - if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
      changes:
        - python/**/*
      changes: *python_changes

pipelines:container:polyrepo:
  stage: test
@@ -164,8 +170,7 @@ pipelines:container:polyrepo:
    strategy: depend
  rules:
    - if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
      changes:
        - container/**/*
      changes: *kaniko_changes

pipelines:container:monorepo:
  stage: test
@@ -175,8 +180,7 @@ pipelines:container:monorepo:
    strategy: depend
  rules:
    - if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
      changes:
        - container/**/*
      changes: *kaniko_changes

pipelines:container:python:
  stage: test
@@ -186,6 +190,4 @@ pipelines:container:python:
    strategy: depend
  rules:
    - if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
      changes:
        - container/**/*
        - python/**/*
      changes: *python_changes
+2 −2
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ image:build:
    IMAGE_CONTEXT: ${CI_PROJECT_DIR}/tests/mockup_projects/container/monorepo/image_A # Absolute path
    IMAGE_NAME: ${CI_REGISTRY_IMAGE}/image_a

kaniko:image_B:
image:image_B:
  extends: .image:build
  variables:
    IMAGE_CONTEXT: tests/mockup_projects/container/monorepo/image_B/ # Relative path with a slash
@@ -28,5 +28,5 @@ grype:image_B:
    IMAGE_CONTEXT: ${CI_PROJECT_DIR}/tests/mockup_projects/container/monorepo/image_B # Absolute path
    IMAGE_NAME: ${CI_REGISTRY_IMAGE}/its_here/image_b
  needs:
    - kaniko:image_B
    - image:image_B
  allow_failure: false