Commit 9eb06bae authored by Andres Anaya Amariels's avatar Andres Anaya Amariels 🚀
Browse files

rules

parent f21a5e39
Loading
Loading
Loading
Loading
+0 −24
Original line number Diff line number Diff line
@@ -31,12 +31,6 @@ dev_secrets_in_repo:
      cd ../
      trufflehog capif --exclude_paths capif/cicd/exclusions --max_depth=5
#  needs: ["dev_pulling_repo"]
  rules:
    - if: $CI_COMMIT_BRANCH == "main"
      when: never
    - if: $CI_COMMIT_BRANCH == "staging"
      when: never
    - if: $CI_COMMIT_BRANCH
  <<: *dev_common

# define the process to do linting code: Sonarque, ruff?
@@ -48,12 +42,6 @@ dev_linting_code:
      pip install ruff
      ruff check --config cicd/ruff.toml . || true
  needs: ["dev_secrets_in_repo"]
  rules:
    - if: $CI_COMMIT_BRANCH == "main"
      when: never
    - if: $CI_COMMIT_BRANCH == "staging"
      when: never
    - if: $CI_COMMIT_BRANCH
  <<: *dev_common

dev_linting_docker:
@@ -120,12 +108,6 @@ dev_linting_docker:
#        - docker-lint.json
#  interruptible: true    
  needs: ["dev_linting_code"]
  rules:
    - if: $CI_COMMIT_BRANCH == "main"
      when: never
    - if: $CI_COMMIT_BRANCH == "staging"
      when: never
    - if: $CI_COMMIT_BRANCH
  <<: *dev_common

dev_build_and_push:
@@ -206,10 +188,4 @@ dev_build_and_push:
   - docker push $CI_REGISTRY/ocf/capif/$CI_COMMIT_REF_SLUG/vault:$CI_COMMIT_REF_SLUG
   - echo "----------------------------------------------------"
   - docker logout $CI_REGISTRY
  rules:
    - if: $CI_COMMIT_BRANCH == "main"
      when: never
    - if: $CI_COMMIT_BRANCH == "staging"
      when: never
    - if: $CI_COMMIT_BRANCH
  <<: *dev_common
+0 −20
Original line number Diff line number Diff line
@@ -36,10 +36,6 @@ staging_secrets_in_repo:
      cd ../
      trufflehog capif --exclude_paths capif/cicd/exclusions --max_depth=5
#  needs: ["staging_pulling_repo"]
  rules:
    - if: $CI_COMMIT_BRANCH == "main"
      when: never
    - if: $CI_COMMIT_BRANCH == "staging"
  <<: *staging_common

# define the process to do linting code: Sonarque, ruff?
@@ -51,10 +47,6 @@ staging_linting_code:
      pip install ruff
      ruff check --config cicd/ruff.toml . || true
  needs: ["staging_secrets_in_repo"]
  rules:
    - if: $CI_COMMIT_BRANCH == "main"
      when: never
    - if: $CI_COMMIT_BRANCH == "staging"
  <<: *staging_common

staging_linting_docker:
@@ -121,10 +113,6 @@ staging_linting_docker:
#        - docker-lint.json
#  interruptible: true    
  needs: ["staging_linting_code"]
  rules:
    - if: $CI_COMMIT_BRANCH == "main"
      when: never
    - if: $CI_COMMIT_BRANCH == "staging"
  <<: *staging_common


@@ -141,10 +129,6 @@ staging_cvs:
   - docker build -t $CI_REGISTRY/ocf/capif/$CI_COMMIT_REF_SLUG/capif-client:$CI_COMMIT_REF_SLUG .
   - grype $CI_REGISTRY/ocf/capif/$CI_COMMIT_REF_SLUG/capif-client:$CI_COMMIT_REF_SLUG --scope all-layers
   - echo "----------------------------------------------------"
  rules:
    - if: $CI_COMMIT_BRANCH == "main"
      when: never
    - if: $CI_COMMIT_BRANCH == "staging"
  <<: *staging_common    

staging_build_and_push:
@@ -225,8 +209,4 @@ staging_build_and_push:
   - docker push $CI_REGISTRY/ocf/capif/$CI_COMMIT_REF_SLUG/vault:$CI_COMMIT_REF_SLUG
   - echo "----------------------------------------------------"
   - docker logout $CI_REGISTRY
  rules:
    - if: $CI_COMMIT_BRANCH == "main"
      when: never
    - if: $CI_COMMIT_BRANCH == "staging"
  <<: *staging_common