Skip to content

Commit

Permalink
Merge pull request #39 from lorengordon/patch/salt-python-requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
lorengordon authored Feb 23, 2024
2 parents db7ce07 + 276d98b commit 2cd3620
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.4.1
current_version = 1.5.0
commit = True
message = Bumps version to {new_version}
tag = False
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/test-salt-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ on:
description: Space-separated list of paths to requirements files installed by yum, `salt-os-version` is templated as `{0}`
default: ./tests/requirements.txt ./tests/requirements-el{0}.txt
type: string
salt-python-requirements-files:
description: Space-separated list of paths to python requirements files installed by salt-pip, `salt-os-version` is templated as `{0}`
default: ''
type: string

defaults:
run:
Expand Down Expand Up @@ -56,6 +60,14 @@ jobs:
- run: salt-call --versions-report

# Install salt python requirements
- if: inputs.salt-python-requirements-files
run: >
mapfile -t PYTHON_REQUIREMENTS < <(echo ${{ format(inputs.salt-python-requirements-files, inputs.salt-os-version) }}) &&
for FILE in "${PYTHON_REQUIREMENTS[@]}"; do
salt-pip install -r "$FILE";
done
- run: >-
salt-call --local --retcode-passthrough
--file-root=${{ github.workspace }} --pillar-root=${{ inputs.salt-pillar-root }}
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/test-salt-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ on:
description: Base url to search for the salt version; `salt-version` is appended to this url
default: https://repo.saltproject.io/salt/py3/windows
type: string
salt-python-requirements-files:
description: Space-separated list of paths to python requirements files installed by salt-pip, `salt-os-version` is templated as `{0}`
default: ''
type: string

defaults:
run:
Expand Down Expand Up @@ -57,6 +61,14 @@ jobs:
shell: pwsh
- run: C:\\salt\\salt-call.exe --versions-report

# Install salt python requirements
- if: inputs.salt-python-requirements-files
run: >
mapfile -t PYTHON_REQUIREMENTS < <(echo ${{ format(inputs.salt-python-requirements-files, inputs.salt-os-version) }}) &&
for FILE in "${PYTHON_REQUIREMENTS[@]}"; do
C:\\salt\\salt-pip.exe install -r "$FILE";
done
# Sync custom salt modules, if any
- run: >
C:\\salt\\salt-call.exe --local --retcode-passthrough
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

### [1.5.0](https://github.com/plus3it/actions-workflows/releases/tag/1.5.0)

**Released**: 2024.02.22

**Summary**:

* Updates salt workflows with option to install python requirements into salt
runtime

### [1.4.1](https://github.com/plus3it/actions-workflows/releases/tag/1.4.1)

**Released**: 2024.02.21
Expand Down

0 comments on commit 2cd3620

Please sign in to comment.