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

Introduce the build concept #377

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ REPOS ?= tyk tyk-analytics tyk-pump tyk-identity-broker tyk-sink portal t
GITHUB_TOKEN ?= $(shell pass me/github)
JIRA_USER ?= [email protected]
JIRA_TOKEN ?= $(shell pass Tyk/atlassian)
VARIATION ?= prod-variations
VARIATION ?= prod-variation
PC_TOKEN ?= $(shell pass Tyk/packagecloud)

UNSTABLE_REPOS := tyk-gateway-unstable tyk-dashboard-unstable tyk-pump-unstable tyk-mdcb-unstable portal-unstable tyk-identity-broker-unstable tyk-sync-unstable
STABLE_REPOS := tyk-gateway tyk-dashboard tyk-pump tyk-mdcb portal tyk-identity-broker

gromit: go.mod go.sum *.go $(SRC) $(TEMPLATES) update-variation
go build -v -trimpath -ldflags "-X github.com/TykTechnologies/gromit/util.version=$(VERSION) -X github.com/TykTechnologies/gromit/util.commit=$(COMMIT) -X github.com/TykTechnologies/gromit/util.buildDate=$(BUILD_DATE)"
go mod tidy
Expand Down
5 changes: 4 additions & 1 deletion cmd/policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"bytes"
"fmt"
"os"
"strings"

"github.com/TykTechnologies/gromit/policy"
"github.com/rs/zerolog/log"
Expand Down Expand Up @@ -223,7 +224,8 @@ var matchSubCmd = &cobra.Command{
return err
}

repos := []string{"tyk-ee", "tyk-analytics", "tyk-pump", "tyk-sink"}
rs, _ := cmd.Flags().GetString("repos")
repos := strings.Split(rs, ",")
tagOverride := args[0]
tagMatch := args[1]

Expand Down Expand Up @@ -275,6 +277,7 @@ func init() {
serveSubCmd.Flags().String("save", "testdata/tui", "Test variations are loaded from and saved to this directory")

matchSubCmd.Flags().String("config", "$HOME/.docker/config.json", "Config file to read authentication token from")
matchSubCmd.Flags().String("repos", "tyk-ee,tyk-analytics,tyk-pump,tyk-sink", "Config file to read authentication token from")

policyCmd.AddCommand(matchSubCmd)
policyCmd.AddCommand(syncSubCmd)
Expand Down
Loading
Loading