From 11e391224aa85a4e0c2d584d713ddb6a005a1505 Mon Sep 17 00:00:00 2001 From: Curtis Bowden Date: Mon, 22 Apr 2024 21:00:00 +0000 Subject: [PATCH] updated build script and build container v2.2 everywhere --- .devcontainer/build.sh | 19 ++++++++++++------- .github/workflows/build-release.yml | 2 +- .github/workflows/build.yml | 2 +- .github/workflows/pytest.yml | 2 +- package | 2 +- 5 files changed, 16 insertions(+), 11 deletions(-) diff --git a/.devcontainer/build.sh b/.devcontainer/build.sh index 75f5a47..62901f1 100755 --- a/.devcontainer/build.sh +++ b/.devcontainer/build.sh @@ -1,15 +1,20 @@ #!/bin/bash -NAME=$(python -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 +NAME=$(python3 -c 'print(eval(open("package").read())["name"])') +VERSION=$(python3 -c 'print(eval(open("package").read())["version"])') +rm -f $NAME-$VERSION.mkp \ + /omd/sites/cmk/var/cat check_mk/packages/${NAME}-*.mkp \ + /omd/sites/cmk/var/check_mk/packages_local/${NAME}-*.mkp ||: -mkp -v pack $NAME +mkp -v package package 2>&1 | sed '/Installing$/Q' ||: + +cp /omd/sites/cmk/var/check_mk/packages_local/$NAME-$VERSION.mkp . + +mkp inspect $NAME-$VERSION.mkp # Set Outputs for GitHub Workflow steps if [ -n "$GITHUB_WORKSPACE" ]; then - echo "pkgfile=$(ls *.mkp)" >> $GITHUB_OUTPUT + echo "pkgfile=${NAME}-${VERSION}.mkp" >> $GITHUB_OUTPUT echo "pkgname=${NAME}" >> $GITHUB_OUTPUT - VERSION=$(python -c 'print(eval(open("package").read())["version"])') - echo "pkgversion=$VERSION" >> $GITHUB_OUTPUT + echo "pkgversion=$VERSION" >> $GITHUB_OUTPUT fi \ No newline at end of file diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 6724aa2..cb5429c 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -11,7 +11,7 @@ jobs: name: Build Release Package runs-on: ubuntu-latest container: - image: checkmk/check-mk-raw:2.1.0-latest + image: checkmk/check-mk-raw:2.2.0-latest permissions: contents: write diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3768246..18bcb70 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,7 +13,7 @@ jobs: name: Build Checkmk package runs-on: ubuntu-latest container: - image: checkmk/check-mk-raw:2.1.0-latest + image: checkmk/check-mk-raw:2.2.0-latest env: OMD_ROOT: /omd/sites/cmk diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 25bfb81..695fba6 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest container: - image: checkmk/check-mk-raw:2.1.0-latest + image: checkmk/check-mk-raw:2.2.0-latest env: OMD_ROOT: /omd/sites/cmk diff --git a/package b/package index 0f4a58f..2b1c227 100644 --- a/package +++ b/package @@ -17,6 +17,6 @@ 'title': 'Check based on ISIS-MIB for monitoring status.', 'version': '1.1.0', 'version.min_required': '2.0.0', - 'version.packaged': '2.1.0', + 'version.packaged': '2.2.0', 'version.usable_until': '2.3.0', }