Skip to content

Commit

Permalink
Catch up latest master: search-api (#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
minottic authored Oct 26, 2022
1 parent e3ae287 commit 8280b63
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 1 deletion.
31 changes: 31 additions & 0 deletions .github/workflows/scicat-search-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,46 @@ jobs:
submodule_commit: ${{ github.event.inputs.submodule_commit }}
submodule: search-api

set_ci_vars:
if: (needs.check_changed.outputs.changed == 'true' && !needs.set_env.outputs.component) || needs.set_env.outputs.component == 'sa'
runs-on: ubuntu-latest
needs:
- check_changed
- set_env
outputs:
ciVars: ${{ steps.helm_vars.outputs.ciVars }}

steps:

- name: Checkout repository
uses: actions/checkout@v2
with:
submodules: recursive
ref: ${{ needs.set_env.outputs.commit }}

- name: Set helm vars
id: helm_vars
run: |
ciVars=$(cat <<EOF
{
"CONFIG": $(jq -R -s < helm_configs/search-api/config.json),
"COMPONENT_CONFIG": $(jq -R -s < helm_configs/search-api/component-config.json),
}
EOF
)
echo "::set-output name=ciVars::$(echo $ciVars)"
build_deploy_scicat_search_api:
if: (needs.check_changed.outputs.changed == 'true' && !needs.set_env.outputs.component) || needs.set_env.outputs.component == 'sa'
needs:
- check_changed
- set_env
- set_ci_vars
uses: ./.github/workflows/reusable.build-deploy.yml
with:
context: search-api/.
image_name: ${{ github.repository }}/search-api
helm_ci_vars: ${{ needs.set_ci_vars.outputs.ciVars }}
release_name: search-api
tag: ${{ needs.set_env.outputs.tag }}
environment: ${{ needs.set_env.outputs.environment }}
Expand Down
6 changes: 6 additions & 0 deletions helm_configs/search-api/component-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"loopback-component-explorer": {
"mountPath": "/panosc-explorer",
"generateOperationScopedModels": true
}
}
22 changes: 22 additions & 0 deletions helm_configs/search-api/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"restApiRoot": "/panosc-api",
"host": "0.0.0.0",
"port": 3000,
"remoting": {
"context": false,
"rest": {
"handleErrors": true,
"normalizeHttpPath": false,
"xml": false
},
"json": {
"strict": false,
"limit": "100kb"
},
"urlencoded": {
"extended": true,
"limit": "100kb"
},
"cors": false
}
}
18 changes: 18 additions & 0 deletions helm_configs/search-api/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,21 @@ env:
value: "false"
- name: PSS_BASE_URL
value: "{{ .Values.pssBaseUrl }}"

configMaps:
"{{ .Release.Name }}-cm":
config.json: "{{ .Values.ciVars.CONFIG }}"
component-config.json: "{{ .Values.ciVars.COMPONENT_CONFIG }}"

volumes:
- name: config-volume
configMap:
name: "{{ .Release.Name }}-cm"

volumeMounts:
- name: config-volume
mountPath: /home/node/app/server/config.json
subPath: config.json
- name: config-volume
mountPath: /home/node/app/server/component-config.json
subPath: component-config.json

0 comments on commit 8280b63

Please sign in to comment.