Skip to content

Commit

Permalink
Actualiza la configuración para CircleCI 2.0 (#144)
Browse files Browse the repository at this point in the history
* (Actualiza) Dependencias y version de circleci

* Fixed circleci config

* (Agrega) Llave faltante en config

* (Actualiza) Changelog

* (Refactor) Variable de twit
  • Loading branch information
leocabeza authored Oct 28, 2018
1 parent da42da1 commit fc18584
Show file tree
Hide file tree
Showing 10 changed files with 7,997 additions and 139 deletions.
81 changes: 81 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
jobs:
build:
docker:
# specify the version you desire here
- image: circleci/node:10.12

# Specify service dependencies here if necessary
- image: circleci/redis:5.0.0

working_directory: ~/repo

steps:
- run: echo "About to checkout project"
- checkout
- run: echo "Project checked out successfully"

- run: echo "About to copy config file"
- run: cp config/config.sample.js config/config.js
- run: echo "Config copied successfully"

# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-

- run: echo "About to install npm dependencies"
- run: npm install
- run: echo "npm dependencies were successfully installed"

- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}

- run: echo "About to run tests"
- run: npm run test
- run: echo "Tests completed successfully"

- run: echo "About to run linter"
- run: npm run lint
- run: echo "Lint completed successfully"

deploy-stage:
machine: true
steps:
- run: echo "About to connect to remote server"
- run: echo ssh -v ${DROPLET_USER}@${DROPLET_IP} STAGING_MODE=1 ./wengy-ven-deployer.sh
- run: echo "Disconnected from server"

deploy-prod:
machine: true
steps:
- run: echo "About to connect to remote server"
- run: echo ssh -v ${DROPLET_USER}@${DROPLET_IP} STAGING_MODE=0 ./wengy-ven-deployer.sh
- run: echo "Disconnected from server"

workflows:
version: 2
build-deploy:
jobs:
- build
- deploy-stage:
requires:
- build
filters:
branches:
only: develop
- deploy-prod:
requires:
- build
filters:
branches:
only: master

6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
## [Unreleased]

## 3.3.3 (2018-10-27)

### Actualizado

- Se actualizó a la versión 2.0 de CircleCI

## 3.3.2 (2018-10-19)

### Corregido
Expand Down
33 changes: 0 additions & 33 deletions circle.yml

This file was deleted.

17 changes: 9 additions & 8 deletions config/config.sample.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,28 @@ const config = {
port: process.env.serverPort || 'MY_PORT'
},
redisOptions: {
url: process.env.redisUrl || 'redis://localhost',
port: process.env.redisPort || '6379'
host: process.env.redisUrl || 'localhost',
port: process.env.redisPort || '6379',
enableReadyCheck: true
},
integrations: {
apiAI: {
lang: 'es',
queryUrl: 'https://api.api.ai/v1/query?v=20150910',
clientAccessToken: process.env.apiAiClientAccessToken || 'MY_SUPER_SECRET_APIAI_TOKEN'
clientAccessToken: process.env.apiAiClientAccessToken
},
twitter: {
auth: {
consumerKey: process.env.twitterConsumerKey || 'CONSUMER_KEY',
consumerSecret: process.env.twitterConsumerSecret || 'CONSUMER_SECRET',
accessTokenKey: process.env.twitterAccessTokenKey || 'ACCESS_TOKEN_KEY',
accessTokenSecret: process.env.twitterAccessTokenSecret || 'ACCESS_TOKEN_SECRET'
consumerKey: process.env.twitterConsumerKey,
consumerSecret: process.env.twitterConsumerSecret,
accessTokenKey: process.env.twitterAccessTokenKey,
accessTokenSecret: process.env.twitterAccessTokenSecret
},
id: process.env.twitterId || '41469246',
hashtagMessage: '#ngVenezuelaTweet'
},
github: {
accessToken: process.env.githubAccessToken || 'GITHUB_ACCESS_TOKEN'
accessToken: process.env.githubAccessToken
},
githubReleases: [
{
Expand Down
Loading

0 comments on commit fc18584

Please sign in to comment.