Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
7b1e41ab
Commit
7b1e41ab
authored
May 21, 2018
by
Leonard Gram
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build: crosscompilation for nightlies and releases.
parent
7ca346e9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
186 additions
and
61 deletions
+186
-61
.circleci/config.yml
+98
-14
scripts/build/build-all.sh
+87
-0
scripts/build/build.sh
+0
-46
scripts/build/download-phantomjs.sh
+1
-1
No files found.
.circleci/config.yml
View file @
7b1e41ab
...
@@ -77,6 +77,36 @@ jobs:
...
@@ -77,6 +77,36 @@ jobs:
-
run
:
-
run
:
name
:
prepare build tools
name
:
prepare build tools
command
:
'
/tmp/bootstrap.sh'
command
:
'
/tmp/bootstrap.sh'
-
run
:
name
:
build and package grafana
command
:
'
./scripts/build/build.sh'
-
run
:
name
:
sign packages
command
:
'
./scripts/build/sign_packages.sh'
-
run
:
name
:
sha-sum packages
command
:
'
go
run
build.go
sha-dist'
-
run
:
name
:
Build Grafana.com publisher
command
:
'
go
build
-o
scripts/publish
scripts/build/publish.go'
-
persist_to_workspace
:
root
:
.
paths
:
-
dist/grafana*
-
scripts/*.sh
-
scripts/publish
-
store_artifacts
:
path
:
dist
build-all
:
docker
:
-
image
:
grafana/build-container:crosscompile
working_directory
:
/go/src/github.com/grafana/grafana
steps
:
-
checkout
-
run
:
name
:
prepare build tools
command
:
'
/tmp/bootstrap.sh'
-
restore_cache
:
-
restore_cache
:
key
:
phantomjs-binaries-{{ checksum "scripts/build/download-phantomjs.sh" }}
key
:
phantomjs-binaries-{{ checksum "scripts/build/download-phantomjs.sh" }}
-
run
:
-
run
:
...
@@ -88,7 +118,7 @@ jobs:
...
@@ -88,7 +118,7 @@ jobs:
-
/tmp/phantomjs
-
/tmp/phantomjs
-
run
:
-
run
:
name
:
build and package grafana
name
:
build and package grafana
command
:
'
./scripts/build/build.sh'
command
:
'
./scripts/build/build
-all
.sh'
-
run
:
-
run
:
name
:
sign packages
name
:
sign packages
command
:
'
./scripts/build/sign_packages.sh'
command
:
'
./scripts/build/sign_packages.sh'
...
@@ -168,45 +198,99 @@ workflows:
...
@@ -168,45 +198,99 @@ workflows:
version
:
2
version
:
2
test-and-build
:
test-and-build
:
jobs
:
jobs
:
-
codespell
:
-
build
:
filters
:
filters
:
tags
:
tags
:
only
:
/.*
/
ignore
:
/^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$
/
-
gometalinter
:
-
codespell
:
filters
:
filters
:
tags
:
tags
:
only
:
/.*
/
ignore
:
/^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$
/
-
build
:
-
gometalinter
:
filters
:
filters
:
tags
:
tags
:
only
:
/.*
/
ignore
:
/^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$
/
-
test-frontend
:
-
test-frontend
:
filters
:
filters
:
tags
:
tags
:
only
:
/.*
/
ignore
:
/^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$
/
-
test-backend
:
-
test-backend
:
filters
:
filters
:
tags
:
tags
:
only
:
/.*
/
ignore
:
/^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$
/
-
deploy-master
:
-
deploy-master
:
requires
:
requires
:
-
test-backend
-
test-backend
-
test-frontend
-
test-frontend
-
build
-
build
-
codespell
-
gometalinter
filters
:
filters
:
branches
:
branches
:
only
:
master
only
:
master
release
:
jobs
:
-
build-all
:
filters
:
branches
:
ignore
:
/.*/
tags
:
only
:
/^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/
-
codespell
:
filters
:
branches
:
ignore
:
/.*/
tags
:
only
:
/^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/
-
gometalinter
:
filters
:
branches
:
ignore
:
/.*/
tags
:
only
:
/^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/
-
test-frontend
:
filters
:
branches
:
ignore
:
/.*/
tags
:
only
:
/^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/
-
test-backend
:
filters
:
branches
:
ignore
:
/.*/
tags
:
only
:
/^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/
-
deploy-release
:
-
deploy-release
:
requires
:
requires
:
-
build-all
-
test-backend
-
test-backend
-
test-frontend
-
test-frontend
-
build
-
codespell
-
gometalinter
filters
:
filters
:
branches
:
branches
:
ignore
:
/.*/
ignore
:
/.*/
tags
:
tags
:
only
:
/^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/
only
:
/^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/
# - build-enterprise:
nightly-master
:
# filters:
triggers
:
# tags:
-
schedule
:
# only: /.*/
cron
:
"
0
0
*
*
*"
filters
:
branches
:
only
:
-
master
-
crosscompile
jobs
:
-
build-all
-
codespell
-
gometalinter
-
test-frontend
-
test-backend
-
deploy-master
:
requires
:
-
build-all
-
codespell
-
gometalinter
-
test-frontend
-
test-backend
scripts/build/build-all.sh
0 → 100755
View file @
7b1e41ab
#!/bin/bash
#
# This script is executed from within the container.
#
CCARMV7
=
arm-linux-gnueabihf-gcc
CCARM64
=
aarch64-linux-gnu-gcc
CCOSX64
=
/tmp/osxcross/target/bin/o64-clang
CCWIN64
=
x86_64-w64-mingw32-gcc
CCX64
=
/tmp/x86_64-centos6-linux-gnu/bin/x86_64-centos6-linux-gnu-gcc
GOPATH
=
/go
REPO_PATH
=
$GOPATH
/src/github.com/grafana/grafana
cd
/go/src/github.com/grafana/grafana
echo
"current dir:
$(
pwd
)
"
if
[
"
$CIRCLE_TAG
"
!=
""
]
;
then
echo
"Building releases from tag
$CIRCLE_TAG
"
go run build.go
-goarch
armv7
-cc
${
CCARMV7
}
-includeBuildNumber
=
false
build
go run build.go
-goarch
arm64
-cc
${
CCARM64
}
-includeBuildNumber
=
false
build
go run build.go
-goos
darwin
-cc
${
CCOSX64
}
-includeBuildNumber
=
false
build
go run build.go
-goos
windows
-cc
${
CCWIN64
}
-includeBuildNumber
=
false
build
CC
=
${
CCX64
}
go run build.go
-includeBuildNumber
=
false
build
else
echo
"Building incremental build for
$CIRCLE_BRANCH
"
go run build.go
-goarch
armv7
-cc
${
CCARMV7
}
-buildNumber
=
${
CIRCLE_BUILD_NUM
}
build
go run build.go
-goarch
arm64
-cc
${
CCARM64
}
-buildNumber
=
${
CIRCLE_BUILD_NUM
}
build
go run build.go
-goos
darwin
-cc
${
CCOSX64
}
-buildNumber
=
${
CIRCLE_BUILD_NUM
}
build
go run build.go
-goos
windows
-cc
${
CCWIN64
}
-buildNumber
=
${
CIRCLE_BUILD_NUM
}
build
CC
=
${
CCX64
}
go run build.go
-buildNumber
=
${
CIRCLE_BUILD_NUM
}
build
fi
yarn install
--pure-lockfile
--no-progress
echo
"current dir:
$(
pwd
)
"
if
[
-d
"dist"
]
;
then
rm
-rf
dist
fi
if
[
"
$CIRCLE_TAG
"
!=
""
]
;
then
echo
"Building frontend from tag
$CIRCLE_TAG
"
go run build.go
-includeBuildNumber
=
false
build-frontend
echo
"Packaging a release from tag
$CIRCLE_TAG
"
go run build.go
-goos
linux
-pkg-arch
amd64
-includeBuildNumber
=
false
package-only latest
go run build.go
-goos
linux
-pkg-arch
armv7
-includeBuildNumber
=
false
package-only
go run build.go
-goos
linux
-pkg-arch
arm64
-includeBuildNumber
=
false
package-only
if
[
-d
'/tmp/phantomjs/darwin'
]
;
then
cp /tmp/phantomjs/darwin/phantomjs tools/phantomjs/phantomjs
else
echo
'PhantomJS binaries for darwin missing!'
fi
go run build.go
-goos
darwin
-pkg-arch
amd64
-includeBuildNumber
=
false
package-only
if
[
-d
'/tmp/phantomjs/windows'
]
;
then
cp /tmp/phantomjs/windows/phantomjs.exe tools/phantomjs/phantomjs.exe
rm tools/phantomjs/phantomjs
else
echo
'PhantomJS binaries for darwin missing!'
fi
go run build.go
-goos
windows
-pkg-arch
amd64
-includeBuildNumber
=
false
package-only
else
echo
"Building frontend for
$CIRCLE_BRANCH
"
go run build.go
-buildNumber
=
${
CIRCLE_BUILD_NUM
}
build-frontend
echo
"Packaging incremental build for
$CIRCLE_BRANCH
"
go run build.go
-goos
linux
-pkg-arch
amd64
-buildNumber
=
${
CIRCLE_BUILD_NUM
}
package-only latest
go run build.go
-goos
linux
-pkg-arch
armv7
-buildNumber
=
${
CIRCLE_BUILD_NUM
}
package-only
go run build.go
-goos
linux
-pkg-arch
arm64
-buildNumber
=
${
CIRCLE_BUILD_NUM
}
package-only
if
[
-d
'/tmp/phantomjs/darwin'
]
;
then
cp /tmp/phantomjs/darwin/phantomjs tools/phantomjs/phantomjs
else
echo
'PhantomJS binaries for darwin missing!'
fi
go run build.go
-goos
darwin
-pkg-arch
amd64
-buildNumber
=
${
CIRCLE_BUILD_NUM
}
package-only
if
[
-d
'/tmp/phantomjs/windows'
]
;
then
cp /tmp/phantomjs/windows/phantomjs.exe tools/phantomjs/phantomjs.exe
rm tools/phantomjs/phantomjs
else
echo
'PhantomJS binaries for windows missing!'
fi
go run build.go
-goos
windows
-pkg-arch
amd64
-buildNumber
=
${
CIRCLE_BUILD_NUM
}
package-only
fi
scripts/build/build.sh
View file @
7b1e41ab
...
@@ -4,10 +4,6 @@
...
@@ -4,10 +4,6 @@
# This script is executed from within the container.
# This script is executed from within the container.
#
#
CCARMV7
=
arm-linux-gnueabihf-gcc
CCARM64
=
aarch64-linux-gnu-gcc
CCOSX64
=
/tmp/osxcross/target/bin/o64-clang
CCWIN64
=
x86_64-w64-mingw32-gcc
CCX64
=
/tmp/x86_64-centos6-linux-gnu/bin/x86_64-centos6-linux-gnu-gcc
CCX64
=
/tmp/x86_64-centos6-linux-gnu/bin/x86_64-centos6-linux-gnu-gcc
GOPATH
=
/go
GOPATH
=
/go
...
@@ -18,17 +14,9 @@ echo "current dir: $(pwd)"
...
@@ -18,17 +14,9 @@ echo "current dir: $(pwd)"
if
[
"
$CIRCLE_TAG
"
!=
""
]
;
then
if
[
"
$CIRCLE_TAG
"
!=
""
]
;
then
echo
"Building releases from tag
$CIRCLE_TAG
"
echo
"Building releases from tag
$CIRCLE_TAG
"
go run build.go
-goarch
armv7
-cc
${
CCARMV7
}
-includeBuildNumber
=
false
build
go run build.go
-goarch
arm64
-cc
${
CCARM64
}
-includeBuildNumber
=
false
build
go run build.go
-goos
darwin
-cc
${
CCOSX64
}
-includeBuildNumber
=
false
build
go run build.go
-goos
windows
-cc
${
CCWIN64
}
-includeBuildNumber
=
false
build
CC
=
${
CCX64
}
go run build.go
-includeBuildNumber
=
false
build
CC
=
${
CCX64
}
go run build.go
-includeBuildNumber
=
false
build
else
else
echo
"Building incremental build for
$CIRCLE_BRANCH
"
echo
"Building incremental build for
$CIRCLE_BRANCH
"
go run build.go
-goarch
armv7
-cc
${
CCARMV7
}
-buildNumber
=
${
CIRCLE_BUILD_NUM
}
build
go run build.go
-goarch
arm64
-cc
${
CCARM64
}
-buildNumber
=
${
CIRCLE_BUILD_NUM
}
build
go run build.go
-goos
darwin
-cc
${
CCOSX64
}
-buildNumber
=
${
CIRCLE_BUILD_NUM
}
build
go run build.go
-goos
windows
-cc
${
CCWIN64
}
-buildNumber
=
${
CIRCLE_BUILD_NUM
}
build
CC
=
${
CCX64
}
go run build.go
-buildNumber
=
${
CIRCLE_BUILD_NUM
}
build
CC
=
${
CCX64
}
go run build.go
-buildNumber
=
${
CIRCLE_BUILD_NUM
}
build
fi
fi
...
@@ -45,43 +33,9 @@ if [ "$CIRCLE_TAG" != "" ]; then
...
@@ -45,43 +33,9 @@ if [ "$CIRCLE_TAG" != "" ]; then
go run build.go
-includeBuildNumber
=
false
build-frontend
go run build.go
-includeBuildNumber
=
false
build-frontend
echo
"Packaging a release from tag
$CIRCLE_TAG
"
echo
"Packaging a release from tag
$CIRCLE_TAG
"
go run build.go
-goos
linux
-pkg-arch
amd64
-includeBuildNumber
=
false
package-only latest
go run build.go
-goos
linux
-pkg-arch
amd64
-includeBuildNumber
=
false
package-only latest
go run build.go
-goos
linux
-pkg-arch
armv7
-includeBuildNumber
=
false
package-only
go run build.go
-goos
linux
-pkg-arch
arm64
-includeBuildNumber
=
false
package-only
if
[
-d
'/tmp/phantomjs/darwin'
]
;
then
cp /tmp/phantomjs/darwin/phantomjs tools/phantomjs/phantomjs
else
echo
'PhantomJS binaries for darwin missing!'
fi
go run build.go
-goos
darwin
-pkg-arch
amd64
-includeBuildNumber
=
false
package-only
if
[
-d
'/tmp/phantomjs/windows'
]
;
then
cp /tmp/phantomjs/windows/phantomjs.exe tools/phantomjs/phantomjs.exe
rm tools/phantomjs/phantomjs
else
echo
'PhantomJS binaries for darwin missing!'
fi
go run build.go
-goos
windows
-pkg-arch
amd64
-includeBuildNumber
=
false
package-only
else
else
echo
"Building frontend for
$CIRCLE_BRANCH
"
echo
"Building frontend for
$CIRCLE_BRANCH
"
go run build.go
-buildNumber
=
${
CIRCLE_BUILD_NUM
}
build-frontend
go run build.go
-buildNumber
=
${
CIRCLE_BUILD_NUM
}
build-frontend
echo
"Packaging incremental build for
$CIRCLE_BRANCH
"
echo
"Packaging incremental build for
$CIRCLE_BRANCH
"
go run build.go
-goos
linux
-pkg-arch
amd64
-buildNumber
=
${
CIRCLE_BUILD_NUM
}
package-only latest
go run build.go
-goos
linux
-pkg-arch
amd64
-buildNumber
=
${
CIRCLE_BUILD_NUM
}
package-only latest
go run build.go
-goos
linux
-pkg-arch
armv7
-buildNumber
=
${
CIRCLE_BUILD_NUM
}
package-only
go run build.go
-goos
linux
-pkg-arch
arm64
-buildNumber
=
${
CIRCLE_BUILD_NUM
}
package-only
if
[
-d
'/tmp/phantomjs/darwin'
]
;
then
cp /tmp/phantomjs/darwin/phantomjs tools/phantomjs/phantomjs
else
echo
'PhantomJS binaries for darwin missing!'
fi
go run build.go
-goos
darwin
-pkg-arch
amd64
-buildNumber
=
${
CIRCLE_BUILD_NUM
}
package-only
if
[
-d
'/tmp/phantomjs/windows'
]
;
then
cp /tmp/phantomjs/windows/phantomjs.exe tools/phantomjs/phantomjs.exe
rm tools/phantomjs/phantomjs
else
echo
'PhantomJS binaries for windows missing!'
fi
go run build.go
-goos
windows
-pkg-arch
amd64
-buildNumber
=
${
CIRCLE_BUILD_NUM
}
package-only
fi
fi
scripts/build/download-phantomjs.sh
View file @
7b1e41ab
#!/bin/bash -e
#!/bin/bash -e
if
[
!
-d
'/tmp/phantomjs'
]
;
then
if
[
!
-d
'/tmp/phantomjs'
]
;
then
_version
=
"2.1.1"
_version
=
"2.1.1
6
"
curl
-L
https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-
$_version
-windows
.zip
>
/tmp/phantomjs-win.zip
curl
-L
https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-
$_version
-windows
.zip
>
/tmp/phantomjs-win.zip
curl
-L
https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-
$_version
-macosx
.zip
>
/tmp/phantomjs-mac.zip
curl
-L
https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-
$_version
-macosx
.zip
>
/tmp/phantomjs-mac.zip
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment