Skip to content
Snippets Groups Projects
.gitlab-ci.yml 704 B
Newer Older
  • Learn to ignore specific revisions
  • default:
    
      image: node:12
    
    
    before_script:
      - npm ci
    
    stages:
    
      - source_check
    
      - build
    
      - test
    
    check_format:
      stage: source_check
      script:
    
    Nayeem Rahman's avatar
    Nayeem Rahman committed
        - npx prettier --ignore-path .gitignore --check "**/*.{html,js,json,md}"
    
    lint:
      stage: source_check
      script:
        - npx eslint --ignore-path .gitignore "**/*.js"
    
    backend_build:
      stage: build
      script:
    
    Nayeem Rahman's avatar
    Nayeem Rahman committed
        - npm run build
    
    
    backend_test:
      stage: test
      script:
        - npm test
    
    
    deploy:
      stage: deploy
      script:
        - apt-get update -qq && apt-get install -qq zip
        - zip -r application.zip * .[^.]*
        - curl -X POST -u "$DEPLOYMENT_USERNAME:$DEPLOYMENT_PASSWORD" $DEPLOYMENT_ENDPOINT -T application.zip