@codedependant/semantic-release-docker 4.1.0 → 4.2.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/CHANGELOG.md +19 -0
- package/README.md +11 -10
- package/lib/build-config.js +2 -0
- package/lib/docker/image.js +7 -0
- package/lib/prepare.js +1 -0
- package/lib/verify.js +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Semantic Release Docker
|
|
2
2
|
|
|
3
|
+
# [4.2.0](https://github.com/esatterwhite/semantic-release-docker/compare/v4.1.0...v4.2.0) (2022-12-19)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Chores
|
|
7
|
+
|
|
8
|
+
* **ci**: downgrade github actions runner version [c6f1935](https://github.com/esatterwhite/semantic-release-docker/commit/c6f1935aec63e21a85c8e513dd74fed29a84562b) - Eric Satterwhite
|
|
9
|
+
* **test**: regenerate the local docker registry certs [4cfa6e2](https://github.com/esatterwhite/semantic-release-docker/commit/4cfa6e2a912b69ff3cfc496b88dae449a982e5f4) - Eric Satterwhite
|
|
10
|
+
* **test**: remove ci test temporarily [c28f199](https://github.com/esatterwhite/semantic-release-docker/commit/c28f199ab3d2e9bb85846e562c936c782f9440a5) - Eric Satterwhite
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Documentation
|
|
14
|
+
|
|
15
|
+
* fix broken table in readme [e85e6f3](https://github.com/esatterwhite/semantic-release-docker/commit/e85e6f38f48e3c11ef88953e0cfa74276aab09a6) - Eric Satterwhite
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* added dockerNetwork config option [d6f2def](https://github.com/esatterwhite/semantic-release-docker/commit/d6f2defa0a4cfa3a36b1b63e7cdfe13c700e632a) - Eric Satterwhite, closes: [#29](https://github.com/esatterwhite/semantic-release-docker/issues/29)
|
|
21
|
+
|
|
3
22
|
# [4.1.0](https://github.com/esatterwhite/semantic-release-docker/compare/v4.0.0...v4.1.0) (2022-04-10)
|
|
4
23
|
|
|
5
24
|
|
package/README.md
CHANGED
|
@@ -54,6 +54,7 @@ omitted, it is assumed the docker daemon is already authenticated with the targe
|
|
|
54
54
|
| `dockerArgs` | _Optional_. Include additional values for docker's `build-arg`. Supports templating | |
|
|
55
55
|
| `dockerPublish` | _Optional_. Automatically push image tags during the publish phase. | `true` |
|
|
56
56
|
| `dockerVerifyCmd` | _Optional_. If specified, during the verify stage, the specified command will execute in a container of the build image. If the command errors, the release will fail. | `false` |
|
|
57
|
+
| `dockerNetwork` | _Optional_. Specify the Docker network to use while the image is building. | `default` |
|
|
57
58
|
|
|
58
59
|
### Build Arguments
|
|
59
60
|
|
|
@@ -63,16 +64,16 @@ build argument is explicitly `true`, the value will be omitted and the value fro
|
|
|
63
64
|
a matching environment variable will be utilized instead. This can be useful when trying to include
|
|
64
65
|
secrets and other sensitive information
|
|
65
66
|
|
|
66
|
-
| Argument Name | Description
|
|
67
|
-
|
|
68
|
-
| `SRC_DIRECTORY` | The of the directory the build was triggered from
|
|
67
|
+
| Argument Name | Description | Default |
|
|
68
|
+
|---------------------|-------------------------------------------------------------------------------------------|------------------------------|
|
|
69
|
+
| `SRC_DIRECTORY` | The of the directory the build was triggered from | The directory name of CWD |
|
|
69
70
|
| `TARGET_PATH` | Path relative to the execution root. Useful for Sharing a Single Docker file in monorepos | |
|
|
70
|
-
| `NPM_PACKAGE_NAME` | The `name` property extracted from `package.json` - if present
|
|
71
|
-
| `NPM_PACKAGE_SCOPE` | The parsed scope from the `name` property from `package.json` - sans `@`
|
|
72
|
-
| `CONFIG_NAME` | The configured name of the docker image.
|
|
73
|
-
| `CONFIG_PROJECT` | The configured docker repo project name
|
|
74
|
-
| `GIT_SHA` | The commit SHA of the current release
|
|
75
|
-
| `GIT_TAG` | The git tag of the current release
|
|
71
|
+
| `NPM_PACKAGE_NAME` | The `name` property extracted from `package.json` - if present | |
|
|
72
|
+
| `NPM_PACKAGE_SCOPE` | The parsed scope from the `name` property from `package.json` - sans `@` | |
|
|
73
|
+
| `CONFIG_NAME` | The configured name of the docker image. | The parsed package name |
|
|
74
|
+
| `CONFIG_PROJECT` | The configured docker repo project name | The package scope if present |
|
|
75
|
+
| `GIT_SHA` | The commit SHA of the current release | |
|
|
76
|
+
| `GIT_TAG` | The git tag of the current release | |
|
|
76
77
|
|
|
77
78
|
### Template Variables
|
|
78
79
|
|
|
@@ -208,7 +209,7 @@ the default docker image tags for the 1.0.0 release would be `1.0.0`, `1-latest`
|
|
|
208
209
|
}
|
|
209
210
|
```
|
|
210
211
|
|
|
211
|
-
the docker tags for version `1.2.3` will be `1.2.3`, `1.2-latest`, `1-latest` and `latest`
|
|
212
|
+
the docker tags for version `1.2.3` will be `1.2.3`, `1.2-latest`, `1-latest` and `latest`
|
|
212
213
|
the docker tags for version `2.3.4-beta.6` will be `2.3.4-beta.6`, `2.3-beta`, `2-beta` and `beta`
|
|
213
214
|
|
|
214
215
|
## Development
|
package/lib/build-config.js
CHANGED
|
@@ -21,6 +21,7 @@ async function buildConfig(build_id, config, context) {
|
|
|
21
21
|
, dockerPublish: publish = true
|
|
22
22
|
, dockerContext = '.'
|
|
23
23
|
, dockerVerifyCmd: verifycmd = null
|
|
24
|
+
, dockerNetwork: network = 'default'
|
|
24
25
|
} = config
|
|
25
26
|
|
|
26
27
|
let name = null
|
|
@@ -62,5 +63,6 @@ async function buildConfig(build_id, config, context) {
|
|
|
62
63
|
, login: login
|
|
63
64
|
, env: context.env
|
|
64
65
|
, context: dockerContext
|
|
66
|
+
, network: network
|
|
65
67
|
}
|
|
66
68
|
}
|
package/lib/docker/image.js
CHANGED
|
@@ -16,6 +16,7 @@ class Image {
|
|
|
16
16
|
, dockerfile = 'Dockerfile'
|
|
17
17
|
, cwd = process.cwd()
|
|
18
18
|
, context = '.'
|
|
19
|
+
, network = 'default'
|
|
19
20
|
} = opts || {}
|
|
20
21
|
|
|
21
22
|
if (!name || typeof name !== 'string') {
|
|
@@ -33,6 +34,7 @@ class Image {
|
|
|
33
34
|
, dockerfile: dockerfile
|
|
34
35
|
, context: context
|
|
35
36
|
, cwd: cwd
|
|
37
|
+
, network: network
|
|
36
38
|
}
|
|
37
39
|
}
|
|
38
40
|
|
|
@@ -66,6 +68,10 @@ class Image {
|
|
|
66
68
|
return path.resolve(this.opts.cwd, this.opts.dockerfile)
|
|
67
69
|
}
|
|
68
70
|
|
|
71
|
+
get network() {
|
|
72
|
+
return this.opts.network
|
|
73
|
+
}
|
|
74
|
+
|
|
69
75
|
arg(key, val) {
|
|
70
76
|
this.opts.args.set(key, val)
|
|
71
77
|
return this
|
|
@@ -82,6 +88,7 @@ class Image {
|
|
|
82
88
|
}
|
|
83
89
|
return [
|
|
84
90
|
'build'
|
|
91
|
+
, `--network=${this.network}`
|
|
85
92
|
, '--quiet'
|
|
86
93
|
, '--tag'
|
|
87
94
|
, this.name
|
package/lib/prepare.js
CHANGED
package/lib/verify.js
CHANGED