This repository was archived by the owner on Apr 8, 2021. It is now read-only.
Commit 1282205 1 parent bb6b921 commit 1282205 Copy full SHA for 1282205
File tree 2 files changed +19
-0
lines changed
src/main/scala/net/cakesolutions
2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -191,6 +191,10 @@ Docker container version number may be specified at the SBT command line by sett
191
191
The following configuration settings can be modified in projects that enable this plugin:
192
192
* ` dockerRepository ` (set to the value of ` DOCKER_REPOSITORY ` or the project name) - used to define where the container
193
193
will be published
194
+
195
+ The following configuration settings can be modified in projects that enable this plugin:
196
+ * ` dockerPublishTags ` (empty by default) - allows extra tags to be added to the docker: publish other than
197
+ ` latest ` and ` version ` .
194
198
195
199
### SBT Tasks
196
200
Original file line number Diff line number Diff line change @@ -42,6 +42,12 @@ object CakeDockerPlugin extends AutoPlugin {
42
42
packageName in Docker := name.value,
43
43
maintainer in
Docker := " Cake Solutions <[email protected] >" ,
44
44
version in Docker := sys.props.get(" tag" ).getOrElse(version.value),
45
+ dockerPublishTags := Seq (),
46
+ dockerBuildOptions ++= {
47
+ val alias = dockerAlias.value
48
+ dockerPublishTags.value
49
+ .flatMap(tag => List (" -t" , alias.copy(tag = Some (tag)).versioned))
50
+ },
45
51
dockerCommands += {
46
52
val dockerArgList =
47
53
CakeBuildInfoKeys .generalInfo.value ++
@@ -101,4 +107,13 @@ object CakeDockerPluginKeys {
101
107
taskKey[Unit ](
102
108
" Runs `docker rmi -f <ids>` for the images associated to the scope"
103
109
)
110
+
111
+ /**
112
+ * Setting key defining extra tags that will be added to the
113
+ * dockerBuildOptions
114
+ */
115
+ val dockerPublishTags : SettingKey [Seq [String ]] =
116
+ settingKey[Seq [String ]](
117
+ " Extra tags to publish other than version and latest"
118
+ )
104
119
}
You can’t perform that action at this time.
0 commit comments