-
Notifications
You must be signed in to change notification settings - Fork 2
/
codefresh.yaml
75 lines (71 loc) · 1.85 KB
/
codefresh.yaml
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
version: "1.0"
stages:
- "clone"
- "prepare"
- "build"
- "test"
- "push"
steps:
main_clone:
title: "Cloning repository"
type: "git-clone"
repo: "codefresh-io/cf-argo-plugin"
revision: "${{CF_BRANCH}}"
git: "cf_github"
stage: "clone"
unit_test:
stage: "prepare"
title: 'Running unit tests'
working_directory: ${{main_clone}}
image: golang:1.14.2
commands:
- go test ./... -coverpkg=./... -race -coverprofile=coverage.out -covermode=atomic
fetch_envs:
stage: prepare
title: "Fetch envs"
image: alpine
commands:
- cf_export VERSION=$(cat /codefresh/volume/$CF_REPO_NAME/VERSION)
build:
title: "Building Docker image"
type: "build"
image_name: "codefresh-io/cf-argo-plugin"
working_directory: "${{main_clone}}"
tag: "${{CF_BRANCH_TAG_NORMALIZED}}"
dockerfile: "Dockerfile"
stage: "build"
PushingToRegistries_with_tag:
title: Pushing to Registry
type: push
candidate: ${{build}}
tags:
- ${{CF_BRANCH_TAG_NORMALIZED}}
scale:
PushingToDockerHubRegistry:
title: Pushing To DockerHub Registry
registry: dockerhub
image_name: codefresh/cf-argo-plugin
PushingToQuayRegistry:
title: Pushing To Quay Registry
registry: cfpluginmgr-quay
image_name: codefreshplugins/cf-argo-plugin
PushingToRegistries:
title: Pushing to Registry only master
type: push
candidate: ${{build}}
tags:
- ${{VERSION}}
- latest
when:
branch:
only:
- master
scale:
PushingToDockerHubRegistry2:
title: Pushing To DockerHub Registry
registry: dockerhub
image_name: codefresh/cf-argo-plugin
PushingToQuayRegistry2:
title: Pushing To Quay Registry
registry: cf-quay
image_name: codefresh/cf-argo-plugin