Skip to content

Commit

Permalink
added make tidy step to ci, replaced go download from release
Browse files Browse the repository at this point in the history
Signed-off-by: Noam Gal <[email protected]>
  • Loading branch information
ATGardner committed Oct 17, 2023
1 parent 1d26308 commit e95922d
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 14 deletions.
16 changes: 14 additions & 2 deletions build/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,18 @@ steps:
on:
- success

download_modules:
<<: *deps
stage: Prepare
title: download modules
commands:
- make tidy
when:
steps:
- name: prepare_env_vars
on:
- success

lint:
<<: *deps
stage: Test
Expand All @@ -52,10 +64,10 @@ steps:
- make check-worktree
when:
steps:
- name: prepare_env_vars
- name: clean
on:
- success
- name: clean
- name: download_modules
on:
- success

Expand Down
48 changes: 36 additions & 12 deletions build/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ stages:
- Release

steps:

main_clone:
stage: Prepare
title: clone repository
Expand All @@ -22,10 +21,6 @@ steps:
title: check version
image: quay.io/codefresh/golang-ci-helper:1.21.1
commands:
- cf_export GO111MODULE=on
- cf_export GOCACHE=/codefresh/volume/gocache # change gopath to codefresh shared volume
- cf_export GOPATH=/codefresh/volume/gopath
- cf_export PATH=$PATH:/codefresh/volume/gopath/bin:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin # must have brew in path for final brew step
- (echo "${{CF_BRANCH}}" | grep -Eq '^release-v(\d+\.)?(\d+\.)?(\*|\d+)$') && echo on release branch || (echo not on release branch && exit 1)
- RELEASE_VER=$(echo ${{CF_BRANCH_TAG_NORMALIZED_LOWER_CASE}} | sed -E 's/^release-([^"]+).*/\1/')
- cf_export RELEASE_VER=$RELEASE_VER
Expand All @@ -36,19 +31,45 @@ steps:
on:
- success

download_modules:
prepare_env_vars:
<<: *deps
stage: Prepare
title: download go modules
title: prepare-env
commands:
- make clean
- go mod download -x
- cf_export GO111MODULE=on
- cf_export GOCACHE=/codefresh/volume/gocache # change gopath to codefresh shared volume
- cf_export GOPATH=/codefresh/volume/gopath
- cf_export PATH=$PATH:/codefresh/volume/gopath/bin:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin # must have brew in path for final brew step
when:
steps:
- name: check_version
on:
- success

clean:
<<: *deps
stage: Prepare
title: clean
commands:
- make clean
when:
steps:
- name: check_version
on:
- success

download_modules:
<<: *deps
stage: Prepare
title: download modules
commands:
- make tidy
when:
steps:
- name: prepare_env_vars
on:
- success

lint:
<<: *deps
stage: Test
Expand All @@ -57,9 +78,12 @@ steps:
- make lint
when:
steps:
- name: download_modules
on:
- success
- name: clean
on:
- success
- name: download_modules
on:
- success

codegen:
<<: *deps
Expand Down

0 comments on commit e95922d

Please sign in to comment.