Skip to content

Commit

Permalink
Update build script for python3
Browse files Browse the repository at this point in the history
  • Loading branch information
jiuka committed Feb 28, 2023
1 parent a92a531 commit 8e3c390
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
ADD requirements.txt /tmp/requirements.txt
RUN PATH="/omd/sites/cmk/bin:${PATH}" \
OMD_ROOT="/omd/sites/cmk" \
/omd/sites/cmk/bin/pip3 install -r /tmp/requirements.txt
/omd/sites/cmk/bin/python3 /omd/sites/cmk/bin/pip3 install -r /tmp/requirements.txt

ENTRYPOINT ["/bin/bash"]
10 changes: 5 additions & 5 deletions .devcontainer/build.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#!/bin/bash

NAME=$(python -c 'print(eval(open("package").read())["name"])')
NAME=$(python3 -c 'print(eval(open("package").read())["name"])')
rm /omd/sites/cmk/var/check_mk/packages/* ||:
ln -s $WORKSPACE/package /omd/sites/cmk/var/check_mk/packages/$NAME

mkp -v pack $NAME

# Set Outputs for GitHub Workflow steps
if [ -n "$GITHUB_WORKSPACE" ]; then
echo "::set-output name=pkgfile::$(ls *.mkp)"
echo "::set-output name=pkgname::${NAME}"
VERSION=$(python -c 'print(eval(open("package").read())["version"])')
echo "::set-output name=pkgversion::$VERSION"
echo "pkgfile=$(ls *.mkp)" >> $GITHUB_OUTPUT
echo "pkgname=${NAME}" >> $GITHUB_OUTPUT
VERSION=$(python3 -c 'print(eval(open("package").read())["version"])')
echo "pkgversion=${VERSION}" >> $GITHUB_OUTPUT
fi
2 changes: 1 addition & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Setup links
run: ./.devcontainer/symlink.sh
- name: Install pytest
run: su -l -c "REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt pip3 install -r $GITHUB_WORKSPACE/.devcontainer/requirements.txt" cmk
run: su -l -c "REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt /omd/sites/cmk/bin/python3 /omd/sites/cmk/bin/pip3 install -r $GITHUB_WORKSPACE/.devcontainer/requirements.txt" cmk
- name: Update GITHUB_PATH
run: echo "/omd/sites/cmk/bin" >> $GITHUB_PATH
- name: Run pytest
Expand Down

0 comments on commit 8e3c390

Please sign in to comment.