@cmflow/cli 0.71.6 → 0.72.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmflow/cli",
3
- "version": "0.71.6",
3
+ "version": "0.72.0",
4
4
  "description": "An awesome Git Flow",
5
5
  "author": "camfou",
6
6
  "license": "MIT",
@@ -16,12 +16,14 @@ export async function dockerPublish (context) {
16
16
  }
17
17
 
18
18
  export async function deployOnDockerHub (context) {
19
- const { config: { PRODUCTION_BRANCH, DOCKER_REPOSITORY, DOCKER_HUB_ID, DOCKER_HUB_PWD } } = context
19
+ const { logger, config: { PRODUCTION_BRANCH, DOCKER_REPOSITORY, DOCKER_HUB_ID, DOCKER_HUB_PWD } } = context
20
20
 
21
21
  docker.login('-u', DOCKER_HUB_ID, '-p', DOCKER_HUB_PWD)
22
22
 
23
23
  const image = PRODUCTION_BRANCH === context.branch.name ? `${DOCKER_REPOSITORY}:${context.nextRelease.version}` : `${DOCKER_REPOSITORY}:${context.branch.name}`
24
-
24
+ logger.info('context.branch.name : ', context.branch.name)
25
+ logger.info('context.nextRelease.version : ', context.nextRelease && context.nextRelease.version)
26
+ logger.info('PRODUCTION_BRANCH : ', PRODUCTION_BRANCH)
25
27
  docker.tag(`${DOCKER_REPOSITORY}:latest`, image)
26
28
 
27
29
  await docker.push(image)
@@ -6,6 +6,10 @@ jest.mock('../../common')
6
6
  describe('dockerPublish', () => {
7
7
  it('should publish docker image', async () => {
8
8
  const context = {
9
+ logger: {
10
+ info: jest.fn(),
11
+ warn: jest.fn()
12
+ },
9
13
  branch: {
10
14
  name: 'branch-name'
11
15
  },