conductor

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

.conductor.yml (2697B)


      1 # The pipeline conductor runs on itself.
      2 #
      3 # The suite is split in two because most of it needs nothing but node,
      4 # while the parts that exercise object storage and OIDC start real
      5 # containers and so need a worker offering the docker feature. Setting
      6 # CONDUCTOR_TEST_NO_DOCKER skips those rather than failing them, which
      7 # keeps the fast job honest about what it did and did not check.
      8 
      9 version: 1
     10 
     11 defaults:
     12   image: node:24-alpine
     13   timeout: 15m
     14 
     15 tasks:
     16   # Style rules that are cheap to break and cheap to check: ASCII only,
     17   # no CRLF, no trailing whitespace.
     18   style:
     19     script:
     20       - apk add --no-cache git
     21       - npm install --no-audit --no-fund
     22       - node --test test/ascii.test.js
     23 
     24   # The bundle the image ships. Built here too, so a broken frontend is
     25   # caught by itself rather than as a confusing Dockerfile failure.
     26   build:
     27     script:
     28       - npm install --no-audit --no-fund
     29       - npm run build
     30 
     31   # Everything that runs without a docker socket.
     32   test:
     33     script:
     34       - apk add --no-cache git
     35       - npm install --no-audit --no-fund
     36       - npm test
     37     env:
     38       CONDUCTOR_TEST_NO_DOCKER: '1'
     39 
     40   # The same suite with the container-backed tests switched on, so the S3
     41   # and OIDC paths are exercised against real servers rather than skipped.
     42   integration:
     43     requires: [docker]
     44     script:
     45       - apk add --no-cache git
     46       - npm install --no-audit --no-fund
     47       - npm test
     48 
     49   # Both images have to build before anything claims a release is possible.
     50   # Host architecture only, since this runs on every branch and the point
     51   # is to catch a broken Dockerfile early rather than to ship anything.
     52   images:
     53     needs: [style, build, test]
     54     requires: [docker]
     55     image: docker:28-cli
     56     script:
     57       - docker build -f deploy/Dockerfile -t conductor:$CONDUCTOR_SHA .
     58       - docker build -f deploy/Dockerfile.worker -t conductor-worker:$CONDUCTOR_SHA .
     59 
     60   # The whole stack, built from the images and exercised with a real
     61   # pipeline. Catches what unit tests cannot: that the thing people
     62   # actually deploy starts, registers a worker and runs a job.
     63   smoke:
     64     needs: [images]
     65     requires: [docker]
     66     image: docker:28-cli
     67     script:
     68       - apk add --no-cache git openssl curl
     69       - ./deploy/smoke.sh
     70 
     71   # Pushes to Docker Hub. Restricted to main and release tags for now;
     72   # publish.sh handles any branch, so widening this rule is all it takes to
     73   # publish a branch under its own tag. curl is for the readme sync.
     74   publish:
     75     needs: [smoke, integration]
     76     requires: [docker]
     77     image: docker:28-cli
     78     only:
     79       refs: [refs/heads/main, 'refs/tags/v*']
     80     script:
     81       - apk add --no-cache curl
     82       - ./deploy/publish.sh