Skip to content

Commit

Permalink
update to copier template 4.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
gilesknap committed Nov 22, 2024
1 parent 4a7614a commit 348564c
Show file tree
Hide file tree
Showing 31 changed files with 59 additions and 205 deletions.
2 changes: 1 addition & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: 0.2.9
_commit: 4.0.3
_src_path: gh:epics-containers/services-template-helm
cluster_name: pollux
cluster_namespace: p46-beamline
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci_skip_checks
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
daq-nexus
38 changes: 36 additions & 2 deletions .github/workflows/ci_verify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,45 @@
# other future services that don't use ibek, we will need to add a standard
# entrypoint for validating the config folder mounted at /config.

ROOT=$(realpath $(dirname ${0})/../..)
HERE=$(realpath $(dirname ${0}))
ROOT=$(realpath ${HERE}/../..)
set -xe
rm -rf ${ROOT}/.ci_work/
mkdir -p ${ROOT}/.ci_work

# use docker if available else use podman
if ! docker version &>/dev/null; then docker=podman; else docker=docker; fi

for service in ${ROOT}/services/*
# copy the services to a temporary location to avoid dirtying the repo
cp -r ${ROOT}/services/* ${ROOT}/.ci_work/

for service in ${ROOT}/services/*/ # */ to skip files
do
### Lint each service chart and validate if schema given ###
service_name=$(basename $service)

# skip services appearing in ci_skip_checks
checks=${HERE}/ci_skip_checks
if [[ -f ${checks} ]] && grep -q ${service_name} ${checks}; then
echo "Skipping ${service_name}"
continue
fi

schema=$(cat ${service}/values.yaml | sed -rn 's/^# yaml-language-server: \$schema=(.*)/\1/p')
if [ -n "${schema}" ]; then
echo "{\"\$ref\": \"$schema\"}" > ${ROOT}/.ci_work/$service_name/values.schema.json
fi

$docker run --rm --entrypoint bash \
-v ${ROOT}/.ci_work:/services \
alpine/helm:3.14.3 \
-c "
helm dependency update /services/$service_name &&
helm lint /services/$service_name --strict --values /services/values.yaml &&
rm -rf /services/$service_name/charts
"

### Valiate each ioc config ###
# Skip if subfolder has no config to validate
if [ ! -f "${service}/config/ioc.yaml" ]; then
continue
Expand All @@ -40,4 +71,7 @@ do
cat ${runtime}/st.cmd

fi

done

rm -r ${ROOT}/.ci_work
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ venv*
**/Chart.lock
**/charts
**/*copy
.ci_work
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ type: application

dependencies:
- name: ioc-instance
version: 4.0.0
repository: "oci://ghcr.io/epics-containers"
version: 4.1.2
repository: "oci://ghcr.io/epics-containers"
File renamed without changes.
11 changes: 0 additions & 11 deletions services/.ioc_template/Chart.yaml

This file was deleted.

1 change: 1 addition & 0 deletions services/.ioc_template/Chart.yaml
4 changes: 2 additions & 2 deletions services/.ioc_template/config/ioc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# TODO replace above with the generic IOC schema this IOC is based on
ioc_name: "{{ _global.get_env('IOC_NAME') }}"

description: REPLACE WITH DESCRIPTION
description: REPLACE_WITH_DESCRIPTION

entities:
- type: epics.EpicsEnvSet
Expand All @@ -13,4 +13,4 @@ entities:
- type: devIocStats.iocAdminSoft
IOC: "{{ ioc_name | upper }}"

# - todo: Add more entities to make a meaningful IOC
# - todo: Add more entities to make a meaningful IOC
1 change: 1 addition & 0 deletions services/.ioc_template/templates
11 changes: 0 additions & 11 deletions services/bl46p-ea-dcam-01/Chart.yaml

This file was deleted.

1 change: 1 addition & 0 deletions services/bl46p-ea-dcam-01/Chart.yaml
1 change: 1 addition & 0 deletions services/bl46p-ea-dcam-01/templates
10 changes: 0 additions & 10 deletions services/bl46p-ea-dcam-01/templates/configmap.yaml

This file was deleted.

11 changes: 0 additions & 11 deletions services/bl46p-ea-dcam-02/Chart.yaml

This file was deleted.

1 change: 1 addition & 0 deletions services/bl46p-ea-dcam-02/Chart.yaml
1 change: 1 addition & 0 deletions services/bl46p-ea-dcam-02/templates
10 changes: 0 additions & 10 deletions services/bl46p-ea-dcam-02/templates/configmap.yaml

This file was deleted.

11 changes: 0 additions & 11 deletions services/bl46p-ea-panda-01/Chart.yaml

This file was deleted.

1 change: 1 addition & 0 deletions services/bl46p-ea-panda-01/Chart.yaml
1 change: 1 addition & 0 deletions services/bl46p-ea-panda-01/templates
10 changes: 0 additions & 10 deletions services/bl46p-ea-panda-01/templates/configmap.yaml

This file was deleted.

11 changes: 0 additions & 11 deletions services/bl46p-ea-test-01/Chart.yaml

This file was deleted.

1 change: 1 addition & 0 deletions services/bl46p-ea-test-01/Chart.yaml
1 change: 1 addition & 0 deletions services/bl46p-ea-test-01/templates
10 changes: 0 additions & 10 deletions services/bl46p-ea-test-01/templates/configmap.yaml

This file was deleted.

11 changes: 0 additions & 11 deletions services/bl46p-mo-ioc-01/Chart.yaml

This file was deleted.

1 change: 1 addition & 0 deletions services/bl46p-mo-ioc-01/Chart.yaml
1 change: 1 addition & 0 deletions services/bl46p-mo-ioc-01/templates
10 changes: 0 additions & 10 deletions services/bl46p-mo-ioc-01/templates/configmap.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion services/epics-opis/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ type: application

dependencies:
- name: epics-opis
version: 4.0.0
version: 4.1.2
repository: "oci://ghcr.io/epics-containers"
4 changes: 2 additions & 2 deletions services/epics-pvcs/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ type: application

dependencies:
- name: epics-pvcs
version: 4.0.0
repository: "oci://ghcr.io/epics-containers"
version: 4.1.2
repository: "oci://ghcr.io/epics-containers"
26 changes: 0 additions & 26 deletions services/p46-ea-test-01/config/ioc.db

This file was deleted.

22 changes: 0 additions & 22 deletions services/p46-ea-test-01/config/ioc.yaml

This file was deleted.

1 change: 1 addition & 0 deletions services/p46-ea-test-01/templates
10 changes: 0 additions & 10 deletions services/p46-ea-test-01/templates/configmap.yaml

This file was deleted.

21 changes: 0 additions & 21 deletions services/p46-ea-test-01/values.yaml

This file was deleted.

0 comments on commit 348564c

Please sign in to comment.