Giter VIP home page Giter VIP logo

semantic-release-docker's Introduction

@iteratec/semantic-release-docker

Build Status semantic-release latest npm package version MIT license

A semantic-release plugin to use semantic versioning for docker images.

Supported Steps

verifyConditions

verifies that environment variables for authentication via username and password are set. It uses a registry server provided via config or environment variable (preferred) or defaults to docker hub if none is given. It also verifies that the credentials are correct by logging in to the given registry.

prepare

tags the specified image with the version number determined by semantic-release and additional tags provided in the configuration. In addition it supports specifying a complete image name (CIN) via configuration settings according to the canonical format specified by docker:

[registryhostname[:port]/][username/]imagename[:tag]

publish

pushes the tagged images to the registry.

Installation

Run npm i --save-dev @iteratec/semantic-release-docker to install this semantic-release plugin.

Configuration

Docker registry authentication

The docker registry authentication is required and can be set via environment variables.

Environment variables

Variable Description
DOCKER_REGISTRY_URL The hostname and port used by the desired docker registry. Leave blank to use docker hub.
DOCKER_REGISTRY_USER The user name to authenticate with at the registry.
DOCKER_REGISTRY_PASSWORD The password used for authentication at the registry.

Options

Option Description
additionalTags Optional. An array of strings allowing to specify additional tags to apply to the image.
imageName Required The name of the image to release.
registryUrl Optional. The hostname and port used by the the registry in format hostname[:port]. Omit the port if the registry uses the default port
repositoryName Optional. The name of the repository in the registry, e.g. username on docker hub

Usage

full configuration:

{
  "verifyConfig": ["@iteratec/semantic-release-docker"],
  "prepare": {
    "path": "@iteratec/semantic-release-docker",
    "additionalTags": ["test", "demo"],
    "imageName": "my-image",
    "registryUrl": "my-private-registry:5678",
    "respositoryName": "my-repository"
  },
  "publish": {
    "path": "@iteratec/semantic-release-docker"
  }
}

results in my-private-registry:5678/my-repository/my-image with tags test, demo and the <semver> determined by semantic-release.

minimum configuration:

{
  "verifyConfig": ["@iteratec/semantic-release-docker"],
  "prepare": {
    "path": "@iteratec/semantic-release-docker",
    "imageName": "my-image"
  },
  "publish": {
    "path": "@iteratec/semantic-release-docker"
  }
}

results in my-image:<semver>

semantic-release-docker's People

Contributors

cmurczek-it avatar danielhabenicht avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

danielhabenicht

semantic-release-docker's Issues

unauthorized: incorrect username or password

Hi, thanks for creating this project 👍

Been trying to set this up in one of our projects but not had much luck. I've definitely used the username and not the account email address, but I keep getting the same error. Is there an example repo I could check to see if I've missed something?

IMPROVE: Add ability to push multiple docker images

Currently, it is only possible to execute the plugin once. (The first configuration is used)

This feature allows specifying the plugin multiple times in order to push multiple images to a docker repository.

PS: I will provide a PR shortly.

Support for templated tag names

I would be very useful for additionalTags to accept mustache template strings.

I generally want to generate multiple tags based on semver values

  • <NAME>-X.Y.Z
  • <NAME>-X.Y
  • <NAME>-X
  • <NAME>-X-latest
  • <NAME>-latest

Does not push additionalTags

I don't know if I am doing something wrong or if this is really a bug:
The plugin simply does not push the additional Tags.

Version: 1.0.1
Semantic release config:

"release": {
    "branch": "master",
    "verifyConditions": [],
    "verifyConfig": [
      "@iteratec/semantic-release-docker"
    ],
    "prepare": [
      {
        "path": "@semantic-release/changelog",
        "changelogFile": "dist/changelog.md"
      },
      {
        "path": "@semantic-release/exec",
        "cmd": "node version.js ${nextRelease.version} ${commits[0].commit.short} ${commits[0].commit.long}"
      },
      {
        "path": "@semantic-release/exec",
        "cmd": "docker build . -f Dockerfile-dist -t dist_project"
      },
      {
        "path": "@semantic-release/exec",
        "cmd": "docker build ./infrastructure/nginx -t project"
      },
      {
        "path": "@iteratec/semantic-release-docker",
        "additionalTags": [
          "latest"
        ],
        "imageName": "project",
        "registryUrl": "remote.registry.com",
        "respositoryName": "project"
      }
    ],
    "publish": [
      {
        "path": "@iteratec/semantic-release-docker"
      }
    ],
    "fail": [],
    "success": []
  }

