From 23ea46a1111b84adf18cb8b40d7c267c64ec5bf3 Mon Sep 17 00:00:00 2001 From: nikolai Date: Sat, 8 Jul 2017 11:59:38 +0300 Subject: [PATCH 1/2] added step deploy to k8 --- codefresh.yml | 43 ------------------------------------------- 1 file changed, 43 deletions(-) diff --git a/codefresh.yml b/codefresh.yml index a295b40a3..af855dbf3 100644 --- a/codefresh.yml +++ b/codefresh.yml @@ -7,49 +7,6 @@ steps: image_name: containers101/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 - 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 From 6f041f1f53fb28a021256218f40356af80b68a1a Mon Sep 17 00:00:00 2001 From: nikolai Date: Sat, 8 Jul 2017 18:00:08 +0300 Subject: [PATCH 2/2] added pulling from cfcr --- deployment.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/deployment.yml b/deployment.yml index 2ae678869..bfec9f3ed 100644 --- a/deployment.yml +++ b/deployment.yml @@ -15,10 +15,11 @@ spec: service: app spec: containers: - - image: containers101/demochat:{{CF_BRANCH}} + - image: r.cfcr.io/nikolai/demochat:k8-test name: app imagePullPolicy: Always ports: - containerPort: 5000 protocol: TCP - + imagePullSecrets: + - name: rcfcrsecret