Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions technologies/job/powershell/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM mcr.microsoft.com/powershell:ubuntu-22.04

ENV POWERSHELL_TELEMETRY_OPTOUT="1"

COPY resources/entrypoint.sh /entrypoint.sh
RUN chmod 755 /entrypoint.sh

WORKDIR /sandbox

CMD ["/bin/bash", "-c", "/entrypoint.sh"]
9 changes: 9 additions & 0 deletions technologies/job/powershell/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Powershell

PowerShell is a task automation and configuration management program from Microsoft,
consisting of a command-line shell and the associated scripting language.

## Usage

Inside this image, the default shell used is sh. You can use the `pwsh` command to run PowerShell scripts.
If a zip is uploaded, it will be automatically extracted and you can use the `pwsh` command to run your script directly.
30 changes: 30 additions & 0 deletions technologies/job/powershell/metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
version: "v1"
type: JOB
id: powershell
label: Powershell
description: Powershell description
available: true
iconPath: powershell.png
contexts:
- id: powershell
label: powershell
available: true
recommended: true
trustLevel: experimental
job:
features:
- type: COMMAND_LINE
label: Command line
mandatory: true
comment: powershell
defaultValue: pwsh {file}
- type: ARTIFACT
label: Powershell script to execute
mandatory: false
comment: "Compatible upload file : powershell executable file or zip folder"
- type: SCHEDULER
label: Scheduled
mandatory: true
dockerInfo:
image: saagie/powershell
version: ubuntu-22.04
Binary file added technologies/job/powershell/powershell.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions technologies/job/powershell/resources/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash
set -euo pipefail

if compgen -G "*.zip*" > /dev/null;
then
echo "Zip file detected ... unzipping ..."
unzip -q *.zip
fi

if test -f main_script;
then sh ./main_script;
else exec "$@"
fi;
6 changes: 3 additions & 3 deletions version.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version.buildmeta=
version.buildmeta=feature/powershell
version.major=0
version.minor=95
version.patch=0
version.prerelease=
version.semver=0.95.0
version.prerelease=BETA
version.semver=0.95.0-BETA+feature/powershell
Loading