Log:

Click to expand

[09:38:30] [semantic-release] › ℹ  Start step "publish" of plugin "@iteratec/semantic-release-docker"
[09:38:30] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  pushing image ********/project:1.1.8
[09:38:30] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"The push refers to repository [********/project]"}

[09:38:30] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Preparing","progressDetail":{},"id":"920a969a047b"}

[09:38:30] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Preparing","progressDetail":{},"id":"59fb576d61e9"}

[09:38:30] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Preparing","progressDetail":{},"id":"34cbd5b82ed9"}

[09:38:30] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Preparing","progressDetail":{},"id":"8bba576db54b"}

[09:38:30] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Preparing","progressDetail":{},"id":"ffd20c106e18"}

[09:38:30] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Layer already exists","progressDetail":{},"id":"ffd20c106e18"}

[09:38:30] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":512,"total":3357},"progress":"[=======\u003e                                           ]     512B/3.357kB","id":"34cbd5b82ed9"}

[09:38:30] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":6144,"total":3357},"progress":"[==================================================\u003e]  6.144kB","id":"34cbd5b82ed9"}

[09:38:30] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":541184,"total":55799284},"progress":"[\u003e                                                  ]  541.2kB/55.8MB","id":"8bba576db54b"}

[09:38:30] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushed","progressDetail":{},"id":"34cbd5b82ed9"}

[09:38:30] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":1655296,"total":55799284},"progress":"[=\u003e                                                 ]  1.655MB/55.8MB","id":"8bba576db54b"}

[09:38:30] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":2755584,"total":55799284},"progress":"[==\u003e                                                ]  2.756MB/55.8MB","id":"8bba576db54b"}

[09:38:30] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":512,"total":239},"progress":"[==================================================\u003e]     512B","id":"59fb576d61e9"}

[09:38:30] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":3818496,"total":55799284},"progress":"[===\u003e                                               ]  3.818MB/55.8MB","id":"8bba576db54b"}

[09:38:30] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":132976,"total":12694019},"progress":"[\u003e                                                  ]    133kB/12.69MB","id":"920a969a047b"}

[09:38:30] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":3584,"total":239},"progress":"[==================================================\u003e]  3.584kB","id":"59fb576d61e9"}

[09:38:30] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":967680,"total":12694019},"progress":"[===\u003e                                               ]  967.7kB/12.69MB","id":"920a969a047b"}

[09:38:30] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":4899840,"total":55799284},"progress":"[====\u003e                                              ]    4.9MB/55.8MB","id":"8bba576db54b"}

[09:38:31] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushed","progressDetail":{},"id":"59fb576d61e9"}

[09:38:31] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":1798640,"total":12694019},"progress":"[=======\u003e                                           ]  1.799MB/12.69MB","id":"920a969a047b"}

[09:38:31] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":5996544,"total":55799284},"progress":"[=====\u003e                                             ]  5.997MB/55.8MB","id":"8bba576db54b"}

[09:38:31] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":3240448,"total":12694019},"progress":"[============\u003e                                      ]   3.24MB/12.69MB","id":"920a969a047b"}

[09:38:31] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":7622656,"total":55799284},"progress":"[======\u003e                                            ]  7.623MB/55.8MB","id":"8bba576db54b"}

[09:38:31] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":4833792,"total":12694019},"progress":"[===================\u003e                               ]  4.834MB/12.69MB","id":"920a969a047b"}

[09:38:31] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":9266720,"total":55799284},"progress":"[========\u003e                                          ]  9.267MB/55.8MB","id":"8bba576db54b"}

