Skip to content
Open

Alex #38

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions codefresh.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: "1.0"
steps:
test:
type: "freestyle"
image: alpine
commands:
- sleep 36
- exit 0
71 changes: 6 additions & 65 deletions codefresh.yml
Original file line number Diff line number Diff line change
@@ -1,67 +1,8 @@
version: '1.0'
version: "1.0"
steps:
build_step:
title: Build
type: build
dockerfile: Dockerfile
image_name: demochat
tag: '${{CF_BRANCH}}'

# unit_tests:
# title: Unit Tests
# image: ${{build_step}}
# fail_fast: false
# working-directory : /usr/src/app
# commands:
# - npm test

unit_test:
type: composition
working_directory: '${{main_clone}}'
composition:
version: '2'
services:
mongo:
image: 'mongo:latest'
ports:
- 27017
composition_candidates:
test:
image: '${{build_step}}'
command: npm test
push_to_registry:
title: Push To Registry
type: push
candidate: ${{build_step}}
tag: ${{CF_BRANCH}}

deploy_to_ecs:
title: Deploy Container to ECS
image: codefresh/cf-deploy-ecs
test:
type: "freestyle"
image: alpine
commands:
- >-
cfecs-update --image-name containers101/demochat --image-tag
${{CF_BRANCH}} eu-west-1 demochat-production demochat-service
environment:
- 'AWS_ACCESS_KEY_ID=${{AWS_ACCESS_KEY_ID}}'
- 'AWS_SECRET_ACCESS_KEY=${{AWS_SECRET_ACCESS_KEY}}'
when:
condition:
all:
deploy_to_ecs: '"${{DEPLOY_ECS}}" == "true"'

deploy_to_kubernetes:
image: codefresh/cf-deploy-kubernetes
tag: latest
working_directory: ${{main_clone}}
commands:
- /cf-deploy-kubernetes deployment.yml
environment:
- KUBERNETES_USER=${{KUBERNETES_USER}}
- KUBERNETES_PASSWORD=${{KUBERNETES_PASSWORD}}
- KUBERNETES_SERVER=${{KUBERNETES_SERVER}}
- DOCKER_IMAGE_TAG=${{CF_BRANCH}}
when:
condition:
all:
deploy_to_kubernetes: '"${{DEPLOY_KUBERNETES}}" == "true"'
# - sleep 36
- exit 0
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lets-chat",
"version": "0.4.5",
"version": "0.4.6",
"description": "A chat app for small teams.",
"license": "MIT",
"main": "app.js",
Expand Down