conductor

CI task system
git clone git://git.finwo.net/app/conductor
Log | Files | Refs | README | LICENSE

node-app.conductor.yml (1110B)


      1 # A typical node service: install, check, build, publish an image.
      2 #
      3 # The publish job asks for the docker feature, so it only runs on a worker
      4 # configured to provide a docker socket or a docker in docker service.
      5 
      6 version: 1
      7 
      8 defaults:
      9   image: node:22-bookworm-slim
     10   timeout: 20m
     11 
     12 tasks:
     13   install:
     14     script:
     15       - npm ci
     16     artifacts:
     17       paths: [node_modules/**]
     18       expire: 1h
     19 
     20   lint:
     21     needs: [install]
     22     script:
     23       - npm run lint
     24 
     25   test:
     26     needs: [install]
     27     matrix:
     28       suite: [unit, integration]
     29     services:
     30       - image: postgres:16
     31         env:
     32           POSTGRES_PASSWORD: test
     33     env:
     34       DATABASE_URL: postgres://postgres:test@postgres:5432/postgres
     35     script:
     36       - npm run test:$MATRIX_SUITE
     37     artifacts:
     38       paths: [coverage/**]
     39       when: always
     40 
     41   image:
     42     needs: [lint, test]
     43     image: docker:27-cli
     44     requires: [docker]
     45     services:
     46       - image: docker:27-dind
     47         alias: docker
     48     env:
     49       DOCKER_HOST: tcp://docker:2375
     50     script:
     51       - docker build -t example/app:$CONDUCTOR_SHA .
     52       - docker push example/app:$CONDUCTOR_SHA