Skip to content

Commit

Permalink
add goreleaser step to codefresh pipeline (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleg Sucharevich authored Dec 17, 2018
1 parent d55dd7e commit 4731adc
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 1 deletion.
27 changes: 27 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
builds:
- env:
- CGO_ENABLED=0
goos:
- darwin
- linux
- windows
archive:
replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
format_overrides:
- goos: windows
format: zip
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.6
0.0.7
79 changes: 79 additions & 0 deletions codefresh.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
version: '1.0'
steps:

Prepare:
title: Update Helm package version
image: alpine:3.8
commands:
- apk add --no-cache curl jq python py-pip
- pip install yq
- sh ${{CF_VOLUME_PATH}}/iris/hack/.codefresh/push-helm.sh

BuildingDockerImage:
title: Building Docker Image
type: build
image_name: olsynt/iris
working_directory: ./
tag: '${{CF_BRANCH_TAG_NORMALIZED}}'
dockerfile: Dockerfile
build_arguments:
- CODECOV_TOKEN=${{CODECOV_TOKEN}}
- VCS_COMMIT_ID=${{CF_REVISION}}
- VCS_BRANCH_NAME=${{CF_BRANCH}}
- VCS_SLUG=${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}
- CI_BUILD_ID=${{CF_BUILD_ID}}
- CI_BUILD_URL=${{CF_BUILD_URL}}

PushingToDockerRegistryVersion:
title: Pushing to Docker Registry
type: push
candidate: '${{BuildingDockerImage}}'
tags:
- ${{CF_BRANCH_TAG_NORMALIZED}}
- ${{IRIS_VERSION}}
registry: dockerhub

PushingToDockerRegistryLatest:
title: Pushing to Docker Registry
type: push
candidate: '${{BuildingDockerImage}}'
tag: latest
registry: dockerhub
when:
branch:
only:
- master

Push:
title: Push Helm package to repo
image: codefresh/cfstep-helm:2.9.0
environment:
- ACTION=push
- CHART_REF=iris

GitTag:
title: Push tag to git
image: codefresh/cli
commands:
- git remote rm origin
- git remote add origin https://olegsu:${{GITHUB_TOKEN}}@github.com/olegsu/iris.git
- git tag v${{IRIS_VERSION}}
- git push --tags
fail_fast: false
when:
branch:
only:
- master

Release:
image: goreleaser/goreleaser
working_directory: /go/src/github.com/olegsus/iris
binds:
- ./iris:/go/src/github.com/olegsus/iris
fail_fast: false
commands:
- goreleaser release -f .goreleaser.yml --rm-dist
when:
branch:
only:
- master

0 comments on commit 4731adc

Please sign in to comment.