Commit 4b6aaec8 by bergquist

tech(build): create sha files after signing packages

parent a634bd0c
...@@ -90,7 +90,7 @@ func main() { ...@@ -90,7 +90,7 @@ func main() {
case "package": case "package":
grunt(gruntBuildArg("release")...) grunt(gruntBuildArg("release")...)
createLinuxPackages() createLinuxPackages()
sha1FilesInDist() //sha1FilesInDist()
case "pkg-rpm": case "pkg-rpm":
grunt(gruntBuildArg("release")...) grunt(gruntBuildArg("release")...)
...@@ -107,7 +107,7 @@ func main() { ...@@ -107,7 +107,7 @@ func main() {
case "latest": case "latest":
makeLatestDistCopies() makeLatestDistCopies()
sha1FilesInDist() //sha1FilesInDist()
case "clean": case "clean":
clean() clean()
...@@ -516,8 +516,15 @@ func md5File(file string) error { ...@@ -516,8 +516,15 @@ func md5File(file string) error {
func sha1FilesInDist() { func sha1FilesInDist() {
filepath.Walk("./dist", func(path string, f os.FileInfo, err error) error { filepath.Walk("./dist", func(path string, f os.FileInfo, err error) error {
if path == "./dist" {
return nil
}
if strings.Contains(path, ".sha1") == false { if strings.Contains(path, ".sha1") == false {
sha1File(path) err := sha1File(path)
if err != nil {
log.Printf("Failed to create sha file. error: %v\n", err)
}
} }
return nil return nil
}) })
......
...@@ -11,7 +11,8 @@ machine: ...@@ -11,7 +11,8 @@ machine:
REPO_PATH: "${ORG_PATH}/grafana" REPO_PATH: "${ORG_PATH}/grafana"
GODIST: "go1.7.4.linux-amd64.tar.gz" GODIST: "go1.7.4.linux-amd64.tar.gz"
post: post:
- mkdir -p download - mkdir -p ~/download
- mkdir -p ~/docker
- test -e download/$GODIST || curl -o download/$GODIST https://storage.googleapis.com/golang/$GODIST - test -e download/$GODIST || curl -o download/$GODIST https://storage.googleapis.com/golang/$GODIST
- sudo rm -rf /usr/local/go - sudo rm -rf /usr/local/go
- sudo tar -C /usr/local -xzf download/$GODIST - sudo tar -C /usr/local -xzf download/$GODIST
...@@ -32,24 +33,24 @@ test: ...@@ -32,24 +33,24 @@ test:
deployment: deployment:
gh_branch: gh_branch:
branch: new_deploy branch: new_deploy
owner: grafana
commands: commands:
- pip install awscli - pip install awscli
- sudo apt-get update; sudo apt-get install rpm; sudo apt-get install expect
- ./scripts/build/build_container.sh - ./scripts/build/build_container.sh
- ./scripts/build/deploy.sh - ./scripts/build/deploy.sh
- sudo apt-get update; sudo apt-get install rpm; sudo apt-get install expect
- ./scripts/build/sign_packages.sh - ./scripts/build/sign_packages.sh
- go run build.go sha1-dist
- aws s3 sync ./dist s3://$BUCKET_NAME/master - aws s3 sync ./dist s3://$BUCKET_NAME/master
#- ./scripts/trigger_grafana_docker_build.sh ${TRIGGER_GRAFANA_DOCKER_CIRCLECI_TOKEN} #- ./scripts/trigger_grafana_docker_build.sh ${TRIGGER_GRAFANA_DOCKER_CIRCLECI_TOKEN}
gh_tag: gh_tag:
tag: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/ tag: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/
owner: grafana
commands: commands:
- echo lets release stuff!
- pip install awscli - pip install awscli
- sudo apt-get update; sudo apt-get install rpm; sudo apt-get install expect
- ./scripts/build/build_container.sh - ./scripts/build/build_container.sh
- ./scripts/build/deploy.sh - ./scripts/build/deploy.sh
- ./scripts/build/sign_packages.sh - ./scripts/build/sign_packages.sh
- go run build.go sha1-dist
- aws s3 sync ./dist s3://$BUCKET_NAME/release - aws s3 sync ./dist s3://$BUCKET_NAME/release
#- ./scripts/trigger_grafana_docker_build.sh ${TRIGGER_GRAFANA_DOCKER_CIRCLECI_TOKEN} #- ./scripts/trigger_grafana_docker_build.sh ${TRIGGER_GRAFANA_DOCKER_CIRCLECI_TOKEN}
...@@ -16,7 +16,7 @@ if [ -n "${CIRCLE_TAG}" ]; then ...@@ -16,7 +16,7 @@ if [ -n "${CIRCLE_TAG}" ]; then
cd $REPO_PATH cd $REPO_PATH
else else
echo "Building from branch ${CIRCLE_BRANCH}" 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 cd $REPO_PATH
git checkout $CIRCLE_TAG git checkout $CIRCLE_TAG
fi fi
......
...@@ -18,7 +18,7 @@ yarn install --pure-lockfile ...@@ -18,7 +18,7 @@ yarn install --pure-lockfile
exit_if_fail npm test 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 run build.go build
exit_if_fail go vet ./pkg/... exit_if_fail go vet ./pkg/...
exit_if_fail go test -v ./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