Skip to content
Extraits de code Groupes Projets
Cette configuration de GitLab CI n'est pas valide°: Project `marketing-confort/template-ci` not found or access denied! Make sure any includes in the pipeline configuration are correctly defined. En savoir plus
.gitlab-ci.yml 1.90 Kio
include:
  - project: 'marketing-confort/template-ci'
    ref: main
    file: 'npm.yml'
  - project: 'marketing-confort/template-ci'
    ref: main
    file: 'build-publish-docker-aws-codeartifact.yml'
  - project: 'marketing-confort/template-ci'
    ref: main
    file: 'staging-version-management.yml'
  - project: 'marketing-confort/template-ci'
    ref: main
    file: 'validate-front-changes.yml'
  - project: 'marketing-confort/template-ci'
    ref: main
    file: 'default-variables.yml'

stages:
  - validate-changes
  - test
  - build
  - staging-version-management



variables:
  APP_NAME: 'marketingconfort/stunar-front'
  MANIFEST_PROJECT_PATH: 'stunar/stunar-k8s-manifests'
  MANIFEST_BRANCH: 'main'
  VERSION_FILE: 'version.txt'
  MANIFEST_FOLDER: 'apps/front'


validate-changes:
  extends: .validate_changes_template
  only:
    refs:
      - merge_requests
    variables:
      - $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop"

build_test:
  stage: test
  image: node:18
  before_script:
    - apt-get update -y && apt-get install -y libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev curl unzip
    - which aws || { 
        echo "AWS CLI not found. Installing..."; 
        curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"; 
        unzip awscliv2.zip; 
        ./aws/install; 
      }
    - aws --version
    - aws configure set aws_access_key_id "$AWS_ACCESS_KEY_ID"
    - aws configure set aws_secret_access_key "$AWS_SECRET_ACCESS_KEY"
    - aws configure set default.region "$AWS_REGION"
  script:
    - chmod +x ./aws-chat.sh
    - ./aws-chat.sh
    - npm install
    - npm run build
  only:
    - merge_requests


build-and-publish:
  extends: .build_template
  only:
    - develop
  before_script: