|
| 1 | +--- |
| 2 | +version: 2.1 |
| 3 | + |
| 4 | +orbs: |
| 5 | + |
| 6 | + |
| 7 | +executors: |
| 8 | + python_executor: |
| 9 | + docker: |
| 10 | + - image: circleci/python:3.7.4 |
| 11 | + auth: |
| 12 | + username: $DOCKER_USER_RO |
| 13 | + password: $DOCKER_PASSWORD_RO |
| 14 | + node_executor: |
| 15 | + docker: |
| 16 | + - image: circleci/node:12.9.0-stretch |
| 17 | + auth: |
| 18 | + username: $DOCKER_USER_RO |
| 19 | + password: $DOCKER_PASSWORD_RO |
| 20 | + |
| 21 | +commands: |
| 22 | + prepare: |
| 23 | + description: "Prepare" |
| 24 | + steps: |
| 25 | + - checkout |
| 26 | + - run: git submodule sync |
| 27 | + - run: git submodule update --init |
| 28 | + |
| 29 | + notify: |
| 30 | + description: "Notify Slack" |
| 31 | + steps: |
| 32 | + - slack/status: |
| 33 | + fail_only: true |
| 34 | + only_for_branches: 'master' |
| 35 | + |
| 36 | +jobs: |
| 37 | + build: |
| 38 | + executor: python_executor |
| 39 | + steps: |
| 40 | + - prepare |
| 41 | + - restore_cache: |
| 42 | + keys: |
| 43 | + - deps-{{ checksum "./common/build_tools/requirements.txt" }} |
| 44 | + - run: |
| 45 | + name: install dependencies |
| 46 | + command: | |
| 47 | + python3 -m venv venv |
| 48 | + . venv/bin/activate |
| 49 | + pip install -q -r ./common/build_tools/requirements.txt |
| 50 | + - save_cache: |
| 51 | + paths: |
| 52 | + - ./venv |
| 53 | + key: deps-{{ checksum "./common/build_tools/requirements.txt" }} |
| 54 | + - run: |
| 55 | + name: Run MkDocs |
| 56 | + command: | |
| 57 | + . venv/bin/activate |
| 58 | + mkdocs build -s |
| 59 | + - notify |
| 60 | + |
| 61 | + vale: |
| 62 | + executor: python_executor |
| 63 | + steps: |
| 64 | + - prepare |
| 65 | + - run: |
| 66 | + name: Install dependencies |
| 67 | + command: | |
| 68 | + curl -sfL https://install.goreleaser.com/github.com/ValeLint/vale.sh | sh -s v2.4.2 |
| 69 | + - run: |
| 70 | + name: Run Vale |
| 71 | + command: | |
| 72 | + ./bin/vale --config ./common/build_tools/vale/.vale.ini --glob='*.{md}' . | tee ./vale.out |
| 73 | + - notify |
| 74 | + - store_artifacts: |
| 75 | + path: ./vale.out |
| 76 | + destination: ./vale.out |
| 77 | + |
| 78 | + linkchecker: |
| 79 | + executor: node_executor |
| 80 | + steps: |
| 81 | + - prepare |
| 82 | + - restore_cache: |
| 83 | + keys: |
| 84 | + - deps-{{ checksum "./common/build_tools/package-lock.json" }} |
| 85 | + - run: |
| 86 | + name: Install dependencies |
| 87 | + command: | |
| 88 | + npm ci |
| 89 | + - run: |
| 90 | + name: Run markdown link checker |
| 91 | + command: | |
| 92 | + npm run test:links |
| 93 | + - notify |
| 94 | + - save_cache: |
| 95 | + paths: |
| 96 | + - ./node_modules |
| 97 | + key: deps-{{ checksum "./common/build_tools/package-lock.json" }} |
| 98 | + - store_artifacts: |
| 99 | + path: ./linkchecker.out |
| 100 | + destination: ./linkchecker.out |
| 101 | + |
| 102 | + markdownlint: |
| 103 | + executor: node_executor |
| 104 | + steps: |
| 105 | + - prepare |
| 106 | + - restore_cache: |
| 107 | + keys: |
| 108 | + - deps-{{ checksum "./common/build_tools/package-lock.json" }} |
| 109 | + - run: |
| 110 | + name: Install dependencies |
| 111 | + command: | |
| 112 | + npm ci |
| 113 | + - run: |
| 114 | + shell: /bin/bash #this is a non breaking command so it will always return success |
| 115 | + name: Run Markdownlint info checks |
| 116 | + command: | |
| 117 | + npm run test:markdown:info |
| 118 | + - run: |
| 119 | + name: Run Markdownlint |
| 120 | + command: | |
| 121 | + npm run test:markdown |
| 122 | + - notify |
| 123 | + - save_cache: |
| 124 | + paths: |
| 125 | + - ./node_modules |
| 126 | + key: deps-{{ checksum "./common/build_tools/package-lock.json" }} |
| 127 | + - store_artifacts: |
| 128 | + path: ./markdownlint.out |
| 129 | + destination: ./markdownlint.out |
| 130 | + - store_artifacts: |
| 131 | + path: ./markdownlint_info.out |
| 132 | + destination: ./markdownlint_info.out |
| 133 | + |
| 134 | +workflows: |
| 135 | + version: 2 |
| 136 | + default: |
| 137 | + jobs: |
| 138 | + - build: |
| 139 | + context: |
| 140 | + - dockerhub-quorumengineering-ro |
| 141 | + - vale: |
| 142 | + context: |
| 143 | + - dockerhub-quorumengineering-ro |
| 144 | + - markdownlint: |
| 145 | + context: |
| 146 | + - dockerhub-quorumengineering-ro |
| 147 | + - linkchecker: |
| 148 | + context: |
| 149 | + - dockerhub-quorumengineering-ro |
| 150 | + nightly: |
| 151 | + triggers: |
| 152 | + - schedule: # GMT |
| 153 | + cron: "0 0 * * *" |
| 154 | + filters: |
| 155 | + branches: |
| 156 | + only: |
| 157 | + - master |
| 158 | + jobs: |
| 159 | + - linkchecker: |
| 160 | + context: |
| 161 | + - dockerhub-quorumengineering-ro |
0 commit comments