forked from codefresh-io/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
codefresh.yml
59 lines (51 loc) · 1.55 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
49
50
51
52
53
54
55
56
57
58
59
# 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:
main_clone:
title: 'Cloning main repository...'
type: git-clone
repo: codefresh-io/cli
revision: ${{CF_BRANCH}}
git: cf_github
install_dependencies:
title: 'Installing testing dependencies'
image: codefresh/node-tester-image:10.15.3
commands:
- yarn install --frozen-lockfile
eslint:
title: 'Running linting logic'
image: codefresh/node-tester-image:10.15.3
commands:
- yarn eslint
unit-tests:
title: 'Running unit tests'
image: codefresh/node-tester-image:10.15.3
commands:
- yarn test
build_step:
type: build
dockerfile: Dockerfile
image-name: codefresh/cli
tag: ${{CF_BRANCH_TAG_NORMALIZED}}
push_step:
type: push
tag: '${{CF_SHORT_REVISION}}'
candidate: ${{build_step}}
scale:
push_to_dockerhub:
registry: dockerhub
title: "push to dockerhub"
push_to_gcr:
title: "push to gcr"
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 ]