Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/ioc boot #18

Merged
merged 9 commits into from
Nov 4, 2021
Merged

Feature/ioc boot #18

merged 9 commits into from
Nov 4, 2021

Conversation

BenBradnick
Copy link
Member

This PR contains a set of small changes based on generating the ioc boot script:

  1. Update docs to reflect ibek build-helm no longer needs a schema arg
  2. Added 2 elements to the IOC boot script - environment variables and pos iocInit entries. An epics.ibek.yaml file was created with entities which have entries for these new elements, as well as a test for generating a boot script containing them
  3. Tidied up the existing ioc boot Jinja template to remove duplicates and improve spacing
  4. Fixed test in test_cli for building IOC against multiple support module definition files

@BenBradnick BenBradnick requested a review from gilesknap October 25, 2021 13:58
Copy link
Member

@gilesknap gilesknap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great.

tests/samples/yaml/epics.ibek.yaml Show resolved Hide resolved
@@ -0,0 +1,31 @@
# yaml-language-server: $schema=file://schemas/ibek.schema.json
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like epics.ibek.yaml.

There are probably other things that would go in here I'm guessing.

epicsEnvSet "EPICS_TS_MIN_WEST", '0'
cd "$(TOP)"
{% if env_var_elements %}
{{ env_var_elements -}}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've never seen this syntax before, what does it do?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's syntax for control structures, in this case I just check to see if env_var_elements is defined - https://jinja.palletsprojects.com/en/3.0.x/templates/#list-of-control-structures

This was just to keep the boot script tidy, as I found it difficult to control new lines with optional elements.

tests/samples/yaml/epics.ibek.yaml Outdated Show resolved Hide resolved
@BenBradnick BenBradnick merged commit aa3c972 into master Nov 4, 2021
@BenBradnick BenBradnick deleted the feature/ioc-boot branch November 4, 2021 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants