Skip to content

Commit c9919c3

Browse files
committed
MILAB-5374: add docker-only entrypoint, add binary 'true' for tests
1 parent 5548c72 commit c9919c3

File tree

6 files changed

+63
-7
lines changed

6 files changed

+63
-7
lines changed

.changeset/fuzzy-peaches-laugh.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@platforma-open/milaboratories.software-test-utils.docker-images": minor
3+
"@platforma-open/milaboratories.software-test-utils": minor
4+
---
5+
6+
Separate docker-only entrypoint

catalogue-tests/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@
3838
"read-file-to-stdout-with-sleep": {
3939
"reference": "@platforma-open/milaboratories.software-test-utils.read-with-sleep/dist/tengo/software/main.sw.json"
4040
},
41+
"docker-only": {
42+
"reference": "@platforma-open/milaboratories.software-test-utils.docker-images/dist/tengo/software/docker-only.sw.json"
43+
},
4144
"docker-true-ep": {
4245
"reference": "@platforma-open/milaboratories.software-test-utils.docker-images/dist/tengo/software/always-true-ep.sw.json"
4346
},

pnpm-lock.yaml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ packages:
77
#
88
# Utility functions for tests
99
#
10-
- test-utils/read-with-sleep
11-
- test-utils/hello-world
10+
- test-utils/docker-images
1211
- test-utils/guided-command
13-
- test-utils/runenv-java-stub
12+
- test-utils/hello-world
13+
- test-utils/hello-world-py
1414
- test-utils/java-stub
15-
- test-utils/runenv-python-stub
1615
- test-utils/python-stub
17-
- test-utils/hello-world-py
18-
- test-utils/docker-images
16+
- test-utils/read-with-sleep
17+
- test-utils/runenv-java-stub
18+
- test-utils/runenv-python-stub
1919

2020
#
2121
# Production CLI instruments for use in workflows

test-utils/docker-images/package.json

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,43 @@
44
"description": "Collection of special docker images for testing purposes",
55
"scripts": {
66
"cleanup": "rm -rf ./pkg-*.tgz && rm -rf ./build/ && rm -rf ./dist/",
7-
"build": "pl-pkg build --docker-build",
7+
"build": "../../scripts/build.sh './true.go' 'true' && pl-pkg build --all-platforms --docker-build",
88
"prepublishOnly": "pl-pkg prepublish"
99
},
1010
"block-software": {
11+
"artifacts": {
12+
"true": {
13+
"registry": "platforma-open",
14+
"type": "binary",
15+
"roots": {
16+
"linux-x64": "./build/linux-x64/",
17+
"linux-aarch64": "./build/linux-aarch64/",
18+
"macosx-x64": "./build/macosx-x64/",
19+
"macosx-aarch64": "./build/macosx-aarch64/",
20+
"windows-x64": "./build/windows-x64/"
21+
}
22+
}
23+
},
1124
"entrypoints": {
25+
"docker-only": {
26+
"docker": {
27+
"artifact": {
28+
"type": "docker",
29+
"dockerfile": "Dockerfile-busybox",
30+
"context": "./src/"
31+
},
32+
"cmd": [
33+
"// this software has only docker distribution, no binary archive"
34+
]
35+
}
36+
},
1237
"always-true-ep": {
38+
"binary": {
39+
"artifact": "true",
40+
"cmd": [
41+
"{pkg}/true"
42+
]
43+
},
1344
"docker": {
1445
"artifact": {
1546
"type": "docker",
@@ -22,6 +53,12 @@
2253
}
2354
},
2455
"always-true-cmd": {
56+
"binary": {
57+
"artifact": "true",
58+
"cmd": [
59+
"{pkg}/true"
60+
]
61+
},
2562
"docker": {
2663
"artifact": {
2764
"type": "docker",

test-utils/docker-images/true.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package main
2+
3+
import (
4+
"os"
5+
)
6+
7+
func main() {
8+
os.Exit(0)
9+
}

0 commit comments

Comments
 (0)