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
49de4ed2
Unverified
Commit
49de4ed2
authored
Mar 09, 2018
by
Leonard Gram
Committed by
GitHub
Mar 09, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build: upgrades build pipeline from CircleCI 1.0 -> 2.0 (#11162)
build: upgrades build pipeline from CircleCI 1.0 -> 2.0
parent
77cd7f34
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
135 additions
and
67 deletions
+135
-67
circle.yml
+134
-54
scripts/build/build.sh
+0
-3
scripts/circle-test-backend.sh
+0
-3
scripts/circle-test-frontend.sh
+0
-6
scripts/webpack/webpack.test.js
+1
-1
No files found.
circle.yml
View file @
49de4ed2
machine
:
version
:
2
node
:
version
:
6.11.4
python
:
version
:
2.7.3
services
:
-
docker
environment
:
GOPATH
:
"
/home/ubuntu/.go_workspace"
ORG_PATH
:
"
github.com/grafana"
REPO_PATH
:
"
${ORG_PATH}/grafana"
GODIST
:
"
go1.10.linux-amd64.tar.gz"
post
:
-
mkdir -p ~/download
-
mkdir -p ~/docker
-
test -e download/$GODIST || curl -o download/$GODIST https://storage.googleapis.com/golang/$GODIST
-
sudo rm -rf /usr/local/go
-
sudo tar -C /usr/local -xzf download/$GODIST
dependencies
:
jobs
:
cache_directories
:
test-frontend
:
-
"
~/docker"
docker
:
-
"
~/download"
-
image
:
circleci/node:6.11.4
override
:
steps
:
-
rm -rf ${GOPATH}/src/${REPO_PATH}
-
checkout
-
mkdir -p ${GOPATH}/src/${ORG_PATH}
-
run
:
-
cp -r ~/grafana ${GOPATH}/src/${ORG_PATH}
name
:
install yarn
pre
:
command
:
'
sudo
npm
install
-g
yarn
--quiet'
-
pip install awscli
-
restore_cache
:
-
sudo apt-get update; sudo apt-get install rpm; sudo apt-get install expect
key
:
dependency-cache-{{ checksum "yarn.lock" }}
-
./scripts/build/build_container.sh
# Could we skip this step if the cache has been restored? `[ -d node_modules ] || yarn install ...` should be able to apply to build step as well
-
run
:
name
:
yarn install
command
:
'
yarn
install
--pure-lockfile
--no-progress'
-
save_cache
:
key
:
dependency-cache-{{ checksum "yarn.lock" }}
paths
:
-
node_modules
-
run
:
name
:
frontend tests
command
:
'
./scripts/circle-test-frontend.sh'
test
:
test-backend
:
override
:
docker
:
-
bash scripts/circle-test-frontend.sh
-
image
:
circleci/golang:1.10
-
bash scripts/circle-test-backend.sh
working_directory
:
/go/src/github.com/grafana/grafana
steps
:
-
checkout
-
run
:
name
:
build backend and run go tests
command
:
'
./scripts/circle-test-backend.sh'
deployment
:
build
:
gh_branch
:
docker
:
branch
:
master
-
image
:
grafana/build-container:v0.1
commands
:
working_directory
:
/go/src/github.com/grafana/grafana
-
./scripts/build/deploy.sh
steps
:
-
./scripts/build/sign_packages.sh
-
checkout
-
go run build.go sha-dist
-
run
:
-
aws s3 sync ./dist s3://$BUCKET_NAME/master
name
:
build and package grafana
-
./scripts/trigger_windows_build.sh ${APPVEYOR_TOKEN} ${CIRCLE_SHA1} master
command
:
'
./scripts/build/build.sh'
-
./scripts/trigger_docker_build.sh ${TRIGGER_GRAFANA_PACKER_CIRCLECI_TOKEN}
-
run
:
-
go run ./scripts/build/publish.go -apiKey ${GRAFANA_COM_API_KEY}
name
:
sign packages
gh_tag
:
command
:
'
./scripts/build/sign_packages.sh'
tag
:
/^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/
-
run
:
commands
:
name
:
sha-sum packages
-
./scripts/build/deploy.sh
command
:
'
go
run
build.go
sha-dist'
-
./scripts/build/sign_packages.sh
-
run
:
-
go run build.go sha-dist
name
:
Build Grafana.com publisher
-
aws s3 sync ./dist s3://$BUCKET_NAME/release
command
:
'
go
build
-o
scripts/publish
scripts/build/publish.go'
-
./scripts/trigger_windows_build.sh ${APPVEYOR_TOKEN} ${CIRCLE_SHA1} release
-
persist_to_workspace
:
-
./scripts/trigger_docker_build.sh ${TRIGGER_GRAFANA_PACKER_CIRCLECI_TOKEN} ${CIRCLE_TAG}
root
:
.
paths
:
-
dist/grafana*
-
scripts/*.sh
-
scripts/publish
deploy-master
:
docker
:
-
image
:
circleci/python:2.7-stretch
working_directory
:
/go/src/github.com/grafana/grafana
steps
:
-
attach_workspace
:
at
:
.
-
run
:
name
:
install awscli
command
:
'
sudo
pip
install
awscli'
-
run
:
name
:
deploy to s3
command
:
'
aws
s3
sync
./dist
s3://$BUCKET_NAME/master'
-
run
:
name
:
Trigger Windows build
command
:
'
./scripts/trigger_windows_build.sh
${APPVEYOR_TOKEN}
${CIRCLE_SHA1}
master'
-
run
:
name
:
Trigger Docker build
command
:
'
./scripts/trigger_docker_build.sh
${TRIGGER_GRAFANA_PACKER_CIRCLECI_TOKEN}'
-
run
:
name
:
Publish to Grafana.com
command
:
'
./scripts/publish
-apiKey
${GRAFANA_COM_API_KEY}'
deploy-release
:
docker
:
-
image
:
circleci/python:2.7-stretch
working_directory
:
/go/src/github.com/grafana/grafana
steps
:
-
attach_workspace
:
at
:
dist
-
run
:
name
:
install awscli
command
:
'
sudo
pip
install
awscli'
-
run
:
name
:
deploy to s3
command
:
'
aws
s3
sync
./dist
s3://$BUCKET_NAME/release'
-
run
:
name
:
Trigger Windows build
command
:
'
./scripts/trigger_windows_build.sh
${APPVEYOR_TOKEN}
${CIRCLE_SHA1}
release'
-
run
:
name
:
Trigger Docker build
command
:
'
./scripts/trigger_docker_build.sh
${TRIGGER_GRAFANA_PACKER_CIRCLECI_TOKEN}
${CIRCLE_TAG}'
workflows
:
version
:
2
test-and-build
:
jobs
:
-
build
:
filters
:
tags
:
only
:
/.*/
-
test-frontend
:
filters
:
tags
:
only
:
/.*/
-
test-backend
:
filters
:
tags
:
only
:
/.*/
-
deploy-master
:
requires
:
-
test-backend
-
test-frontend
-
build
filters
:
branches
:
only
:
master
-
deploy-release
:
requires
:
-
test-backend
-
test-frontend
-
build
filters
:
branches
:
ignore
:
/.*/
tags
:
only
:
/^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/
scripts/build/build.sh
View file @
49de4ed2
...
@@ -21,9 +21,6 @@ fi
...
@@ -21,9 +21,6 @@ fi
yarn install
--pure-lockfile
--no-progress
yarn install
--pure-lockfile
--no-progress
source
/etc/profile.d/rvm.sh
source
/etc/profile.d/rvm.sh
rvm use 2.1.9
--default
gem install fpm
-v
1.4
echo
"current dir:
$(
pwd
)
"
echo
"current dir:
$(
pwd
)
"
...
...
scripts/circle-test-backend.sh
View file @
49de4ed2
...
@@ -10,15 +10,12 @@ function exit_if_fail {
...
@@ -10,15 +10,12 @@ function exit_if_fail {
fi
fi
}
}
cd
/home/ubuntu/.go_workspace/src/github.com/grafana/grafana
echo
"running go fmt"
echo
"running go fmt"
exit_if_fail
test
-z
"
$(
gofmt
-s
-l
./pkg | tee /dev/stderr
)
"
exit_if_fail
test
-z
"
$(
gofmt
-s
-l
./pkg | tee /dev/stderr
)
"
echo
"running go vet"
echo
"running go vet"
exit_if_fail
test
-z
"
$(
go vet ./pkg/... | tee /dev/stderr
)
"
exit_if_fail
test
-z
"
$(
go vet ./pkg/... | tee /dev/stderr
)
"
cd
~/dev/go/src/github.com/grafana/grafana
echo
"building backend with install to cache pkgs"
echo
"building backend with install to cache pkgs"
exit_if_fail
time
go install ./pkg/cmd/grafana-server
exit_if_fail
time
go install ./pkg/cmd/grafana-server
...
...
scripts/circle-test-frontend.sh
View file @
49de4ed2
...
@@ -10,12 +10,6 @@ function exit_if_fail {
...
@@ -10,12 +10,6 @@ function exit_if_fail {
fi
fi
}
}
cd
/home/ubuntu/.go_workspace/src/github.com/grafana/grafana
rm
-rf
node_modules
npm install
-g
yarn
--quiet
yarn install
--pure-lockfile
--no-progress
exit_if_fail npm run
test
:coverage
exit_if_fail npm run
test
:coverage
exit_if_fail npm run build
exit_if_fail npm run build
...
...
scripts/webpack/webpack.test.js
View file @
49de4ed2
...
@@ -16,7 +16,7 @@ config = merge(common, {
...
@@ -16,7 +16,7 @@ config = merge(common, {
new
webpack
.
SourceMapDevToolPlugin
({
new
webpack
.
SourceMapDevToolPlugin
({
filename
:
null
,
// if no value is provided the sourcemap is inlined
filename
:
null
,
// if no value is provided the sourcemap is inlined
test
:
/
\.(
ts|js
)(
$|
\?)
/i
// process .js and .ts files only
test
:
/
\.(
ts|js
)(
$|
\?)
/i
// process .js and .ts files only
})
})
,
]
]
});
});
...
...
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