diff --git a/.circleci/config.yml b/.circleci/config.yml index 8aeea9d..c1f237c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,10 +3,10 @@ jobs: build: working_directory: /app docker: - - image: docker:17.05.0-ce-git + - image: docker:18.06.1-ce-git steps: - checkout - setup_remote_docker - run: name: Build and push image to Docker Hub - command: sh .circleci/docker.sh + command: apk --no-cache add curl bash && curl "https://raw.githubusercontent.com/pelias/ci-tools/master/build-docker-images.sh" | bash - diff --git a/.circleci/docker.sh b/.circleci/docker.sh deleted file mode 100644 index 1acd51c..0000000 --- a/.circleci/docker.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash -set -u - -# collect params from ENV vars -DATE=`date +%Y-%m-%d` -DOCKER_REPOSITORY="pelias" -DOCKER_PROJECT="${DOCKER_REPOSITORY}/${CIRCLE_PROJECT_REPONAME}" - -# skip builds on greenkeeper branches -if [[ -z "${CIRCLE_BRANCH##*greenkeeper*}" ]]; then - exit 0 -fi - -# the name of the image that represents the "branch", that is an image that will be updated over time with the git branch -# the production branch is changed to "latest", otherwise the git branch becomes the name of the version -if [[ "${CIRCLE_BRANCH}" == "production" ]]; then - DOCKER_BRANCH_IMAGE_VERSION="latest" -else - DOCKER_BRANCH_IMAGE_VERSION="${CIRCLE_BRANCH}" -fi -DOCKER_BRANCH_IMAGE_NAME="${DOCKER_PROJECT}:${DOCKER_BRANCH_IMAGE_VERSION}" - -# the name of the image that represents the "tag", that is an image that is named with the date and git commit and will never be changed -DOCKER_TAG_IMAGE_VERSION="${CIRCLE_BRANCH}-${DATE}-${CIRCLE_SHA1}" -DOCKER_TAG_IMAGE_NAME="${DOCKER_PROJECT}:${DOCKER_TAG_IMAGE_VERSION}" - -# build image and login to docker hub -docker build -t $DOCKER_PROJECT . -docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" - -# copy the image to each of the two tags, and push -docker tag $DOCKER_PROJECT $DOCKER_BRANCH_IMAGE_NAME -docker tag $DOCKER_PROJECT $DOCKER_TAG_IMAGE_NAME -docker push $DOCKER_BRANCH_IMAGE_NAME -docker push $DOCKER_TAG_IMAGE_NAME diff --git a/.travis.yml b/.travis.yml index 3dd2c22..2d87924 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,6 @@ language: node_js notifications: email: false node_js: - - 6 - 8 - 10 matrix: @@ -19,4 +18,4 @@ jobs: - stage: release node_js: 10 script: curl "https://raw.githubusercontent.com/pelias/ci-tools/master/semantic-release.sh" | bash - - if: branch = production + if: (branch = master) AND ( type = push ) diff --git a/package.json b/package.json index 3faf97f..186959b 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "author": "Mapzen", "license": "MIT", "engines": { - "node": ">= 6.0.0" + "node": ">= 8.0.0" }, "repository": { "type": "git", @@ -44,7 +44,7 @@ "test" ], "release": { - "branch": "production", + "branch": "master", "success": [] } }