[09:38:31] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":6418777,"total":12694019},"progress":"[=========================\u003e                         ]  6.419MB/12.69MB","id":"920a969a047b"}

[09:38:31] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":10376704,"total":55799284},"progress":"[=========\u003e                                         ]  10.38MB/55.8MB","id":"8bba576db54b"}

[09:38:31] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":7886336,"total":12694019},"progress":"[===============================\u003e                   ]  7.886MB/12.69MB","id":"920a969a047b"}

[09:38:31] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":11479552,"total":55799284},"progress":"[==========\u003e                                        ]  11.48MB/55.8MB","id":"8bba576db54b"}

[09:38:31] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":9332736,"total":12694019},"progress":"[====================================\u003e              ]  9.333MB/12.69MB","id":"920a969a047b"}

[09:38:31] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":12555358,"total":55799284},"progress":"[===========\u003e                                       ]  12.56MB/55.8MB","id":"8bba576db54b"}

[09:38:31] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":11258880,"total":12694019},"progress":"[============================================\u003e      ]  11.26MB/12.69MB","id":"920a969a047b"}

[09:38:31] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":12828672,"total":12694019},"progress":"[==================================================\u003e]  12.83MB","id":"920a969a047b"}

[09:38:31] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":13637120,"total":55799284},"progress":"[============\u003e                                      ]  13.64MB/55.8MB","id":"8bba576db54b"}

[09:38:31] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushed","progressDetail":{},"id":"920a969a047b"}

[09:38:31] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":15282688,"total":55799284},"progress":"[=============\u003e                                     ]  15.28MB/55.8MB","id":"8bba576db54b"}

[09:38:32] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":16929792,"total":55799284},"progress":"[===============\u003e                                   ]  16.93MB/55.8MB","id":"8bba576db54b"}

[09:38:32] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":18600960,"total":55799284},"progress":"[================\u003e                                  ]   18.6MB/55.8MB","id":"8bba576db54b"}

[09:38:32] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":20824064,"total":55799284},"progress":"[==================\u003e                                ]  20.82MB/55.8MB","id":"8bba576db54b"}

[09:38:32] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":22472704,"total":55799284},"progress":"[====================\u003e                              ]  22.47MB/55.8MB","id":"8bba576db54b"}

[09:38:32] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":24119296,"total":55799284},"progress":"[=====================\u003e                             ]  24.12MB/55.8MB","id":"8bba576db54b"}

[09:38:32] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":25777152,"total":55799284},"progress":"[=======================\u003e                           ]  25.78MB/55.8MB","id":"8bba576db54b"}

[09:38:32] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":26855936,"total":55799284},"progress":"[========================\u003e                          ]  26.86MB/55.8MB","id":"8bba576db54b"}

[09:38:32] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":27970048,"total":55799284},"progress":"[=========================\u003e                         ]  27.97MB/55.8MB","id":"8bba576db54b"}

[09:38:33] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":29071872,"total":55799284},"progress":"[==========================\u003e                        ]  29.07MB/55.8MB","id":"8bba576db54b"}

[09:38:33] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":30721488,"total":55799284},"progress":"[===========================\u003e                       ]  30.72MB/55.8MB","id":"8bba576db54b"}

[09:38:33] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":32339968,"total":55799284},"progress":"[============================\u003e                      ]  32.34MB/55.8MB","id":"8bba576db54b"}

[09:38:33] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":33963008,"total":55799284},"progress":"[==============================\u003e                    ]  33.96MB/55.8MB","id":"8bba576db54b"}

[09:38:33] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":36128256,"total":55799284},"progress":"[================================\u003e                  ]  36.13MB/55.8MB","id":"8bba576db54b"}

[09:38:33] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":37759252,"total":55799284},"progress":"[=================================\u003e                 ]  37.76MB/55.8MB","id":"8bba576db54b"}

[09:38:33] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":38851584,"total":55799284},"progress":"[==================================\u003e                ]  38.85MB/55.8MB","id":"8bba576db54b"}

[09:38:33] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":39915919,"total":55799284},"progress":"[===================================\u003e               ]  39.92MB/55.8MB","id":"8bba576db54b"}

