Field Note

Field Notes of April 8th, 2024

dicom imaging nushell environment-export gitlab-ci-cd reference
Posted on Monday, April the 8th 2024
1 min read

Viewing DICOM medical imaging files in macOS

Download the Horos app. E.g. using brew:

brew update && brew install --cask horos

Exporting local environment modifications in Nushell

By prefixing a function with --env, the local changes to the environment are exported outside of the function context:

$ def --env foo [] { $env.BAR = "BAZ" } 
$ foo
$ $env.BAR
BAZ

Refactoring rule conditions in GitLab CI/CD using the custom !reference tag

E.g. potential useful to merge common and specialized rules:

.common_rules: 
  if_on_main: '$CI_COMMIT_BRANCH == "main"' # Only run on "main"

deploy_to_prod:
  script:
    - echo "Deploying to PROD!"
  rules:
    - if: !reference [.common_rules, if_on_main]
      when: manual
Referencing also works with rules defined in external YAML files included using the include directive.
friedrichkurz.me

© 2025 Friedrich Kurz

Privacy Policy