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