[09:38:34] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":41009152,"total":55799284},"progress":"[====================================\u003e              ]  41.01MB/55.8MB","id":"8bba576db54b"}

[09:38:34] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":42640384,"total":55799284},"progress":"[======================================\u003e            ]  42.64MB/55.8MB","id":"8bba576db54b"}

[09:38:34] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":43729127,"total":55799284},"progress":"[=======================================\u003e           ]  43.73MB/55.8MB","id":"8bba576db54b"}

[09:38:34] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":44806656,"total":55799284},"progress":"[========================================\u003e          ]  44.81MB/55.8MB","id":"8bba576db54b"}

[09:38:34] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":45903544,"total":55799284},"progress":"[=========================================\u003e         ]   45.9MB/55.8MB","id":"8bba576db54b"}

[09:38:34] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":47516672,"total":55799284},"progress":"[==========================================\u003e        ]  47.52MB/55.8MB","id":"8bba576db54b"}

[09:38:34] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":49126444,"total":55799284},"progress":"[============================================\u003e      ]  49.13MB/55.8MB","id":"8bba576db54b"}

[09:38:34] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":50176918,"total":55799284},"progress":"[============================================\u003e      ]  50.18MB/55.8MB","id":"8bba576db54b"}

[09:38:35] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":50720768,"total":55799284},"progress":"[=============================================\u003e     ]  50.72MB/55.8MB","id":"8bba576db54b"}

[09:38:35] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":51810816,"total":55799284},"progress":"[==============================================\u003e    ]  51.81MB/55.8MB","id":"8bba576db54b"}

[09:38:35] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":52352512,"total":55799284},"progress":"[==============================================\u003e    ]  52.35MB/55.8MB","id":"8bba576db54b"}

[09:38:35] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":53437481,"total":55799284},"progress":"[===============================================\u003e   ]  53.44MB/55.8MB","id":"8bba576db54b"}

[09:38:35] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":54509847,"total":55799284},"progress":"[================================================\u003e  ]  54.51MB/55.8MB","id":"8bba576db54b"}

[09:38:35] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":55565982,"total":55799284},"progress":"[=================================================\u003e ]  55.57MB/55.8MB","id":"8bba576db54b"}

[09:38:35] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":56633344,"total":55799284},"progress":"[==================================================\u003e]  56.63MB","id":"8bba576db54b"}

[09:38:36] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":57160722,"total":55799284},"progress":"[==================================================\u003e]  57.16MB","id":"8bba576db54b"}

[09:38:36] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushing","progressDetail":{"current":57261056,"total":55799284},"progress":"[==================================================\u003e]  57.26MB","id":"8bba576db54b"}

[09:38:36] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"Pushed","progressDetail":{},"id":"8bba576db54b"}

[09:38:36] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"status":"1.1.8: digest: sha256:6a6855986377015328782b537fe61c4fccb2d2f06acc8a0953651729aa67e24a size: 1366"}

[09:38:36] [semantic-release] [@iteratec/semantic-release-docker] › ℹ  {"progressDetail":{},"aux":{"Tag":"1.1.8","Digest":"sha256:6a6855986377015328782b537fe61c4fccb2d2f06acc8a0953651729aa67e24a","Size":1366}}

[09:38:36] [semantic-release] › ✔  Completed step "publish" of plugin "@iteratec/semantic-release-docker"

TypeError: context.options.prepare.find is not a function

Hello.
Got this error when running this plugin:

Envrionment: Linux (GitHub Actions)
Node version: 10.16.3
Semantic Release version: 15.13.24

 + [email protected]
