Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migrate to gomodules #100

Merged
merged 2 commits into from
May 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .codefresh/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,22 @@ stages:
- build
- release
steps:

UnitTest:
title: Run unit tests
stage: test
image: golang:1.11-alpine
working_directory: /go/src/github.com/${{CF_REPO_OWNER}}
commands:
- apk add git make bash file
- ln -s /codefresh/volume/${{CF_REPO_NAME}} ${{CF_REPO_NAME}} && cd ${{CF_REPO_NAME}}
- cf_export GOCACHE="${{CF_VOLUME_PATH}}/gocache"
- cf_export GOPATH="${{CF_VOLUME_PATH}}/gopath"
- make test
BuildDockerImage:
title: Build Docker image
stage: build
type: build
image_name: ${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}
tag: ${{CF_BRANCH_TAG_NORMALIZED}}
PushDockerImage:
title: Push Docker image (latest)
stage: release
Expand Down
2 changes: 0 additions & 2 deletions .codefresh/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ steps:
title: Run unit tests
stage: test
image: golang:1.11-alpine
working_directory: /go/src/github.com/${{CF_REPO_OWNER}}
commands:
- apk add git make bash file
- ln -s /codefresh/volume/${{CF_REPO_NAME}} ${{CF_REPO_NAME}} && cd ${{CF_REPO_NAME}}
- make test
5 changes: 1 addition & 4 deletions .codefresh/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ steps:
title: Run unit tests
stage: test
image: golang:1.11-alpine
working_directory: &workdir /go/src/github.com/${{CF_REPO_OWNER}}
commands:
- apk add git make bash file
- &link ln -s /codefresh/volume/${{CF_REPO_NAME}} ${{CF_REPO_NAME}} && cd ${{CF_REPO_NAME}}
- make test
BuildDockerImage:
title: Build Docker image
Expand All @@ -23,9 +21,8 @@ steps:
title: Upload release artifacts
stage: release
image: goreleaser/goreleaser:v0.95.0
working_directory: *workdir
commands:
- *link
- go mod download
- git checkout tags/${{CF_BRANCH_TAG_NORMALIZED}}
- goreleaser --rm-dist
PushDockerImageTagged:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM golang:1.11-alpine as builder
RUN apk add git make
ENV ORASPKG /go/src/github.com/deislabs/oras
ENV ORASPKG /oras
ADD . ${ORASPKG}
WORKDIR ${ORASPKG}
RUN make build-linux
Expand Down
Loading