|
| 1 | +version: 1.0 |
| 2 | +mode: parallel |
| 3 | +stages: |
| 4 | + - install |
| 5 | + - lint |
| 6 | + - build |
| 7 | + - test |
| 8 | + - status |
| 9 | +steps: |
| 10 | + clone: |
| 11 | + description: Cloning repository... |
| 12 | + type: git-clone |
| 13 | + stage: install |
| 14 | + repo: vallerance/react-orcus |
| 15 | + revision: ${{CF_BRANCH}} |
| 16 | + build-status-image: |
| 17 | + title: Building status util |
| 18 | + type: build |
| 19 | + stage: status |
| 20 | + image_name: react-orcus-status |
| 21 | + working_directory: ${{clone}}/codefresh |
| 22 | + dockerfile: status.Dockerfile |
| 23 | + build_arguments: |
| 24 | + - GITHUB_TOKEN=${{GITHUB_TOKEN}} |
| 25 | + - CF_BUILD_URL=${{CF_BUILD_URL}} |
| 26 | + - CF_REVISION=${{CF_REVISION}} |
| 27 | + disable_push: true |
| 28 | + when: |
| 29 | + steps: |
| 30 | + - name: clone |
| 31 | + install-pending: |
| 32 | + stage: status |
| 33 | + image: ${{build-status-image}} |
| 34 | + working_directory: IMAGE_WORK_DIR |
| 35 | + cmd: |
| 36 | + - install |
| 37 | + - pending |
| 38 | + when: |
| 39 | + steps: |
| 40 | + - name: build-status-image |
| 41 | + lint-pending: |
| 42 | + stage: status |
| 43 | + image: ${{build-status-image}} |
| 44 | + working_directory: IMAGE_WORK_DIR |
| 45 | + cmd: |
| 46 | + - lint |
| 47 | + - pending |
| 48 | + when: |
| 49 | + steps: |
| 50 | + - name: build-status-image |
| 51 | + build-pending: |
| 52 | + stage: status |
| 53 | + image: ${{build-status-image}} |
| 54 | + working_directory: IMAGE_WORK_DIR |
| 55 | + cmd: |
| 56 | + - build |
| 57 | + - pending |
| 58 | + when: |
| 59 | + steps: |
| 60 | + - name: build-status-image |
| 61 | + test-pending: |
| 62 | + stage: status |
| 63 | + image: ${{build-status-image}} |
| 64 | + working_directory: IMAGE_WORK_DIR |
| 65 | + cmd: |
| 66 | + - test |
| 67 | + - pending |
| 68 | + when: |
| 69 | + steps: |
| 70 | + - name: build-status-image |
| 71 | + install: |
| 72 | + title: Build react-orcus docker image |
| 73 | + type: build |
| 74 | + stage: install |
| 75 | + image_name: react-orcus |
| 76 | + tag: ${{CF_BRANCH_TAG_NORMALIZED}} |
| 77 | + working_directory: ${{clone}} |
| 78 | + registry: github-container-registry-vallerance |
| 79 | + when: |
| 80 | + steps: |
| 81 | + - name: clone |
| 82 | + install-status: |
| 83 | + stage: status |
| 84 | + image: ${{build-status-image}} |
| 85 | + working_directory: IMAGE_WORK_DIR |
| 86 | + commands: |
| 87 | + - node status.js install ${{steps.install.result}} |
| 88 | + when: |
| 89 | + steps: |
| 90 | + - name: build-status-image |
| 91 | + - name: install |
| 92 | + on: |
| 93 | + - finished |
| 94 | + build-lint: |
| 95 | + title: Building lint image |
| 96 | + type: build |
| 97 | + stage: lint |
| 98 | + image_name: react-orcus-lint |
| 99 | + tag: ${{CF_BRANCH_TAG_NORMALIZED}} |
| 100 | + working_directory: ${{clone}} |
| 101 | + dockerfile: codefresh/lint.Dockerfile |
| 102 | + build_arguments: |
| 103 | + - VERSION=${{CF_BRANCH_TAG_NORMALIZED}} |
| 104 | + registry: github-container-registry-vallerance |
| 105 | + when: |
| 106 | + steps: |
| 107 | + - name: install |
| 108 | + lint: |
| 109 | + title: Linting source |
| 110 | + stage: lint |
| 111 | + image: ${{build-lint}} |
| 112 | + working_directory: IMAGE_WORK_DIR |
| 113 | + when: |
| 114 | + steps: |
| 115 | + - name: build-lint |
| 116 | + lint-status: |
| 117 | + stage: status |
| 118 | + image: ${{build-status-image}} |
| 119 | + working_directory: IMAGE_WORK_DIR |
| 120 | + commands: |
| 121 | + - node status.js lint ${{steps.lint.result}} |
| 122 | + when: |
| 123 | + steps: |
| 124 | + - name: build-status-image |
| 125 | + - name: lint |
| 126 | + on: |
| 127 | + - finished |
| 128 | + build: |
| 129 | + title: Building library |
| 130 | + type: build |
| 131 | + stage: build |
| 132 | + image_name: react-orcus-build |
| 133 | + tag: ${{CF_BRANCH_TAG_NORMALIZED}} |
| 134 | + working_directory: ${{clone}} |
| 135 | + dockerfile: codefresh/build.Dockerfile |
| 136 | + build_arguments: |
| 137 | + - VERSION=${{CF_BRANCH_TAG_NORMALIZED}} |
| 138 | + registry: github-container-registry-vallerance |
| 139 | + when: |
| 140 | + steps: |
| 141 | + - name: lint |
| 142 | + build-status: |
| 143 | + stage: status |
| 144 | + image: ${{build-status-image}} |
| 145 | + working_directory: IMAGE_WORK_DIR |
| 146 | + commands: |
| 147 | + - node status.js build ${{steps.build.result}} |
| 148 | + when: |
| 149 | + steps: |
| 150 | + - name: build-status-image |
| 151 | + - name: build |
| 152 | + on: |
| 153 | + - finished |
| 154 | + build-test: |
| 155 | + title: Building test image |
| 156 | + type: build |
| 157 | + stage: test |
| 158 | + image_name: react-orcus-test |
| 159 | + tag: ${{CF_BRANCH_TAG_NORMALIZED}} |
| 160 | + working_directory: ${{clone}} |
| 161 | + dockerfile: codefresh/test.Dockerfile |
| 162 | + build_arguments: |
| 163 | + - VERSION=${{CF_BRANCH_TAG_NORMALIZED}} |
| 164 | + registry: github-container-registry-vallerance |
| 165 | + when: |
| 166 | + steps: |
| 167 | + - name: build |
| 168 | + test: |
| 169 | + title: Running tests |
| 170 | + stage: test |
| 171 | + image: ${{build-test}} |
| 172 | + working_directory: IMAGE_WORK_DIR |
| 173 | + when: |
| 174 | + steps: |
| 175 | + - name: build-test |
| 176 | + test-status: |
| 177 | + stage: status |
| 178 | + image: ${{build-status-image}} |
| 179 | + working_directory: IMAGE_WORK_DIR |
| 180 | + commands: |
| 181 | + - node status.js test ${{steps.test.result}} |
| 182 | + when: |
| 183 | + steps: |
| 184 | + - name: build-status-image |
| 185 | + - name: test |
| 186 | + on: |
| 187 | + - finished |
0 commit comments