cds package creation (alpha test)
Signed-off-by: pipelinebuilder_pel7x64builder0 <pipelinebuilder@powerel.org>master
parent
74b40145a1
commit
67a8b5522c
|
@ -7,6 +7,7 @@ License: GPLv2
|
|||
URL: https://github.com/ovh/cds
|
||||
BuildRequires: git
|
||||
BuildRequires: golang
|
||||
BuildRequires: npm
|
||||
#Requires:
|
||||
|
||||
|
||||
|
@ -24,12 +25,40 @@ git clone https://github.com/ovh/cds/
|
|||
%build
|
||||
export GOPATH=`pwd`
|
||||
export GEN_PATH="$GOPATH/src/github.com/ovh/cds/docs/content/docs/components"
|
||||
export DATE=$(date "+%m/%d/%y-%H:%M:%S")
|
||||
%ifarch x86_64
|
||||
export ARCH=amd64
|
||||
%endif
|
||||
cd src/github.com/ovh/cds/
|
||||
make -C cli/cdsctl
|
||||
make
|
||||
pushd cli/cdsctl
|
||||
go build -gcflags=all="-N -l" -ldflags "-X github.com/ovh/cds/sdk.VERSION=%{version} -X github.com/ovh/cds/sdk.GOOS=linux -X github.com/ovh/cds/sdk.GOARCH=$ARCH -X github.com/ovh/cds/sdk.GITHASH=%{version} -X github.com/ovh/cds/sdk.BUILDTIME=$DATE -X github.com/ovh/cds/sdk.BINARY=cdscli -extldflags -s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')" -o dist/cdscli .
|
||||
popd
|
||||
pushd engine
|
||||
### need to figure out words and wildcard
|
||||
### export DBMIGRATE=$(words $(wildcard sql/*.sql))
|
||||
### github.com/ovh/cds/sdk.DBMIGRATE=$DBMIGRATE
|
||||
go build -ldflags "-X github.com/ovh/cds/sdk.VERSION=%{version} -X github.com/ovh/cds/sdk.GOOS=linux -X github.com/ovh/cds/sdk.GOARCH=$ARCH -X github.com/ovh/cds/sdk.GITHASH=%{version} -X github.com/ovh/cds/sdk.BUILDTIME=$DATE -X github.com/ovh/cds/sdk.BINARY=cds-engine -extldflags -s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')" -o dist/cds-engine .
|
||||
popd
|
||||
pushd engine/worker
|
||||
go build -ldflags "-X github.com/ovh/cds/sdk.VERSION=%{version} -X github.com/ovh/cds/sdk.GOOS=linux -X github.com/ovh/cds/sdk.GOARCH=$ARCH -X github.com/ovh/cds/sdk.GITHASH=%{version} -X github.com/ovh/cds/sdk.BUILDTIME=$DATE -X github.com/ovh/cds/sdk.BINARY=cds-worker -extldflags -s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')" -o dist/cds-worker .
|
||||
popd
|
||||
pushd tools/os-ansible-inventory
|
||||
go build -ldflags "-X github.com/ovh/cds/sdk.VERSION=%{version} -X github.com/ovh/cds/sdk.GOOS=linux -X github.com/ovh/cds/sdk.GOARCH=$ARCH -X github.com/ovh/cds/sdk.GITHASH=%{version} -X github.com/ovh/cds/sdk.BUILDTIME=$DATE -X github.com/ovh/cds/sdk.BINARY=os-ansible-inventory -extldflags -s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')" -o dist/os-ansible-inventory .
|
||||
popd
|
||||
pushd ui
|
||||
npm install
|
||||
npm build
|
||||
popd
|
||||
|
||||
|
||||
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}%{_bindir}
|
||||
cp src/github.com/ovh/cds/cli/cdsctl/dist/cdscli %{buildroot}%{_bindir}
|
||||
cp src/github.com/ovh/cds/engine/dist/cds-engine %{buildroot}%{_bindir}
|
||||
cp src/github.com/ovh/cds/engine/worker/dist/cds-worker %{buildroot}%{_bindir}
|
||||
cp src/github.com/ovh/cds/tools/os-ansible-inventory/dist/os-ansible-inventory %{buildroot}%{_bindir}
|
||||
|
||||
|
||||
%files
|
||||
|
|
Loading…
Reference in New Issue