-
Notifications
You must be signed in to change notification settings - Fork 0
/
codefresh.yml
51 lines (45 loc) · 1.26 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
# More examples of Codefresh YAML can be found at
# https://codefresh.io/docs/docs/yaml-examples/examples/
version: "1.0"
mode: sequential
# Stages can help you organize your steps in stages
stages:
- "clone"
- "build"
- "test"
- "push"
steps:
clone:
title: Cloning main repository...
type: git-clone
repo: '${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}'
revision: '${{CF_REVISION}}'
stage: 'clone'
Freestyle:
title: Running docker image
type: freestyle
working_directory: '${{clone}}'
arguments:
image: 'alpine'
commands:
- echo "${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}"
- ls -ltr
- echo $(pwd)
build:
title: "Building Docker image"
type: "build"
working_directory: '${{clone}}'
arguments:
image_name: 'safficodefresh/${{CF_REPO_NAME}}'
tag: ${{CF_BRANCH_TAG_NORMALIZED}}
# Set 'latest' tag on the image. Or, use built-in variables
# like ${{CF_BRANCH_TAG_NORMALIZED}} to use the current branch name/tag.
dockerfile: "Dockerfile"
stage: "build"
push_to_my_registry:
stage: 'push'
type: push
title: Pushing to a registry ${{CF_BRANCH_TAG_NORMALIZED}}
candidate: ${{build}}
registry: dockerhub
image_name: ${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}