Skip to content

ALOps Docker Exec

Execute a PowerShell script inside a Business Central Docker container.

Property Value
Task name (Azure DevOps) ALOpsDockerExec@3
Action name (GitHub) alops-dockerexec
Version 3.0.0
Category Utility
OS requirement Both
Preview yes

Execute a PowerShell script inside a running Business Central Docker container. Supports inline scripts, file paths, workspace folder search, and URL downloads. BC management DLLs are automatically loaded before the user script runs.

Inputs

container

Name Type Required Default Platform Description
fixed_tag Text no (empty) Both Fixed container label. When set, the container is identified by this value instead of the build ID.

script

Name Type Required Default Platform Description
scriptsource PickList no InLine Both How to provide the script to execute. InLine: enter script text directly. Path: absolute or relative file path. Workfolder: search workspace recursively. Download: fetch from URL. Options: InLine, Path, Workfolder, Download.
script_location Text no (empty) Both File path (for Path/Workfolder) or URL (for Download) of the script to execute.
inline_script MultiLine no Write-Host 'Hello World' Both PowerShell script to execute inside the container.

Usage

- task: ALOpsDockerExec@3
  displayName: 'ALOps Docker Exec'
  inputs:
    fixed_tag:                               # Fixed container label. When set, the container is identified by this value instead of the build ID. $(fixed_tag)
    scriptsource: InLine                     # How to provide the script to execute. InLine: enter script text directly. Path: absolute or relative file path. Workfolder: search workspace recursively. Download: fetch from URL. $(scriptsource)
    script_location:                         # File path (for Path/Workfolder) or URL (for Download) of the script to execute. $(script_location)
    inline_script: Write-Host 'Hello World'  # PowerShell script to execute inside the container. $(inline_script)
- name: ALOps Docker Exec
  uses: HodorNV/ALOps-V3/alops-dockerexec@v3   <!-- TODO: confirm action repo path -->
  with:
    fixed_tag: ''
    scriptsource: 'InLine'
    script_location: ''
    inline_script: 'Write-Host 'Hello World''