From 4b4fe08c753b42183cbc3649b4c31d2341350691 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Cervi=C3=B1o?= Date: Wed, 13 Jun 2018 14:19:17 +0200 Subject: [PATCH] Fix circleci scripts (#1248) --- .circleci/config.yml | 60 +++++--------------------------------------- 1 file changed, 6 insertions(+), 54 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9bc6328a03..3bed9dd830 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,31 +3,15 @@ version: 2.0 jobs: build: docker: - - image: buildpack-deps:trusty-curl + - image: circleci/buildpack-deps:trusty-curl-browsers working_directory: /tmp/licode steps: - - run: - name: Install Git client - command: | - set -x - sudo apt-get update - sudo apt-get install -y git - - checkout - setup_remote_docker - - run: - name: Install Docker client - command: | - set -x - VER="17.03.0-ce" - curl -L -o /tmp/docker-$VER.tgz https://get.docker.com/builds/Linux/x86_64/docker-$VER.tgz - tar -xz -C /tmp -f /tmp/docker-$VER.tgz - mv /tmp/docker/* /usr/bin - - run: name: Pull latest docker image command: | @@ -65,7 +49,7 @@ jobs: - deploy: name: Push Licode Docker image command: | - if [ "${CIRCLE_BRANCH}" == "master" ]; then + if [ "${CIRCLE_BRANCH}" == "master" ] && [ "${CIRCLE_PROJECT_USERNAME}" == "lynckia" ]; then SHORT_GIT_HASH="$(echo ${CIRCLE_SHA1} | cut -c -7)" docker login -u ${DOCKER_USER} -p ${DOCKER_PASS} echo Tagging to lynckia/licode:${SHORT_GIT_HASH} @@ -76,36 +60,20 @@ jobs: prerelease: docker: - - image: buildpack-deps:trusty-curl + - image: circleci/buildpack-deps:trusty-curl-browsers working_directory: /tmp/licode steps: - - run: - name: Install Git client - command: | - set -x - sudo apt-get update - sudo apt-get install -y git - - checkout - setup_remote_docker - - run: - name: Install Docker client - command: | - set -x - VER="17.03.0-ce" - curl -L -o /tmp/docker-$VER.tgz https://get.docker.com/builds/Linux/x86_64/docker-$VER.tgz - tar -xz -C /tmp -f /tmp/docker-$VER.tgz - mv /tmp/docker/* /usr/bin - - run: name: Install deps command: | sudo apt-get update - sudo apt-get install -y git jq + sudo apt-get install -y jq - run: name: Create Prerelease @@ -114,36 +82,20 @@ jobs: release: docker: - - image: buildpack-deps:trusty-curl + - image: circleci/buildpack-deps:trusty-curl-browsers working_directory: /tmp/licode steps: - - run: - name: Install Git client - command: | - set -x - sudo apt-get update - sudo apt-get install -y git - - checkout - setup_remote_docker - - run: - name: Install Docker client - command: | - set -x - VER="17.03.0-ce" - curl -L -o /tmp/docker-$VER.tgz https://get.docker.com/builds/Linux/x86_64/docker-$VER.tgz - tar -xz -C /tmp -f /tmp/docker-$VER.tgz - mv /tmp/docker/* /usr/bin - - run: name: Install deps command: | sudo apt-get update - sudo apt-get install -y git jq + sudo apt-get install -y jq - run: name: Create release