Skip to content

Commit

Permalink
Merge pull request #82 from BitCurator/venv_symlink_updates
Browse files Browse the repository at this point in the history
Update venv states to replace symlinks if they already exist
  • Loading branch information
kamwoods authored Nov 23, 2024
2 parents e987cea + 3f9c46b commit b93245e
Show file tree
Hide file tree
Showing 10 changed files with 55 additions and 26 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/state-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: state-tests

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
changed_states:
runs-on: ubuntu-latest
steps:
- id: files
uses: jitterbit/get-changed-files@v1
with:
format: "json"
- id: filter
run: |
echo "filtered_files=$(jq -rMc '[.[] | select(. | contains(".sls")) | select(. | contains("init") | not) | sub("/"; "."; "g") | sub(".sls"; ""; "g")]' <<< '${{ steps.files.outputs.added_modified }}')" > $GITHUB_OUTPUT
outputs:
matrix: ${{ steps.filter.outputs.filtered_files }}

test_states:
needs: changed_states
runs-on: ubuntu-latest
if: ${{ needs.changed_states.outputs.matrix != '[]' }}
strategy:
matrix:
salt: [3006]
os: [20.04, 22.04, 24.04]
state: ${{ fromJson(needs.changed_states.outputs.matrix) }}
include:
- os: 20.04
code: focal
- os: 22.04
code: jammy
- os: 24.04
code: noble
container:
image: docker://ghcr.io/ekristen/cast-tools/saltstack-tester:${{ matrix.code }}-${{ matrix.salt }}
steps:
- uses: actions/checkout@v4
- name: test-state
run: |
salt-call -l info --file-root . --local --retcode-passthrough --state-output=mixed state.sls ${{ matrix.state }} pillar="{bitcurator_user: root}"
1 change: 1 addition & 0 deletions bitcurator/python-packages/analyzemft.sls
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ analyzemft-symlink:
file.symlink:
- name: /usr/local/bin/analyzemft
- target: /opt/analyzemft/bin/analyzemft
- force: True
- makedirs: False
- require:
- pip: analyzemft-install
1 change: 1 addition & 0 deletions bitcurator/python-packages/bagit.sls
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ bagit-symlink:
file.symlink:
- name: /usr/local/bin/bagit.py
- target: /opt/bagit/bin/bagit.py
- force: True
- makedirs: False
- require:
- pip: bagit
1 change: 1 addition & 0 deletions bitcurator/python-packages/bitcurator-python-tools.sls
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ bitcurator-python-tools-symlink-{{ file }}:
file.symlink:
- name: /usr/local/bin/{{ file }}
- target: /opt/bitcurator-python-tools/bin/{{ file }}
- force: True
- makedirs: False
- require:
- pip: bitcurator-python-tools-install
Expand Down
1 change: 1 addition & 0 deletions bitcurator/python-packages/brunnhilde.sls
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ brunnhilde-symlink:
file.symlink:
- name: /usr/local/bin/brunnhilde.py
- target: /opt/brunnhilde/bin/brunnhilde.py
- force: True
- makedirs: False
- require:
- pip: brunnhilde
25 changes: 0 additions & 25 deletions bitcurator/python-packages/dfxml-python.sls

This file was deleted.

1 change: 1 addition & 0 deletions bitcurator/python-packages/imagemounter.sls
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ imagemounter-symlink:
file.symlink:
- name: /usr/local/bin/imount
- target: /opt/imagemounter/bin/imount
- force: True
- makedirs: False
- require:
- pip: imagemounter
Expand Down
2 changes: 1 addition & 1 deletion bitcurator/python-packages/importlib-metadata.sls
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ importlib_metadata:

{% else %}

Noble requires a virtualenv to install importlib_metadata:
Forced version upgrade of importlib_metadata not required for Noble:
test.nop

{% endif %}
1 change: 1 addition & 0 deletions bitcurator/python-packages/opf-fido.sls
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ opf-fido-symlink:
file.symlink:
- name: /usr/local/bin/fido
- target: /opt/fido/bin/fido
- force: True
- makedirs: False
- require:
- pip: opf-fido
1 change: 1 addition & 0 deletions bitcurator/python-packages/python-evtx.sls
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ bitcurator-python-package-python-evtx-symlink-{{ file }}:
file.symlink:
- name: /usr/local/bin/{{ file }}
- target: /opt/python-evtx/bin/{{ file }}
- force: True
- makedirs: False
- require:
- pip: bitcurator-python-package-python-evtx
Expand Down

0 comments on commit b93245e

Please sign in to comment.