Skip to content

Commit

Permalink
Fix/default codefresh host (#33)
Browse files Browse the repository at this point in the history
* fix a bug, set the Codefresh host URL when its not exist
  • Loading branch information
Oleg Sucharevich authored Mar 17, 2019
1 parent 50b0a3c commit 025a902
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ yarn-error.log
.idea/*
telepresence.log
venonactl/dist/*
venonactl-linux
venonalog.json
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "venona",
"version": "0.20.0",
"version": "0.20.1",
"description": "Codefresh agent to run on Codefresh's runtime environment and execute pipeline",
"main": "index.js",
"scripts": {
Expand Down
5 changes: 4 additions & 1 deletion venonactl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@
build: build-local

build-local:
sh ./hack/build.sh
@sh ./hack/build.sh

build-linux:
@sh ./hack/build-linux.sh
3 changes: 3 additions & 0 deletions venonactl/cmd/cmdutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ func extendStoreWithCodefershClient(logger logger.Logger) error {
logger.Debug("Using codefresh context", "Context-Name", context.Name, "Host", cfAPIHost)
} else {
logger.Debug("Reading creentials from environment variables")
if cfAPIHost == "" {
cfAPIHost = "https://g.codefresh.io"
}
}

client := codefresh.New(&codefresh.ClientOptions{
Expand Down
7 changes: 7 additions & 0 deletions venonactl/hack/build-linux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
set -e
OUTFILE=$PWD/venonactl-linux
go generate ${PWD}/hack/generate.go
GOOS=linux GOARCH=386 go build -ldflags '-X github.com/codefresh-io/venona/venonactl/cmd.localDevFlow=true' -o $OUTFILE main.go

chmod +x $OUTFILE

0 comments on commit 025a902

Please sign in to comment.