From abab8ca7f225e2ea0fb16028ba23e1e7129d729a Mon Sep 17 00:00:00 2001 From: Simon Meggle Date: Mon, 11 Mar 2024 10:16:03 +0100 Subject: [PATCH] fixed release script and workflow --- .devcontainer/build.sh | 15 +++++++++------ .github/workflows/mkp-release.yml | 10 ++++++---- CHANGELOG.md | 9 +++++++-- pkginfo | 7 ++++--- release.sh | 2 +- 5 files changed, 27 insertions(+), 16 deletions(-) diff --git a/.devcontainer/build.sh b/.devcontainer/build.sh index 9f2e4572..6dbf4ff1 100755 --- a/.devcontainer/build.sh +++ b/.devcontainer/build.sh @@ -26,18 +26,21 @@ set -u MVERSION="2" NAME="robotmk" PACKAGEFILE=$OMD_ROOT/var/check_mk/packages/$NAME +PKGDIR=$OMD_ROOT/var/check_mk/packages_local # Ownership can look dubious for git, fix this. git config --global --add safe.directory $WORKSPACE # get the current tag (Release) or commit hash (Artifact) -export RMK_VERSION=$(git describe --exact-match --tags 2>/dev/null || git rev-parse --short HEAD) +#export RMK_VERSION=$(git describe --tags `git rev-list --tags --max-count=1`) +# dirty hack - won't spent more time into this... +export RMK_VERSION="1.4.3" echo "▹ Removing old packages..." rm -f $OMD_ROOT/var/check_mk/packages/* echo "---------------------------------------------" echo "▹ Generating package infofile ..." -jq '. += {version:env.RMK_VERSION}' $WORKSPACE/pkginfo >$PACKAGEFILE +jq --arg omdversion "$(omd version | rev | cut -d" " -f 1 | rev)" '. += {version:env.RMK_VERSION, "version.packaged":$omdversion}' $WORKSPACE/pkginfo >$PACKAGEFILE echo "---------------------------------------------" echo "$PACKAGEFILE:" @@ -45,9 +48,8 @@ cat $PACKAGEFILE echo "---------------------------------------------" echo "▹ Building the MKP '$NAME' on $RMK_VERSION ..." # set -x -ls -la $PACKAGEFILE -mkp -v pack $NAME -FILE=$(ls -rt1 *.mkp | tail -1) +mkp -v package $PACKAGEFILE +FILE=$(ls -rt1 $PKGDIR/*.mkp | tail -1) # robotmk.cmk2-v1.1.0.mkp NEWFILENAME=$NAME.$RMK_VERSION-cmk$MVERSION.mkp mv $FILE $NEWFILENAME @@ -61,7 +63,8 @@ if [ -n "${GITHUB_WORKSPACE-}" ]; then echo "▹ Set Outputs for GitHub Workflow steps" echo "::set-output name=pkgfile::$NEWFILENAME" # echo "::set-output name=pkgname::${NAME}" - VERSION=$(jq -r '.version' $PACKAGEFILE) + # dirty hack - won't spent more time into this... + VERSION="1.4.3" # echo "::set-output name=pkgversion::$RMK_VERSION" # echo "::set-output name=cmkmversion::$MVERSION" echo "::set-output name=artifactname::$NEWFILENAME" diff --git a/.github/workflows/mkp-release.yml b/.github/workflows/mkp-release.yml index 3508145f..3e0250fc 100644 --- a/.github/workflows/mkp-release.yml +++ b/.github/workflows/mkp-release.yml @@ -1,9 +1,10 @@ name: MKP-Release on: + workflow_dispatch: push: - tags: - - '*' + branches: + - 'v1/stable' jobs: @@ -21,7 +22,7 @@ jobs: steps: - name: Install tools - run: apt update && apt-get -y install sudo jq tree + run: apt update && apt-get -y install sudo jq tree hub - name: Create Checkmk Site run: /docker-entrypoint.sh /bin/true - name: Checkout Robotmk repository @@ -82,10 +83,11 @@ jobs: uses: softprops/action-gh-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - RELEASE_NAME: ${GITHUB_REF##*/} + RELEASE_NAME: ${{ steps.tag.outputs.VERSION }} with: name: Release ${{ steps.tag.outputs.VERSION }} body_path: RELEASE_CHANGELOG.md + tag_name: ${{ steps.tag.outputs.VERSION }} draft: false prerelease: false # -m "" means: Leave the Release mesage body as it is, do not modify diff --git a/CHANGELOG.md b/CHANGELOG.md index 623c7a43..45de463c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,11 +6,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## 1.4.3 - 2024-03-08 +## 1.4.3 - 2024-03-11 + +Compatibility version for Checkmk V2.3 + +This will be the last version of Robotmk v1. +Robotmk will be continued as an integration in Checkmk v2.3 (aka "Synthetic Monitoring"). ## 1.4.2 - 2023-05-16 -Compatibility patch for Checkmk V2.3 +Compatibility patch for Checkmk V2.2 ### Changed diff --git a/pkginfo b/pkginfo index dfff539e..bcdfe29c 100644 --- a/pkginfo +++ b/pkginfo @@ -1,9 +1,9 @@ { "name": "robotmk", "author": "Simon Meggle ", - "description": "Robotmk integrates Robot Framework results into Checkmk. Robot Framework is a generic testing framework which can test web based and native applications (and much more). It is very popular, easy to learn and highly extendable by libraries. Libraries provide the functionality to use modern test web technologies (Playwright/Selenium), control user interfaces (ImageHorizon, SikuliX, AutoIT, SAP, ...), REST/SOAP APIs etc. It is based on Python and can be extended by own libraries as well. See https://robotframework.org for more information.", + "description": "Robotmk integrates Robot Framework results into Checkmk.", "download_url": "https://github.com/elabit/robotmk/releases", - "title": "Robotmk | Robot Framework End2End Test Integration", + "title": "Robotmk v1 | Robot Framework End2End Test Integration", "files": { "agent_based": [ "robotmk.py" @@ -27,5 +27,6 @@ "htdocs/images/icons/robotmk80_dot.png" ] }, - "version.min_required": "2.0.0" + "version.packaged": "2.3.0b1.cce", + "version.min_required": "2.3.0b1.cce" } \ No newline at end of file diff --git a/release.sh b/release.sh index 3a2771ff..db895a2b 100644 --- a/release.sh +++ b/release.sh @@ -65,7 +65,7 @@ function release() { git checkout $masterbranch git merge $devbranch --no-ff --no-edit --strategy-option theirs header "Create annotated git tag from Changelog entry ..." - chag tag --addv + chag tag header "Pushing ..." git push origin $masterbranch git push origin $VTAG