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

add share/bin to env path #6242

Merged
merged 2 commits into from
Jul 18, 2024
Merged

Conversation

dwsutherland
Copy link
Member

@dwsutherland dwsutherland commented Jul 17, 2024

closes #6240

Test case:

(flow) sutherlander@cortex-vbox:share-bin$ ls
flow.cylc  share-src
(flow) sutherlander@cortex-vbox:share-bin$ cat share-src/bin/hello.sh 
#!/bin/bash

echo 'Hello! handler activated!'
touch ${CYLC_WORKFLOW_SHARE_DIR}/handler_activated
[meta]
    title = "Test calling a handler from share/bin"
[scheduling]
    cycling mode = integer
    initial cycle point = 1
    [[graph]]
        R1 = "foo => bar"
[runtime]
    [[root]]
        pre-script = sleep 10
        [[[events]]]
            handlers = hello.sh
            handler events = succeeded
    [[foo]]
        script = """
rm -rf ${CYLC_WORKFLOW_SHARE_DIR}/bin
cp -rf ${CYLC_WORKFLOW_RUN_DIR}/share-src/bin ${CYLC_WORKFLOW_SHARE_DIR}/
chmod 0755 ${CYLC_WORKFLOW_SHARE_DIR}/bin/*
"""
    [[bar]]
        script = """
if ! [[ -f ${CYLC_WORKFLOW_SHARE_DIR}/handler_activated ]]; then
    false
fi
"""

Check List

  • I have read CONTRIBUTING.md and added my name as a Code Contributor.
  • Contains logically grouped changes (else tidy your branch by rebase).
  • Does not contain off-topic changes (use other PRs for other changes).
  • Applied any dependency changes to both setup.cfg (and conda-environment.yml if present).
  • Already covered.
  • Changelog entry included if this is a change that can affect users
  • Cylc-Doc pull request opened if required at cylc/cylc-doc/pull/XXXX.
  • If this is a bug fix, PR should be raised against the relevant ?.?.x branch.

@dwsutherland dwsutherland added this to the 8.3.x milestone Jul 17, 2024
@dwsutherland dwsutherland self-assigned this Jul 17, 2024
@dwsutherland dwsutherland modified the milestones: 8.3.x, 8.3.3 Jul 17, 2024
cylc/flow/config.py Outdated Show resolved Hide resolved
@hjoliver
Copy link
Member

hjoliver commented Jul 18, 2024

This should probably have a change log entry... then I'll merge it.

@dwsutherland
Copy link
Member Author

This should probably have a change log entry... then I'll merge it.

Done. Let me know if you'd like it reworded.

@hjoliver hjoliver merged commit 3a05466 into cylc:8.3.x Jul 18, 2024
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants