Skip to content
Snippets Groups Projects
Select Git revision
  • 4e71ddbdb022438ed9c5d7b54c0ffa93056c6d89
  • master default protected
  • bump-Pillow
  • bump-humanize
  • bootstrap-cloud
  • bump-shapely
  • bump-pytest-mock
  • bump-zstandard
  • bump-pytest
  • bump-python-gnupg
  • bump-peewee
  • bump-mkdocstrings-python
  • bump-mkdocs-material
  • antora-build
  • bump-black
  • cache-use-arkindex-export
  • gl-pages protected
  • fix-ci
  • update-fixture-classifications
  • update-template-readme
  • bump-pymdown-extensions
  • 0.5.1b4
  • 0.5.1b3
  • 0.5.1b2
  • 0.5.1b1
  • 0.5.0
  • 0.5.0rc1
  • 0.5.0b3
  • 0.5.0b2
  • 0.5.0b1
  • 0.5.0a3
  • 0.5.0a2
  • 0.5.0a1
  • 0.4.0
  • 0.4.0rc6
  • 0.4.0rc5
  • 0.4.0rc4
  • 0.4.0rc3
  • 0.4.0rc2
  • 0.4.0rc1
  • 0.4.0b3
41 results

image.py

Blame
  • .gitlab-ci.yml 2.15 KiB
    image: node:16-alpine
    stages:
      - test
      - build
      - deploy
      - release
    
    # Prevent detached merge request pipelines
    # https://docs.gitlab.com/ee/ci/merge_request_pipelines/
    # Those do not run the environment on_stop jobs when MRs are closed/merged
    # or when branches get deleted, unlike branch pipelines.
    workflow:
      rules:
        - if: '$CI_MERGE_REQUEST_ID'
          when: never
        - when: always
    
    before_script:
      - npm ci
    
    lint:
      stage: test
      script:
        - npm run lint
    
    audit:
      stage: test
      script:
        - npm audit --parseable
      allow_failure: true
    
    build-webext:
      stage: build
    
      # Ignore frontend-audit to speed up CI builds
      needs:
        - lint
      artifacts:
        paths:
          - dist-ext
        expire_in: 2 weeks
      script:
        - npm run build-ext
    
    build-lib:
      stage: build
    
      # Ignore frontend-audit to speed up CI builds
      needs:
        - lint
      artifacts:
        paths:
          - dist-lib
        expire_in: 2 weeks
      script:
        - npm run build-lib
    
      # Only deploy branches on surge
      rules:
        - if: '$CI_COMMIT_BRANCH && $CI_COMMIT_BRANCH != "master"'
          when: on_success
        - when: never
    
    .surge:
      stage: deploy
    
      environment:
        name: ${CI_COMMIT_REF_SLUG}
    
      before_script:
        - npm install -g surge
    
    deploy-surge:
      extends: .surge
    
      dependencies:
        - build-lib
    
      # Only deploy branches on surge
      rules:
        - if: '$CI_COMMIT_BRANCH && $CI_COMMIT_BRANCH != "master"'
          when: on_success
        - when: never
    
      environment:
        url: https://${CI_COMMIT_REF_SLUG}-keyboardteklia.surge.sh
        on_stop: stop-surge
    
      script:
        - surge dist-lib ${CI_ENVIRONMENT_URL}
    
    stop-surge:
      extends: .surge
    
      # Only deploy branches on surge
      rules:
        - if: '$CI_COMMIT_BRANCH && $CI_COMMIT_BRANCH != "master"'
          when: manual
          allow_failure: true
        - when: never
    
      # Do not try to checkout the branch if it was deleted
      variables:
        GIT_STRATEGY: none
    
      environment:
        action: stop
    
      script:
        - surge teardown ${CI_ENVIRONMENT_URL}
    
    release-npm:
      stage: release
    
      dependencies:
        - build-lib
    
      # Publish only on tags
      only:
        - tags
    
      before_script:
        - echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' > .npmrc
    
      script:
        - npm publish --access public