diff --git a/circle.yml b/circle.yml index c53e2c3b371..25cf6f238c2 100644 --- a/circle.yml +++ b/circle.yml @@ -37,6 +37,7 @@ deployment: - pip install awscli - ./scripts/build/build_container.sh - ./scripts/build/deploy.sh + #- ./scripts/build/sign_packages.sh #- aws s3 sync ./dist s3://$BUCKET_NAME #- ./scripts/trigger_grafana_docker_build.sh ${TRIGGER_GRAFANA_DOCKER_CIRCLECI_TOKEN} gh_tag: @@ -44,10 +45,10 @@ deployment: owner: grafana commands: - echo lets release stuff! + - pip install awscli + - ./scripts/build/build_container.sh + - ./scripts/build/deploy.sh #- ./scripts/build/sign_packages.sh -# master: -# branch: master -# owner: grafana -# commands: -# - ./scripts/trigger_grafana_packer.sh ${TRIGGER_GRAFANA_PACKER_CIRCLECI_TOKEN} -# - ./scripts/trigger_windows_build.sh ${APPVEYOR_TOKEN} + #- aws s3 sync ./dist s3://$BUCKET_NAME + #- ./scripts/trigger_grafana_docker_build.sh ${TRIGGER_GRAFANA_DOCKER_CIRCLECI_TOKEN} + diff --git a/scripts/build/Dockerfile b/scripts/build/Dockerfile index bdbc047bec6..c8df86a0bf1 100644 --- a/scripts/build/Dockerfile +++ b/scripts/build/Dockerfile @@ -21,6 +21,9 @@ RUN /bin/bash -l -c "rvm use 2.1.9 --default" RUN curl --silent --location https://rpm.nodesource.com/setup_6.x | bash - RUN yum install -y nodejs --nogpgcheck +RUN wget https://dl.yarnpkg.com/rpm/yarn.repo -O /etc/yum.repos.d/yarn.repo +RUN yum install -y yarn --nogpgcheck + ENV GOLANG_VERSION 1.7.4 RUN wget https://storage.googleapis.com/golang/go1.7.4.linux-amd64.tar.gz diff --git a/scripts/build/build.sh b/scripts/build/build.sh index f5b69db553b..5dd2a9ecab9 100755 --- a/scripts/build/build.sh +++ b/scripts/build/build.sh @@ -10,14 +10,18 @@ REPO_PATH=$GOPATH/src/github.com/grafana/grafana mkdir -p /go/src/github.com/grafana cd /go/src/github.com/grafana -echo "CIRCLE BRANCH: ${CIRCLE_BRANCH}" - -git clone --depth 1 https://github.com/grafana/grafana.git -b $CIRCLE_BRANCH - -cd $REPO_PATH +if [ -n "${CIRCLE_TAG}" ]; then + echo "Building from tag ${CIRCLE_TAG}" + git clone --depth 1 https://github.com/grafana/grafana.git -b $CIRCLE_BRANCH + cd $REPO_PATH +else + echo "Building from branch ${CIRCLE_BRANCH}" + git clone --depth 1 https://github.com/grafana/grafana.git + cd $REPO_PATH + git checkout $CIRCLE_TAG +fi go run build.go build -npm install -g yarn yarn install --pure-lockfile source /etc/profile.d/rvm.sh diff --git a/scripts/build/deploy.sh b/scripts/build/deploy.sh index daf3b3edc8c..7fc1b0e499a 100755 --- a/scripts/build/deploy.sh +++ b/scripts/build/deploy.sh @@ -4,7 +4,6 @@ mkdir -p dist echo "Circle branch: ${CIRCLE_BRANCH}" echo "Circle tag: ${CIRCLE_TAG}" -echo "dist: $(pwd)/dist" docker run -i -t --name gfbuild \ -v $(pwd)/dist:/tmp/dist \ -e "CIRCLE_BRANCH=${CIRCLE_BRANCH}" \