forked from LaconicNetwork/kompose
Adding save command to annotation
This command will add `kompose command` used to generate artifacts as well as `kompose version`,
for ex,
```
metadata:
annotations:
kompose.cmd: kompose convert -f /home/snarwade --stdout
kompose.version: 1.0.0 (HEAD)
```
For functional test, Now each test has template like,
```
"annotations": {
"kompose.cmd": "%CMD%",
"kompose.version": "%VERSION%"
```
Because, for every machine these values will be different.
Updated functional test with new annotations
This commit is contained in:
@@ -0,0 +1,81 @@
|
||||
{
|
||||
"kind": "List",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {},
|
||||
"items": [
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "client",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "client"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.cmd": "%CMD%",
|
||||
"kompose.version": "%VERSION%"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "1337",
|
||||
"port": 1337,
|
||||
"targetPort": 1337
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "client"
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "Deployment",
|
||||
"apiVersion": "extensions/v1beta1",
|
||||
"metadata": {
|
||||
"name": "client",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "client"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.cmd": "%CMD%",
|
||||
"kompose.version": "%VERSION%"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"replicas": 1,
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "client"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "client",
|
||||
"image": "registry.centos.org/centos/centos:7",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 1337
|
||||
}
|
||||
],
|
||||
"resources": {},
|
||||
"tty": true
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
},
|
||||
"strategy": {}
|
||||
},
|
||||
"status": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -11,6 +11,10 @@
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "client"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.cmd": "kompose -f /home/snarwade/go/src/github.com/kubernetes/kompose/script/test/fixtures/tty-true/docker-compose.yml convert --stdout -j",
|
||||
"kompose.version": "1.0.0 (HEAD)"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
@@ -37,6 +41,10 @@
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "client"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.cmd": "kompose -f /home/snarwade/go/src/github.com/kubernetes/kompose/script/test/fixtures/tty-true/docker-compose.yml convert --stdout -j",
|
||||
"kompose.version": "1.0.0 (HEAD)"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
|
||||
@@ -11,6 +11,10 @@
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "client"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.cmd": "kompose --provider openshift -f /home/snarwade/go/src/github.com/kubernetes/kompose/script/test/fixtures/tty-true/docker-compose.yml convert --stdout -j",
|
||||
"kompose.version": "1.0.0 (HEAD)"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
@@ -37,6 +41,10 @@
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "client"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.cmd": "kompose --provider openshift -f /home/snarwade/go/src/github.com/kubernetes/kompose/script/test/fixtures/tty-true/docker-compose.yml convert --stdout -j",
|
||||
"kompose.version": "1.0.0 (HEAD)"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
|
||||
@@ -0,0 +1,133 @@
|
||||
{
|
||||
"kind": "List",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {},
|
||||
"items": [
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "client",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "client"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.cmd": "%CMD%",
|
||||
"kompose.version": "%VERSION%"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "1337",
|
||||
"port": 1337,
|
||||
"targetPort": 1337
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "client"
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "DeploymentConfig",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "client",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "client"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.cmd": "%CMD%",
|
||||
"kompose.version": "%VERSION%"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"strategy": {
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": [
|
||||
{
|
||||
"type": "ConfigChange"
|
||||
},
|
||||
{
|
||||
"type": "ImageChange",
|
||||
"imageChangeParams": {
|
||||
"automatic": true,
|
||||
"containerNames": [
|
||||
"client"
|
||||
],
|
||||
"from": {
|
||||
"kind": "ImageStreamTag",
|
||||
"name": "client:7"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
"io.kompose.service": "client"
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "client"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "client",
|
||||
"image": " ",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 1337
|
||||
}
|
||||
],
|
||||
"resources": {},
|
||||
"tty": true
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "ImageStream",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "client",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "client"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"tags": [
|
||||
{
|
||||
"name": "7",
|
||||
"annotations": null,
|
||||
"from": {
|
||||
"kind": "DockerImage",
|
||||
"name": "registry.centos.org/centos/centos:7"
|
||||
},
|
||||
"generation": null,
|
||||
"importPolicy": {}
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"dockerImageRepository": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user