|
1 | | -# this pipeline should not be run on version tag releases (it may cause a non correct sha to override version tagged image in dockerhub) |
2 | 1 | version: "1.0" |
3 | | - |
4 | 2 | steps: |
5 | | - |
6 | 3 | install_dependencies: |
7 | | - title: 'Installing testing dependencies' |
| 4 | + title: Installing testing dependencies |
8 | 5 | image: codefresh/node-tester-image:8.8.0 |
9 | 6 | commands: |
10 | | - - yarn install --frozen-lockfile |
11 | | - |
| 7 | + - yarn install --frozen-lockfile |
12 | 8 | eslint: |
13 | | - title: 'Running linting logic' |
| 9 | + title: Running linting logic |
14 | 10 | image: codefresh/node-tester-image:8.8.0 |
15 | 11 | commands: |
16 | | - - yarn eslint |
17 | | - |
| 12 | + - yarn eslint |
18 | 13 | unit-tests: |
19 | | - title: 'Running unit tests' |
| 14 | + title: Running unit tests |
20 | 15 | image: codefresh/node-tester-image:8.8.0 |
21 | 16 | commands: |
22 | | - - yarn test |
23 | | - |
| 17 | + - yarn test |
24 | 18 | build_step: |
25 | 19 | type: build |
26 | 20 | dockerfile: Dockerfile |
27 | 21 | image-name: codefresh/cli |
28 | 22 | tag: ${{CF_BRANCH_TAG_NORMALIZED}} |
29 | | - |
30 | 23 | push_to_registry_revision: |
31 | | - title: "Pushing image tagged with revision to registry" |
| 24 | + title: Pushing image tagged with revision to registry |
32 | 25 | type: push |
33 | 26 | candidate: ${{build_step}} |
34 | | - tag: ${{CF_SHORT_REVISION}} |
35 | | - registry: "CFCR" |
36 | | - |
| 27 | + tags: |
| 28 | + - latest |
| 29 | + - 0.1.0 |
| 30 | + registry: CFCR |
37 | 31 | execute_release_pipeline: |
38 | | - title: "Execute release pipeline in case version was changed" |
| 32 | + title: Execute release pipeline in case version was changed |
39 | 33 | fail_fast: false |
40 | 34 | image: codefresh/cli |
41 | 35 | commands: |
42 | | - - 'apk update && apk add jq' |
43 | | - - 'export PACKAGE_VERSION=$(jq -r ".version" package.json)' |
44 | | - - "echo Current version: $PACKAGE_VERSION" |
45 | | - - "git tag $PACKAGE_VERSION && echo Running release pipeline && codefresh run 5a4c94d282ed4d00012b54e8 -b=master --detach" |
| 36 | + - apk update && apk add jq |
| 37 | + - export PACKAGE_VERSION=$(jq -r ".version" package.json) |
| 38 | + - 'echo Current version: $PACKAGE_VERSION' |
| 39 | + - git tag $PACKAGE_VERSION && echo Running release pipeline && codefresh run 5a4c94d282ed4d00012b54e8 |
| 40 | + -b=master --detach |
46 | 41 | when: |
47 | 42 | branch: |
48 | | - only: [ master ] |
| 43 | + only: |
| 44 | + - master |
0 commit comments