Skip to content

Commit

Permalink
[cicd] Update Codefresh pipelines to explicit configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuru authored Aug 1, 2019
1 parent 832424c commit be00e24
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
22 changes: 22 additions & 0 deletions codefresh.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,39 @@
# Build a service with environment variables
version: '1.0'

stages:
- Prepare
- Build
- Publish

steps:
init_variables:
title: Init variables
stage: Prepare
image: alpine
commands:
- cf_export BUILD_HARNESS_VERSION=0.6.4
- cf_export GIT_BRANCH=${{CF_BRANCH}}

main_clone:
title: "Clone respository"
stage: Prepare
type: git-clone
repo: '${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}'
git: github
revision: '${{CF_REVISION}}'

build_image:
title: Build image
stage: Build
type: build
description: Build packages
image_name: packages
dockerfile: Dockerfile

semver:
title: Export semantic version
stage: Build
image: cloudposse/build-harness:${{BUILD_HARNESS_VERSION}}
working_directory: ${{build_image}}
commands:
Expand All @@ -26,13 +42,15 @@ steps:

push_image_commit:
title: Push image with commit based semver tags
stage: Publish
type: push
candidate: ${{build_image}}
tags:
- "${{SEMVERSION_COMMIT_SHORT}}"

push_image_branch:
title: Push image with branch based semver tags
stage: Publish
type: push
candidate: ${{build_image}}
tags:
Expand All @@ -44,6 +62,7 @@ steps:

push_image_tag_to_cfcr:
title: Push image with tag based semver tags
stage: Publish
type: push
registry: cfcr
candidate: ${{build_image}}
Expand All @@ -55,6 +74,7 @@ steps:

push_image_tag_to_dockerhub:
title: Push image with tag based semver tags
stage: Publish
type: push
registry: dockerhub
image_name: cloudposse/packages
Expand All @@ -67,6 +87,7 @@ steps:

push_image_latest_to_cfcf:
title: Push image with latest tag
stage: Publish
type: push
registry: cfcr
candidate: ${{build_image}}
Expand All @@ -78,6 +99,7 @@ steps:

push_image_latest_to_dockerhub:
title: Push image with latest tag
stage: Publish
type: push
registry: dockerhub
image_name: cloudposse/packages
Expand Down
2 changes: 1 addition & 1 deletion codefresh/apk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ steps:
stage: Prepare
description: "Initialize"
repo: ${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}
git: CF-default
git: github
revision: ${{CF_REVISION}}

stage:
Expand Down

0 comments on commit be00e24

Please sign in to comment.