Chris Aka commited on
Commit
087ffe2
·
2 Parent(s): 29fb2f14eee674

Merge branch 'develop' into 'main'

Browse files

Develop

See merge request dedalys/dedalys-backend!4

Files changed (1) hide show
  1. .gitlab-ci.yml +26 -11
.gitlab-ci.yml CHANGED
@@ -1,17 +1,32 @@
1
- # You can override the included template(s) by including variable overrides
2
- # SAST customization: https://docs.gitlab.com/ee/user/application_security/sast/#customizing-the-sast-settings
3
- # Secret Detection customization: https://docs.gitlab.com/user/application_security/secret_detection/pipeline/configure
4
- # Dependency Scanning customization: https://docs.gitlab.com/ee/user/application_security/dependency_scanning/#customizing-the-dependency-scanning-settings
5
- # Container Scanning customization: https://docs.gitlab.com/ee/user/application_security/container_scanning/#customizing-the-container-scanning-settings
6
- # Note that environment variables can be set in several places
7
- # See https://docs.gitlab.com/ee/ci/variables/#cicd-variable-precedence
8
  stages:
9
- - test
10
- - secret-detection
 
 
11
  variables:
12
  SECRET_DETECTION_ENABLED: 'true'
 
 
 
 
 
 
13
  secret_detection:
14
  stage: secret-detection
15
- include:
16
- - template: Security/Secret-Detection.gitlab-ci.yml
17
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  stages:
2
+ - test
3
+ - secret-detection
4
+ - deploy
5
+
6
  variables:
7
  SECRET_DETECTION_ENABLED: 'true'
8
+ SECRET_DETECTION_HISTORIC_SCAN: 'false'
9
+ SECRET_DETECTION_EXCLUDED_PATHS: 'tests/fixtures,docs'
10
+
11
+ include:
12
+ - template: Security/Secret-Detection.gitlab-ci.yml
13
+
14
  secret_detection:
15
  stage: secret-detection
 
 
16
 
17
+ deploy_to_huggingface:
18
+ stage: deploy
19
+ image: alpine/git:latest
20
+ rules:
21
+ - if: '$CI_COMMIT_BRANCH == "main" && $CI_PIPELINE_SOURCE == "push"'
22
+ before_script:
23
+ - git config --global user.email "ci@gitlab"
24
+ - git config --global user.name "GitLab CI"
25
+ - git fetch --unshallow || true
26
+ script:
27
+ - HF_REMOTE="https://user:${HF_TOKEN}@${HF_SPACE_URL#https://}"
28
+ - git remote add huggingface "$HF_REMOTE"
29
+ - git push huggingface HEAD:main --force
30
+ environment:
31
+ name: production
32
+ url: $HF_SPACE_URL