Move packages to proejct/pkg to follow go project folder structure convention (#1190)
This commit is contained in:
+13
-20
@@ -3,7 +3,7 @@
|
||||
set -e
|
||||
#set -x
|
||||
|
||||
DIR=$(realpath $(dirname $0))/../
|
||||
DIR=`realpath $(dirname $0)/../`
|
||||
BUILDDIR=$(realpath $DIR)/build
|
||||
|
||||
# Build CLI binaries for mac/linux/windows
|
||||
@@ -26,7 +26,7 @@ build_cli() {
|
||||
local gitcommit=$5
|
||||
arch="amd64" # parameterize if/when we need to
|
||||
|
||||
pushd $DIR/fission
|
||||
pushd $DIR/cmd/fission-cli
|
||||
|
||||
if [ "$osName" == "windows" ]
|
||||
then
|
||||
@@ -35,7 +35,8 @@ build_cli() {
|
||||
binary=fission-cli-${osName}
|
||||
fi
|
||||
|
||||
GOOS=$os GOARCH=$arch go build -gcflags=-trimpath=$GOPATH -asmflags=-trimpath=$GOPATH -ldflags "-X github.com/fission/fission.GitCommit=$gitcommit -X github.com/fission/fission.BuildDate=$date -X github.com/fission/fission.Version=$version" -o $binary .
|
||||
GOOS=$os GOARCH=$arch go build -gcflags=-trimpath=$GOPATH -asmflags=-trimpath=$GOPATH \
|
||||
-ldflags "-X github.com/fission/fission/pkg/info.GitCommit=$gitcommit -X github.com/fission/fission/pkg/info.BuildDate=$date -X github.com/fission/fission/pkg/info.Version=$version" -o $binary .
|
||||
|
||||
outdir=$BUILDDIR/cli/$osName/
|
||||
mkdir -p $outdir
|
||||
@@ -52,8 +53,9 @@ build_fission_bundle_image() {
|
||||
|
||||
local tag=fission/fission-bundle:$version
|
||||
|
||||
docker build -t $tag -f $ROOT/fission-bundle/Dockerfile.fission-bundle --build-arg GITCOMMIT=$gitcommit --build-arg BUILDDATE=$date --build-arg BUILDVERSION=$version .
|
||||
docker tag $tag fission/fission-bundle:latest
|
||||
docker build -t $tag -f $DIR/cmd/fission-bundle/Dockerfile.fission-bundle --build-arg GITCOMMIT=$gitcommit \
|
||||
--build-arg BUILDDATE=$date --build-arg BUILDVERSION=$version $DIR
|
||||
docker tag $tag fission/fission-bundle:latest
|
||||
}
|
||||
|
||||
build_fetcher_image() {
|
||||
@@ -62,12 +64,9 @@ build_fetcher_image() {
|
||||
local gitcommit=$3
|
||||
local tag=fission/fetcher:$version
|
||||
|
||||
pushd $DIR/environments/fetcher/cmd
|
||||
|
||||
docker build -t $tag -f $ROOT/environments/fetcher/cmd/Dockerfile.fission-fetcher --build-arg GITCOMMIT=$gitcommit --build-arg BUILDDATE=$date --build-arg BUILDVERSION=$version .
|
||||
docker build -t $tag -f $DIR/cmd/fetcher/Dockerfile.fission-fetcher --build-arg GITCOMMIT=$gitcommit \
|
||||
--build-arg BUILDDATE=$date --build-arg BUILDVERSION=$version $DIR
|
||||
docker tag $tag fission/fetcher:latest
|
||||
|
||||
popd
|
||||
}
|
||||
|
||||
push_fetcher_image() {
|
||||
@@ -81,12 +80,9 @@ build_builder_image() {
|
||||
local gitcommit=$3
|
||||
local tag=fission/builder:$version
|
||||
|
||||
pushd $DIR/builder/cmd
|
||||
|
||||
docker build -t $tag -f $ROOT/builder/cmd/Dockerfile.fission-builder --build-arg GITCOMMIT=$gitcommit --build-arg BUILDDATE=$date --build-arg BUILDVERSION=$version .
|
||||
docker build -t $tag -f $DIR/cmd/builder/Dockerfile.fission-builder --build-arg GITCOMMIT=$gitcommit \
|
||||
--build-arg BUILDDATE=$date --build-arg BUILDVERSION=$version $DIR
|
||||
docker tag $tag fission/builder:latest
|
||||
|
||||
popd
|
||||
}
|
||||
|
||||
build_env_image() {
|
||||
@@ -126,12 +122,9 @@ build_pre_upgrade_checks_image() {
|
||||
|
||||
local tag=fission/pre-upgrade-checks:$version
|
||||
|
||||
pushd $DIR/preupgradechecks
|
||||
|
||||
docker build -t $tag -f $ROOT/preupgradechecks/Dockerfile.fission-preupgradechecks --build-arg GITCOMMIT=$gitcommit --build-arg BUILDDATE=$date --build-arg BUILDVERSION=$version .
|
||||
docker build -t $tag -f $DIR/cmd/preupgradechecks/Dockerfile.fission-preupgradechecks \
|
||||
--build-arg GITCOMMIT=$gitcommit --build-arg BUILDDATE=$date --build-arg BUILDVERSION=$version $DIR
|
||||
docker tag $tag fission/pre-upgrade-checks:latest
|
||||
|
||||
popd
|
||||
}
|
||||
|
||||
build_all_envs() {
|
||||
|
||||
@@ -325,6 +325,7 @@ fi
|
||||
release_environment_check $version $chartsrepo
|
||||
|
||||
go mod vendor
|
||||
|
||||
# Build release-builder image
|
||||
docker build -t fission-release-builder -f $GOPATH/src/github.com/fission/fission/hack/Dockerfile .
|
||||
|
||||
|
||||
Reference in New Issue
Block a user