Commit 4b6aaec8 by bergquist

tech(build): create sha files after signing packages

parent a634bd0c
......@@ -90,7 +90,7 @@ func main() {
case "package":
grunt(gruntBuildArg("release")...)
createLinuxPackages()
sha1FilesInDist()
//sha1FilesInDist()
case "pkg-rpm":
grunt(gruntBuildArg("release")...)
......@@ -107,7 +107,7 @@ func main() {
case "latest":
makeLatestDistCopies()
sha1FilesInDist()
//sha1FilesInDist()
case "clean":
clean()
......@@ -516,8 +516,15 @@ func md5File(file string) error {
func sha1FilesInDist() {
filepath.Walk("./dist", func(path string, f os.FileInfo, err error) error {
if strings.Contains(path, ".sha1") == false {
sha1File(path)
if path == "./dist" {
return nil
}
if strings.Contains(path, ".sha1") == false {
err := sha1File(path)
if err != nil {
log.Printf("Failed to create sha file. error: %v\n", err)
}
}
return nil
})
......
......@@ -11,7 +11,8 @@ machine:
REPO_PATH: "${ORG_PATH}/grafana"
GODIST: "go1.7.4.linux-amd64.tar.gz"
post:
- mkdir -p download
- 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
......@@ -32,24 +33,24 @@ test:
deployment:
gh_branch:
branch: new_deploy
owner: grafana
commands:
- pip install awscli
- sudo apt-get update; sudo apt-get install rpm; sudo apt-get install expect
- ./scripts/build/build_container.sh
- ./scripts/build/deploy.sh
- sudo apt-get update; sudo apt-get install rpm; sudo apt-get install expect
- ./scripts/build/sign_packages.sh
- go run build.go sha1-dist
- aws s3 sync ./dist s3://$BUCKET_NAME/master
#- ./scripts/trigger_grafana_docker_build.sh ${TRIGGER_GRAFANA_DOCKER_CIRCLECI_TOKEN}
gh_tag:
tag: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/
owner: grafana
commands:
- echo lets release stuff!
- pip install awscli
- sudo apt-get update; sudo apt-get install rpm; sudo apt-get install expect
- ./scripts/build/build_container.sh
- ./scripts/build/deploy.sh
- ./scripts/build/sign_packages.sh
- go run build.go sha1-dist
- aws s3 sync ./dist s3://$BUCKET_NAME/release
#- ./scripts/trigger_grafana_docker_build.sh ${TRIGGER_GRAFANA_DOCKER_CIRCLECI_TOKEN}
......@@ -16,7 +16,7 @@ if [ -n "${CIRCLE_TAG}" ]; then
cd $REPO_PATH
else
echo "Building from branch ${CIRCLE_BRANCH}"
git clone --depth 1 https://github.com/grafana/grafana.git
git clone https://github.com/grafana/grafana.git
cd $REPO_PATH
git checkout $CIRCLE_TAG
fi
......
......@@ -18,7 +18,7 @@ yarn install --pure-lockfile
exit_if_fail npm test
exit_if_fail test -z "$(gofmt -s -l ./pkg/... | tee /dev/stderr)"
exit_if_fail test -z "$(gofmt -s -l ./pkg | tee /dev/stderr)"
exit_if_fail go run build.go build
exit_if_fail go vet ./pkg/...
exit_if_fail go test -v ./pkg/...
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment