@toa.io/operations 0.20.0-dev.11 → 0.20.0-dev.13
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/package.json +5 -5
- package/readme.md +14 -2
- package/src/deployment/.deployment/describe.js +2 -0
- package/src/deployment/chart/templates/compositions.yaml +4 -0
- package/src/deployment/chart/values.yaml +1 -0
- package/src/deployment/images/composition.Dockerfile +3 -3
- package/src/deployment/images/service.Dockerfile +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toa.io/operations",
|
|
3
|
-
"version": "0.20.0-dev.
|
|
3
|
+
"version": "0.20.0-dev.13",
|
|
4
4
|
"description": "Toa Deployment",
|
|
5
5
|
"homepage": "https://toa.io",
|
|
6
6
|
"author": {
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"test": "echo \"Error: run tests from root\" && exit 1"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@toa.io/filesystem": "0.20.0-dev.
|
|
30
|
-
"@toa.io/generic": "0.20.0-dev.
|
|
31
|
-
"@toa.io/yaml": "0.20.0-dev.
|
|
29
|
+
"@toa.io/filesystem": "0.20.0-dev.13",
|
|
30
|
+
"@toa.io/generic": "0.20.0-dev.13",
|
|
31
|
+
"@toa.io/yaml": "0.20.0-dev.13",
|
|
32
32
|
"execa": "5.1.1"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "73a02a4a471d9c62d2437df1065fc037b7eb7279"
|
|
35
35
|
}
|
package/readme.md
CHANGED
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
|
|
12
12
|
registry:
|
|
13
13
|
build:
|
|
14
|
-
arguments: [
|
|
15
|
-
run:
|
|
14
|
+
arguments: [GITHUB_TOKEN]
|
|
15
|
+
run: npm config set //npm.pkg.github.com/:_authToken ${GITHUB_TOKEN}
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
`arguments` is a list of environemt varialbes to be passed to `docker build`.
|
|
@@ -28,3 +28,15 @@ registry:
|
|
|
28
28
|
echo test > .test
|
|
29
29
|
rm .test
|
|
30
30
|
```
|
|
31
|
+
|
|
32
|
+
#### Registry Credentials
|
|
33
|
+
|
|
34
|
+
When using private container registry,
|
|
35
|
+
a secret containing required credentials can be specified using `registry.credentials` option.
|
|
36
|
+
|
|
37
|
+
```yaml
|
|
38
|
+
# context.toa.yaml
|
|
39
|
+
|
|
40
|
+
registry:
|
|
41
|
+
credentials: docker-credentials-secret-name
|
|
42
|
+
```
|
|
@@ -14,6 +14,7 @@ const describe = (context, compositions, dependency) => {
|
|
|
14
14
|
const components = get.components(compositions)
|
|
15
15
|
const dependencies = get.dependencies(references)
|
|
16
16
|
const variables = get.variables(context, dependency.variables)
|
|
17
|
+
const credentials = context.registry.credentials
|
|
17
18
|
|
|
18
19
|
return {
|
|
19
20
|
compositions,
|
|
@@ -21,6 +22,7 @@ const describe = (context, compositions, dependency) => {
|
|
|
21
22
|
services,
|
|
22
23
|
proxies,
|
|
23
24
|
variables,
|
|
25
|
+
credentials,
|
|
24
26
|
...dependencies
|
|
25
27
|
}
|
|
26
28
|
}
|
|
@@ -3,8 +3,8 @@ FROM node:18.16.0-alpine3.17
|
|
|
3
3
|
{{build.arguments}}
|
|
4
4
|
|
|
5
5
|
ENV NODE_ENV=production
|
|
6
|
-
RUN if [ {{runtime.registry}} !=
|
|
7
|
-
RUN if [ {{runtime.proxy}} !=
|
|
6
|
+
RUN if [ "{{runtime.registry}}" != "" ]; then npm set registry {{runtime.registry}}; fi
|
|
7
|
+
RUN if [ "{{runtime.proxy}}" != "" ]; then npm set proxy {{runtime.proxy}}; fi
|
|
8
8
|
RUN npm i -g @toa.io/runtime@{{runtime.version}} --omit=dev
|
|
9
9
|
|
|
10
10
|
WORKDIR /composition
|
|
@@ -13,7 +13,7 @@ COPY --chown=node:node . /composition
|
|
|
13
13
|
{{build.run}}
|
|
14
14
|
|
|
15
15
|
# run 'npm i' in each component
|
|
16
|
-
RUN
|
|
16
|
+
RUN for entry in *; do if [ -f "$entry/package.json" ]; then (cd $entry && npm i --omit=dev); fi; done
|
|
17
17
|
|
|
18
18
|
USER node
|
|
19
19
|
CMD toa compose *
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
FROM node:18.16.0-alpine3.17
|
|
2
2
|
|
|
3
3
|
ENV NODE_ENV=production
|
|
4
|
-
RUN if [ {{runtime.registry}} !=
|
|
5
|
-
RUN if [ {{runtime.proxy}} !=
|
|
4
|
+
RUN if [ "{{runtime.registry}}" != "" ]; then npm set registry {{runtime.registry}}; fi
|
|
5
|
+
RUN if [ "{{runtime.proxy}}" != "" ]; then npm set proxy {{runtime.proxy}}; fi
|
|
6
6
|
RUN npm i -g @toa.io/runtime@{{runtime.version}} --omit=dev
|
|
7
7
|
|
|
8
8
|
WORKDIR /service
|