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

Updating vendor files #1233

Open
wants to merge 4 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
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,25 +30,25 @@ prebuild:
mkdir -p $(BUILD_DIR)

api: prebuild
CGO_ENABLED=0 GOOS=linux go build -ldflags '-w -s -extldflags "-static"' -o $(BUILD_DIR)/api github.com/opensds/multi-cloud/api/cmd
CGO_ENABLED=0 GOOS=linux go build -ldflags 'GOFLAGS=-mod=vendor -w -s -extldflags "-static"' -o $(BUILD_DIR)/api github.com/opensds/multi-cloud/api/cmd

backend: prebuild
CGO_ENABLED=0 GOOS=linux go build -ldflags '-w -s -extldflags "-static"' -o $(BUILD_DIR)/backend github.com/opensds/multi-cloud/backend/cmd
CGO_ENABLED=0 GOOS=linux go build -ldflags 'GOFLAGS=-mod=vendor -w -s -extldflags "-static"' -o $(BUILD_DIR)/backend github.com/opensds/multi-cloud/backend/cmd

s3: prebuild
CGO_ENABLED=1 GOOS=linux go build -ldflags '-w -s -extldflags "-dynamic"' -o $(BUILD_DIR)/s3 github.com/opensds/multi-cloud/s3/cmd
CGO_ENABLED=1 GOOS=linux go build -ldflags 'GOFLAGS=-mod=vendor -w -s -extldflags "-dynamic"' -o $(BUILD_DIR)/s3 github.com/opensds/multi-cloud/s3/cmd

dataflow: prebuild
CGO_ENABLED=0 GOOS=linux go build -ldflags '-w -s -extldflags "-static"' -o $(BUILD_DIR)/dataflow github.com/opensds/multi-cloud/dataflow/cmd
CGO_ENABLED=0 GOOS=linux go build -ldflags 'GOFLAGS=-mod=vendor -w -s -extldflags "-static"' -o $(BUILD_DIR)/dataflow github.com/opensds/multi-cloud/dataflow/cmd

datamover: prebuild
CGO_ENABLED=0 GOOS=linux go build -ldflags '-w -s -extldflags "-static"' -o $(BUILD_DIR)/datamover github.com/opensds/multi-cloud/datamover/cmd
CGO_ENABLED=0 GOOS=linux go build -ldflags 'GOFLAGS=-mod=vendor -w -s -extldflags "-static"' -o $(BUILD_DIR)/datamover github.com/opensds/multi-cloud/datamover/cmd

file: prebuild
CGO_ENABLED=0 GOOS=linux go build -ldflags '-w -s -extldflags "-static"' -o $(BUILD_DIR)/file github.com/opensds/multi-cloud/file/cmd
CGO_ENABLED=0 GOOS=linux go build -ldflags 'GOFLAGS=-mod=vendor -w -s -extldflags "-static"' -o $(BUILD_DIR)/file github.com/opensds/multi-cloud/file/cmd

block: prebuild
CGO_ENABLED=0 GOOS=linux go build -ldflags '-w -s -extldflags "-static"' -o $(BUILD_DIR)/block github.com/opensds/multi-cloud/block/cmd
CGO_ENABLED=0 GOOS=linux go build -ldflags 'GOFLAGS=-mod=vendor -w -s -extldflags "-static"' -o $(BUILD_DIR)/block github.com/opensds/multi-cloud/block/cmd

docker: build

Expand Down
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ require (
github.com/huaweicloud/huaweicloud-sdk-go-v3 v0.0.16-beta
github.com/journeymidnight/radoshttpd v0.0.0-20190617133011-609666b51136
github.com/journeymidnight/yig v2.0.0+incompatible
github.com/mholt/certmagic v0.9.3 // indirect
github.com/micro/go-log v0.1.0
github.com/micro/go-micro/v2 v2.9.1
github.com/micro/go-plugins/registry/kubernetes/v2 v2.9.1
Expand All @@ -40,6 +39,7 @@ require (
github.com/spf13/afero v1.2.2 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/viper v1.6.3
github.com/stretchr/objx v0.2.0 // indirect
github.com/stretchr/testify v1.5.1
github.com/ugorji/go/codec v1.1.7
github.com/webrtcn/s3client v0.0.0-20200722082950-4e45a005eff3
Expand All @@ -51,6 +51,5 @@ require (
google.golang.org/protobuf v1.22.0
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f
gopkg.in/natefinch/lumberjack.v2 v2.0.0
gopkg.in/src-d/go-git.v4 v4.13.1 // indirect
k8s.io/apimachinery v0.18.5
)
93 changes: 55 additions & 38 deletions go.sum

Large diffs are not rendered by default.

75 changes: 75 additions & 0 deletions release_multicloud
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
#!/usr/bin/env python3

# Copyright 2021 The SODA Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import sys, os, argparse

image_name = "sodafoundation/multi-cloud-"
service_list = ["api", "block", "file", "s3", "datamover", "dataflow", "backend"]
valid_input = ["y", "Y", "Yes", "YES"]
helper = ["-h" "--help"]

#Make changes in the Makefile
def make_makefile_changes(tag):
with open("Makefile", "rt") as inp:
data = inp.read()
data = data.replace('latest', tag)
inp.close()
with open("Makefile", "wt") as inp:
inp.write(data)
inp.close()

#revert changes in the Makefile
def revert_makefile_changes(tag):
with open("Makefile", "rt") as inp:
data = inp.read()
data = data.replace(tag, 'latest')
inp.close()
with open("Makefile", "wt") as inp:
inp.write(data)
inp.close()

# make docker
def make_docker_image():
os.system('make docker')

# push the image to dockerhub
def push_image(tag):
for name in service_list:
image = image_name + name + ':' + tag
print("Pushing image %s" % image)
cmd = "docker push %s" % image
os.system(cmd)

# Create release binary
def make_release_binary():
os.system("make dist")


#Change the release version as per the input
if __name__ == "__main__":
value = input("Enter the release version: ")
os.environ["VERSION"] = value
os.system('echo $VERSION')
test_run = input("Do you want to run test coverage before build and release? ")
if test_run in valid_input:
cmd = "./install/CI/coverage"
os.system(cmd)

make_makefile_changes(value)
make_docker_image()
push_image(value)
make_release_binary()
revert_makefile_changes(value)
2 changes: 1 addition & 1 deletion vendor/github.com/go-git/go-git/v5/COMPATIBILITY.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions vendor/github.com/go-git/go-git/v5/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading