Fixed sed command on macOS

This commit is contained in:
Jakub Al-Khalili 2019-07-08 15:30:51 +02:00
parent 546edb4d9f
commit b1696e5d9e
2 changed files with 135 additions and 1 deletions

View File

@ -2,6 +2,19 @@
SHELL := /bin/sh
PATH := $(GOPATH)/bin:$(PATH)
OSFLAG :=
ifeq ($(OS),Windows_NT)
OSFLAG = WIN32
else
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
OSFLAG = LINUX
endif
ifeq ($(UNAME_S),Darwin)
OSFLAG = OSX
endif
endif
# Import config
# You can change the default config with `make config="config_special.env" build`
config ?= config.env
@ -157,10 +170,20 @@ e2e: build docker-build ## Runs e2e tests, you can use EXTRA_ARGS
cat deploy/role.yaml >> deploy/namespace-init.yaml
cat deploy/role_binding.yaml >> deploy/namespace-init.yaml
cat deploy/operator.yaml >> deploy/namespace-init.yaml
ifeq ($(OSFLAG), LINUX)
sed -i 's|\(image:\).*|\1 $(DOCKER_REGISTRY):$(GITCOMMIT)|g' deploy/namespace-init.yaml
ifeq ($(KUBECTL_CONTEXT),minikube)
sed -i 's|\(imagePullPolicy\): IfNotPresent|\1: Never|g' deploy/namespace-init.yaml
sed -i 's|\(args:\).*|\1\ ["--minikube"\]|' deploy/namespace-init.yaml
endif
endif
ifeq ($(OSFLAG), OSX)
sed -i '' 's|\(image:\).*|\1 $(DOCKER_REGISTRY):$(GITCOMMIT)|g' deploy/namespace-init.yaml
ifeq ($(KUBECTL_CONTEXT),minikube)
sed -i '' 's|\(imagePullPolicy\): IfNotPresent|\1: Never|g' deploy/namespace-init.yaml
sed -i '' 's|\(args:\).*|\1\ ["--minikube"\]|' deploy/namespace-init.yaml
endif
endif
@RUNNING_TESTS=1 go test -parallel=1 "./test/e2e/" -tags "$(BUILDTAGS) cgo" -v -timeout 30m -run "$(E2E_TEST_SELECTOR)" \
@ -413,4 +436,4 @@ indocker: image ## Run make in a docker container
--mount type=bind,source=$(HOME)/.kube,target=/home/builder/.kube \
-e DOCKER_HOST=$(DOCKER_HOST_IP) \
-e MINIKUBE_IP=$(MINIKUBE_IP) \
infrastructure/runner
infrastructure/runner

View File

@ -9,6 +9,22 @@ import (
runtime "k8s.io/apimachinery/pkg/runtime"
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AppliedGroovyScript) DeepCopyInto(out *AppliedGroovyScript) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppliedGroovyScript.
func (in *AppliedGroovyScript) DeepCopy() *AppliedGroovyScript {
if in == nil {
return nil
}
out := new(AppliedGroovyScript)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Backup) DeepCopyInto(out *Backup) {
*out = *in
@ -50,6 +66,39 @@ func (in *Build) DeepCopy() *Build {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ConfigMapRef) DeepCopyInto(out *ConfigMapRef) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigMapRef.
func (in *ConfigMapRef) DeepCopy() *ConfigMapRef {
if in == nil {
return nil
}
out := new(ConfigMapRef)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ConfigurationAsCode) DeepCopyInto(out *ConfigurationAsCode) {
*out = *in
in.Customization.DeepCopyInto(&out.Customization)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigurationAsCode.
func (in *ConfigurationAsCode) DeepCopy() *ConfigurationAsCode {
if in == nil {
return nil
}
out := new(ConfigurationAsCode)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Container) DeepCopyInto(out *Container) {
*out = *in
@ -123,6 +172,45 @@ func (in *Container) DeepCopy() *Container {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Customization) DeepCopyInto(out *Customization) {
*out = *in
out.Secret = in.Secret
if in.Configurations != nil {
in, out := &in.Configurations, &out.Configurations
*out = make([]ConfigMapRef, len(*in))
copy(*out, *in)
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Customization.
func (in *Customization) DeepCopy() *Customization {
if in == nil {
return nil
}
out := new(Customization)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *GroovyScripts) DeepCopyInto(out *GroovyScripts) {
*out = *in
in.Customization.DeepCopyInto(&out.Customization)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroovyScripts.
func (in *GroovyScripts) DeepCopy() *GroovyScripts {
if in == nil {
return nil
}
out := new(GroovyScripts)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Handler) DeepCopyInto(out *Handler) {
*out = *in
@ -277,6 +365,8 @@ func (in *JenkinsSpec) DeepCopyInto(out *JenkinsSpec) {
in.SlaveService.DeepCopyInto(&out.SlaveService)
in.Backup.DeepCopyInto(&out.Backup)
in.Restore.DeepCopyInto(&out.Restore)
in.GroovyScripts.DeepCopyInto(&out.GroovyScripts)
in.ConfigurationAsCode.DeepCopyInto(&out.ConfigurationAsCode)
return
}
@ -317,6 +407,11 @@ func (in *JenkinsStatus) DeepCopyInto(out *JenkinsStatus) {
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.AppliedGroovyScripts != nil {
in, out := &in.AppliedGroovyScripts, &out.AppliedGroovyScripts
*out = make([]AppliedGroovyScript, len(*in))
copy(*out, *in)
}
return
}
@ -363,6 +458,22 @@ func (in *Restore) DeepCopy() *Restore {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *SecretRef) DeepCopyInto(out *SecretRef) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretRef.
func (in *SecretRef) DeepCopy() *SecretRef {
if in == nil {
return nil
}
out := new(SecretRef)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *SeedJob) DeepCopyInto(out *SeedJob) {
*out = *in