+ @iteratec/[email protected]
added 782 packages from 1038 contributors in 23.451s
[6:51:19 PM] [semantic-release] › ℹ  Running semantic-release version 15.13.24
[6:51:19 PM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/github"
[6:51:19 PM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@iteratec/semantic-release-docker"
[6:51:19 PM] [semantic-release] › ✔  Loaded plugin "analyzeCommits" from "@semantic-release/commit-analyzer"
[6:51:19 PM] [semantic-release] › ✔  Loaded plugin "generateNotes" from "@semantic-release/release-notes-generator"
[6:51:19 PM] [semantic-release] › ✔  Loaded plugin "prepare" from "@iteratec/semantic-release-docker"
[6:51:19 PM] [semantic-release] › ✔  Loaded plugin "publish" from "@iteratec/semantic-release-docker"
[6:51:19 PM] [semantic-release] › ✔  Loaded plugin "success" from "@semantic-release/github"
[6:51:19 PM] [semantic-release] › ✔  Loaded plugin "fail" from "@semantic-release/github"
[6:51:19 PM] [semantic-release] › ✔  Run automated release from branch master
[6:51:20 PM] [semantic-release] › ✔  Allowed to push to the Git repository
[6:51:20 PM] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "@semantic-release/github"
[6:51:20 PM] [semantic-release] [@semantic-release/github] › ℹ  Verify GitHub authentication
[6:51:20 PM] [semantic-release] › ✔  Completed step "verifyConditions" of plugin "@semantic-release/github"
[6:51:20 PM] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "@iteratec/semantic-release-docker"
[6:51:20 PM] [semantic-release] › ✖  Failed step "verifyConditions" of plugin "@iteratec/semantic-release-docker"
[6:51:20 PM] [semantic-release] › ✖  An error occurred while running semantic-release: { TypeError: context.options.prepare.find is not a function
    at verifyConditions (/opt/hostedtoolcache/node/10.16.3/x64/lib/node_modules/@iteratec/semantic-release-docker/verifyConditions/index.js:17:34)
    at validator (/opt/hostedtoolcache/node/10.16.3/x64/lib/node_modules/semantic-release/lib/plugins/normalize.js:34:30)
    at pReduce (/opt/hostedtoolcache/node/10.16.3/x64/lib/node_modules/semantic-release/lib/plugins/pipeline.js:37:40)
    at next (/opt/hostedtoolcache/node/10.16.3/x64/lib/node_modules/semantic-release/node_modules/p-reduce/index.js:17:9)
    at process._tickCallback (internal/process/next_tick.js:68:7) pluginName: '@iteratec/semantic-release-docker' }
{ AggregateError: 
    TypeError: context.options.prepare.find is not a function
        at verifyConditions (/opt/hostedtoolcache/node/10.16.3/x64/lib/node_modules/@iteratec/semantic-release-docker/verifyConditions/index.js:17:34)
        at validator (/opt/hostedtoolcache/node/10.16.3/x64/lib/node_modules/semantic-release/lib/plugins/normalize.js:34:30)
        at pReduce (/opt/hostedtoolcache/node/10.16.3/x64/lib/node_modules/semantic-release/lib/plugins/pipeline.js:37:40)
        at next (/opt/hostedtoolcache/node/10.16.3/x64/lib/node_modules/semantic-release/node_modules/p-reduce/index.js:17:9)
    at /opt/hostedtoolcache/node/10.16.3/x64/lib/node_modules/semantic-release/lib/plugins/pipeline.js:54:11
    at process._tickCallback (internal/process/next_tick.js:68:7) name: 'AggregateError' }

And my .releaserc configuration file:


{
  "plugins": [
    "@semantic-release/commit-analyzer",
    "@semantic-release/release-notes-generator", 
    "@semantic-release/github",
    "@iteratec/semantic-release-docker"
  ],
  "verifyConfig": ["@iteratec/semantic-release-docker"],
  "prepare": {
    "path": "@iteratec/semantic-release-docker",
    "imageName": "myimage",
    "respositoryName": "brpaz"
  },
  "publish": {
    "path": "@iteratec/semantic-release-docker"
  }
}

IMPROVE: Add new Option to NOT push the version tag

Add a configuration option to prevent the automatic push of the current version tag.
Instead just use the additionalTags

Draft:

...
 "prepare": {
    "path": "@iteratec/semantic-release-docker",
    "additionalTags": ["test", "demo"],
    "imageName": "my-image",
    "registryUrl": "my-private-registry:5678",
    "respositoryName": "my-repository",
    /* New optional parameter, default value: true */
    "pushVersionTag": false
  },
...

PS: I will provide a PR shortly.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.