From 30580a5fdabdcfdd59bc567cdf74cc10fe2c8d27 Mon Sep 17 00:00:00 2001 From: Julian Simioni Date: Sat, 3 Nov 2018 13:07:41 -0400 Subject: [PATCH 1/5] feat(Node.js): Drop support for Node.js 6 Connects https://github.com/pelias/pelias/issues/752 --- .travis.yml | 1 - package.json | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3dd2c22..62d69b0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,6 @@ language: node_js notifications: email: false node_js: - - 6 - 8 - 10 matrix: diff --git a/package.json b/package.json index 779abab..8e25cbd 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,9 @@ "devDependencies": { "precommit-hook": "^3.0.0" }, + "engines": { + "node": ">=8.0.0" + }, "repository": { "type": "git", "url": "https://github.com/pelias/transit.git" From 7c9ea593c7061189a893f55c3cdd243e69ce6c20 Mon Sep 17 00:00:00 2001 From: Julian Simioni Date: Sat, 3 Nov 2018 13:07:59 -0400 Subject: [PATCH 2/5] chore(release): Run releases off master branch Connects https://github.com/pelias/pelias/issues/749 --- .travis.yml | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 62d69b0..5cff975 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,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 diff --git a/package.json b/package.json index 8e25cbd..8cf2e45 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "test" ], "release": { - "branch": "production", + "branch": "master", "success": [] } } From e0cae2175252359eed784eb3038a33fe9bdecbbb Mon Sep 17 00:00:00 2001 From: Julian Simioni Date: Sat, 3 Nov 2018 13:08:13 -0400 Subject: [PATCH 3/5] Remove prune step --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index 8cf2e45..4f5b79e 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,6 @@ "homepage": "https://github.com/pelias/transit", "pre-commit": [ "lint", - "prune", "validate", "test" ], From ba0e929488d17b09996c4b8d58ef8c08606a8906 Mon Sep 17 00:00:00 2001 From: Julian Simioni Date: Sat, 3 Nov 2018 13:09:01 -0400 Subject: [PATCH 4/5] chore(release): Skip semantic-release run on pull reqeusts This should speed up our CI slightly --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5cff975..2d87924 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,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 = master + if: (branch = master) AND ( type = push ) From 1deaa1a0883b3f1d3afa3bfda4751a26d6c9662a Mon Sep 17 00:00:00 2001 From: Julian Simioni Date: Sat, 3 Nov 2018 13:09:29 -0400 Subject: [PATCH 5/5] chore(CI): Use shared Docker build CI script Connects https://github.com/pelias/pelias/issues/749 --- .circleci/config.yml | 4 ++-- .circleci/docker.sh | 35 ----------------------------------- 2 files changed, 2 insertions(+), 37 deletions(-) delete mode 100644 .circleci/docker.sh 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