From b093a8b5e58e4e0627090eb17bb44077ab5562b2 Mon Sep 17 00:00:00 2001 From: Denoshan Rajasingam <35264425+DenoshanRajasingamCmi@users.noreply.github.com> Date: Fri, 12 Feb 2021 10:33:39 +0100 Subject: [PATCH 01/59] Update PULL_REQUEST_TEMPLATE.md --- docs/PULL_REQUEST_TEMPLATE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/PULL_REQUEST_TEMPLATE.md b/docs/PULL_REQUEST_TEMPLATE.md index 42b2265..b8a73dd 100644 --- a/docs/PULL_REQUEST_TEMPLATE.md +++ b/docs/PULL_REQUEST_TEMPLATE.md @@ -5,7 +5,7 @@ - [ ] Unit- / BDD-Tests sind erstellt (Frage lautet immer: Warum braucht es keine Unit-/BDD-Tests). - [ ] Keine Todo’s im Code (nur mit Begründung). - [ ] ReSharper Kriterien sind alle grün (mind. bei neuen Klassen, wenn möglich auch bei geänderten) -- [ ] Dokumentation ist aktualisiert (Wiki, Readme.md, Installation.md). +- [ ] Dokumentation ist aktualisiert (Updatealeitung, Wiki, Readme.md, Installation.md). - [ ] YouTrack-Ticket ist mit der Umsetzungsbeschreibung aktualisiert. - [ ] YouTrack Feld «Dokumentierer» ist abgefüllt, falls die Online Help angepasst werden muss. - [ ] Status des YouTrack-Tickte ist auf «Behoben» gesetzt. From ca80a8059a0a16547606d010625a2ad6eee88aed Mon Sep 17 00:00:00 2001 From: Denoshan Rajasingam <35264425+DenoshanRajasingamCmi@users.noreply.github.com> Date: Mon, 15 Feb 2021 12:11:31 +0100 Subject: [PATCH 02/59] Update PULL_REQUEST_TEMPLATE.md --- docs/PULL_REQUEST_TEMPLATE.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/PULL_REQUEST_TEMPLATE.md b/docs/PULL_REQUEST_TEMPLATE.md index b8a73dd..740a71d 100644 --- a/docs/PULL_REQUEST_TEMPLATE.md +++ b/docs/PULL_REQUEST_TEMPLATE.md @@ -1,11 +1,11 @@ ### Definition of Done -- [ ] Alle im UI ersichtlichen Texte sind übersetzbar. - [ ] Alle Texte welche im UI ersichtlich sind übersetzbar. -- [ ] Unit- / BDD-Tests sind erstellt (Frage lautet immer: Warum braucht es keine Unit-/BDD-Tests). -- [ ] Keine Todo’s im Code (nur mit Begründung). -- [ ] ReSharper Kriterien sind alle grün (mind. bei neuen Klassen, wenn möglich auch bei geänderten) -- [ ] Dokumentation ist aktualisiert (Updatealeitung, Wiki, Readme.md, Installation.md). +- [ ] Unit- / BDD-Tests sind erstellt _(Frage lautet immer: Warum braucht es keine Unit-/BDD-Tests)_. +- [ ] Keine Todo’s im Code _(nur mit Begründung)_. +- [ ] ReSharper Kriterien sind alle grün _(mind. bei neuen Klassen, wenn möglich auch bei geänderten)_. + +__Reminder__ +- [ ] Dokumentation ist aktualisiert _(Updatealeitung, Wiki, Readme.md, Installation.md)_. - [ ] YouTrack-Ticket ist mit der Umsetzungsbeschreibung aktualisiert. -- [ ] YouTrack Feld «Dokumentierer» ist abgefüllt, falls die Online Help angepasst werden muss. - [ ] Status des YouTrack-Tickte ist auf «Behoben» gesetzt. From d86bde5f1fc5c614db36604c3c7046b6e6ba54b0 Mon Sep 17 00:00:00 2001 From: Denoshan Rajasingam <35264425+DenoshanRajasingamCmi@users.noreply.github.com> Date: Fri, 19 Feb 2021 17:23:19 +0100 Subject: [PATCH 03/59] Update PULL_REQUEST_TEMPLATE.md --- docs/PULL_REQUEST_TEMPLATE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/PULL_REQUEST_TEMPLATE.md b/docs/PULL_REQUEST_TEMPLATE.md index 740a71d..a97970e 100644 --- a/docs/PULL_REQUEST_TEMPLATE.md +++ b/docs/PULL_REQUEST_TEMPLATE.md @@ -8,4 +8,4 @@ __Reminder__ - [ ] Dokumentation ist aktualisiert _(Updatealeitung, Wiki, Readme.md, Installation.md)_. - [ ] YouTrack-Ticket ist mit der Umsetzungsbeschreibung aktualisiert. -- [ ] Status des YouTrack-Tickte ist auf «Behoben» gesetzt. +- [ ] Status des YouTrack-Tickets ist auf «Behoben» gesetzt. From 3e96d50dc8dde835013846b13f30da986323a0d3 Mon Sep 17 00:00:00 2001 From: Denoshan Rajasingam <35264425+DenoshanRajasingamCmi@users.noreply.github.com> Date: Mon, 22 Feb 2021 07:39:44 +0100 Subject: [PATCH 04/59] Update PULL_REQUEST_TEMPLATE.md --- docs/PULL_REQUEST_TEMPLATE.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/PULL_REQUEST_TEMPLATE.md b/docs/PULL_REQUEST_TEMPLATE.md index a97970e..9902ed2 100644 --- a/docs/PULL_REQUEST_TEMPLATE.md +++ b/docs/PULL_REQUEST_TEMPLATE.md @@ -9,3 +9,4 @@ __Reminder__ - [ ] Dokumentation ist aktualisiert _(Updatealeitung, Wiki, Readme.md, Installation.md)_. - [ ] YouTrack-Ticket ist mit der Umsetzungsbeschreibung aktualisiert. - [ ] Status des YouTrack-Tickets ist auf «Behoben» gesetzt. +- [ ] Branch in alle benötigten Release-Branches zurückführen gemäss _zu lösen in_. From 622b4d9c79e6b03330ffc8f6b62891d85fbcc6a4 Mon Sep 17 00:00:00 2001 From: Denoshan Rajasingam <35264425+DenoshanRajasingamCmi@users.noreply.github.com> Date: Mon, 22 Feb 2021 07:40:18 +0100 Subject: [PATCH 05/59] Update PULL_REQUEST_TEMPLATE.md --- docs/PULL_REQUEST_TEMPLATE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/PULL_REQUEST_TEMPLATE.md b/docs/PULL_REQUEST_TEMPLATE.md index 9902ed2..bcd67dd 100644 --- a/docs/PULL_REQUEST_TEMPLATE.md +++ b/docs/PULL_REQUEST_TEMPLATE.md @@ -9,4 +9,4 @@ __Reminder__ - [ ] Dokumentation ist aktualisiert _(Updatealeitung, Wiki, Readme.md, Installation.md)_. - [ ] YouTrack-Ticket ist mit der Umsetzungsbeschreibung aktualisiert. - [ ] Status des YouTrack-Tickets ist auf «Behoben» gesetzt. -- [ ] Branch in alle benötigten Release-Branches zurückführen gemäss _zu lösen in_. +- [ ] Branch in alle benötigten Release-Branches zurückführen gemäss «zu lösen in». From 7baff08844dd2cd05ca833e849d1e2443bf52588 Mon Sep 17 00:00:00 2001 From: Milan Bursac Date: Fri, 9 Apr 2021 14:07:17 +0200 Subject: [PATCH 06/59] Create release-dotnet-core.yml (#1) --- workflow-templates/release-dotnet-core.yml | 86 ++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 workflow-templates/release-dotnet-core.yml diff --git a/workflow-templates/release-dotnet-core.yml b/workflow-templates/release-dotnet-core.yml new file mode 100644 index 0000000..446623b --- /dev/null +++ b/workflow-templates/release-dotnet-core.yml @@ -0,0 +1,86 @@ +name: .NET Core Release Build + +on: + workflow_dispatch: + inputs: + comment: + description: 'Bemerkung' + required: false + pull_request: + branches: [ master ] + push: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + outputs: + version: ${{ steps.buildAndPush.outputs.version}} + artifact-name: ${{ steps.buildAndPush.outputs.artifact-name}} + is-pre-release: ${{ steps.buildAndPush.outputs.is-pre-release}} + steps: + - name: Check Out + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - id: buildAndPush + name: Build docker image and push + uses: CMInformatik/dotnet-build@main + with: + app-name: "Bsp.: cmi-push-service" + myget-pre-auth-url: ${{secrets.MYGET_PRE_AUTH_URL}} + docker-password: ${{secrets.DOCKER_PASSWORD}} + docker-username: ${{secrets.DOCKER_USERNAME}} + build-configuration: release + + - name: Convert markdown to PDF + uses: CMInformatik/markdown-to-pdf@master + with: + input_dir: doc + output_dir: Dokumentation + build_html: false + + - name: Upload PDF as artifact + uses: actions/upload-artifact@v1 + with: + name: Dokumentation + path: Dokumentation + + createRelease: + needs: build + runs-on: ubuntu-latest + + steps: + - name: Create release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: v.${{ needs.build.outputs.version }} + release_name: v.${{ needs.build.outputs.version }} + draft: false + prerelease: ${{ needs.build.outputs.is-pre-release }} + + - name: Download artifacts + id: download_artifacts + uses: actions/download-artifact@v2 + with: + path: ./ + + - name: Create artifacts archive + run: | + cd ${{steps.download_artifacts.outputs.download-path}} + mv ${{ needs.build.outputs.artifact-name }} Installationsdateien + zip -r ./result.zip . + + - name: Upload release asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./result.zip + asset_name: ${{ needs.build.outputs.artifact-name }}.zip + asset_content_type: application/zip From ae0421f9a8f9bcff9bfef57267d8c3c69c445d3b Mon Sep 17 00:00:00 2001 From: cmiapps Date: Fri, 9 Apr 2021 14:47:21 +0200 Subject: [PATCH 07/59] Add files via upload --- workflow-templates/release.svg | 1 + 1 file changed, 1 insertion(+) create mode 100644 workflow-templates/release.svg diff --git a/workflow-templates/release.svg b/workflow-templates/release.svg new file mode 100644 index 0000000..021ce92 --- /dev/null +++ b/workflow-templates/release.svg @@ -0,0 +1 @@ + \ No newline at end of file From 87300bbc0541f4ffe6c50e90d0c5a1781b64f730 Mon Sep 17 00:00:00 2001 From: cmiapps Date: Fri, 9 Apr 2021 14:48:56 +0200 Subject: [PATCH 08/59] Create release-dotnet-core..properties.json --- .../release-dotnet-core..properties.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 workflow-templates/release-dotnet-core..properties.json diff --git a/workflow-templates/release-dotnet-core..properties.json b/workflow-templates/release-dotnet-core..properties.json new file mode 100644 index 0000000..b0c2748 --- /dev/null +++ b/workflow-templates/release-dotnet-core..properties.json @@ -0,0 +1,12 @@ +{ + "name": "Release Build for .NET Core Services", + "description": "Standardvorlage für einen .NET Core Service", + "iconName": "release", + "categories": [ + "C#" + ], + "filePatterns": [ + "^Dockerfile", + ".*\\.md$" + ] +} From ae6995c352e9251098dc20e6e1e26c1f0cf269e1 Mon Sep 17 00:00:00 2001 From: cmiapps Date: Fri, 9 Apr 2021 14:50:26 +0200 Subject: [PATCH 09/59] Rename release-dotnet-core..properties.json to release-dotnet-core.properties.json --- ...-core..properties.json => release-dotnet-core.properties.json} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename workflow-templates/{release-dotnet-core..properties.json => release-dotnet-core.properties.json} (100%) diff --git a/workflow-templates/release-dotnet-core..properties.json b/workflow-templates/release-dotnet-core.properties.json similarity index 100% rename from workflow-templates/release-dotnet-core..properties.json rename to workflow-templates/release-dotnet-core.properties.json From 8cf62e46faf24ace710d88a2bf40ed63a67b4272 Mon Sep 17 00:00:00 2001 From: cmiapps Date: Fri, 9 Apr 2021 14:53:06 +0200 Subject: [PATCH 10/59] Update release-dotnet-core.properties.json --- workflow-templates/release-dotnet-core.properties.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/workflow-templates/release-dotnet-core.properties.json b/workflow-templates/release-dotnet-core.properties.json index b0c2748..196d200 100644 --- a/workflow-templates/release-dotnet-core.properties.json +++ b/workflow-templates/release-dotnet-core.properties.json @@ -4,9 +4,5 @@ "iconName": "release", "categories": [ "C#" - ], - "filePatterns": [ - "^Dockerfile", - ".*\\.md$" ] } From 2c9e5ac1b805e95c1647a3f4576116ef68d6c884 Mon Sep 17 00:00:00 2001 From: cmiapps Date: Fri, 9 Apr 2021 14:56:51 +0200 Subject: [PATCH 11/59] Update release-dotnet-core.properties.json --- workflow-templates/release-dotnet-core.properties.json | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/workflow-templates/release-dotnet-core.properties.json b/workflow-templates/release-dotnet-core.properties.json index 196d200..155722e 100644 --- a/workflow-templates/release-dotnet-core.properties.json +++ b/workflow-templates/release-dotnet-core.properties.json @@ -1,8 +1,5 @@ { "name": "Release Build for .NET Core Services", "description": "Standardvorlage für einen .NET Core Service", - "iconName": "release", - "categories": [ - "C#" - ] + "iconName": "release" } From 1c3c38c17880192f1dcfbe521f9bf5acdca7e55c Mon Sep 17 00:00:00 2001 From: cmiapps Date: Fri, 9 Apr 2021 15:14:12 +0200 Subject: [PATCH 12/59] Update release-dotnet-core.properties.json --- workflow-templates/release-dotnet-core.properties.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/workflow-templates/release-dotnet-core.properties.json b/workflow-templates/release-dotnet-core.properties.json index 155722e..196d200 100644 --- a/workflow-templates/release-dotnet-core.properties.json +++ b/workflow-templates/release-dotnet-core.properties.json @@ -1,5 +1,8 @@ { "name": "Release Build for .NET Core Services", "description": "Standardvorlage für einen .NET Core Service", - "iconName": "release" + "iconName": "release", + "categories": [ + "C#" + ] } From 01629a64c233fe6ab6f80323196838bdb8e6a528 Mon Sep 17 00:00:00 2001 From: cmiapps Date: Fri, 9 Apr 2021 15:17:32 +0200 Subject: [PATCH 13/59] Create ci-dotnet-core.yml --- workflow-templates/ci-dotnet-core.yml | 28 +++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 workflow-templates/ci-dotnet-core.yml diff --git a/workflow-templates/ci-dotnet-core.yml b/workflow-templates/ci-dotnet-core.yml new file mode 100644 index 0000000..57856cc --- /dev/null +++ b/workflow-templates/ci-dotnet-core.yml @@ -0,0 +1,28 @@ +name: .NET Core CI Build + +on: + workflow_dispatch: + inputs: + comment: + description: 'Bemerkung' + required: false + pull_request: + branches: [ develop ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Check Out + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Build docker image and push + uses: CMInformatik/dotnet-build@main + with: + app-name: Beispiel: cmi-push-service + myget-pre-auth-url: ${{secrets.MYGET_PRE_AUTH_URL}} + docker-password: ${{secrets.DOCKER_PASSWORD}} + docker-username: ${{secrets.DOCKER_USERNAME}} + build-configuration: debug From 6d7d4291e18170b3ca7dba1f80c060912613ab05 Mon Sep 17 00:00:00 2001 From: cmiapps Date: Fri, 9 Apr 2021 15:18:37 +0200 Subject: [PATCH 14/59] Create ci-dotnet-core.properties.json --- workflow-templates/ci-dotnet-core.properties.json | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 workflow-templates/ci-dotnet-core.properties.json diff --git a/workflow-templates/ci-dotnet-core.properties.json b/workflow-templates/ci-dotnet-core.properties.json new file mode 100644 index 0000000..ffb9b25 --- /dev/null +++ b/workflow-templates/ci-dotnet-core.properties.json @@ -0,0 +1,8 @@ +{ + "name": "CI Build for .NET Core Services", + "description": "Standardvorlage für einen .NET Core Service", + "iconName": "release", + "categories": [ + "C#" + ] +} From 7980a1309047cd928322d720022ca3b961d08ea6 Mon Sep 17 00:00:00 2001 From: cmiapps Date: Tue, 13 Apr 2021 11:30:19 +0200 Subject: [PATCH 15/59] Update release-dotnet-core.yml --- workflow-templates/release-dotnet-core.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/workflow-templates/release-dotnet-core.yml b/workflow-templates/release-dotnet-core.yml index 446623b..02e7499 100644 --- a/workflow-templates/release-dotnet-core.yml +++ b/workflow-templates/release-dotnet-core.yml @@ -14,6 +14,9 @@ on: jobs: build: runs-on: ubuntu-latest + env: + APP_NAME: APP-Name (Bsp. cmi-push-service) + OCTOPUS_PACKAGE_NAME: Package-Name for Octopus (Bsp. CMI.PushService) outputs: version: ${{ steps.buildAndPush.outputs.version}} artifact-name: ${{ steps.buildAndPush.outputs.artifact-name}} @@ -28,12 +31,27 @@ jobs: name: Build docker image and push uses: CMInformatik/dotnet-build@main with: - app-name: "Bsp.: cmi-push-service" + app-name: ${{env.APP_NAME}} myget-pre-auth-url: ${{secrets.MYGET_PRE_AUTH_URL}} docker-password: ${{secrets.DOCKER_PASSWORD}} docker-username: ${{secrets.DOCKER_USERNAME}} build-configuration: release + - name: Install Octopus CLI + run: | + sudo apt update && sudo apt install --no-install-recommends gnupg curl ca-certificates apt-transport-https && \ + curl -sSfL https://apt.octopus.com/public.key | sudo apt-key add - && \ + sudo sh -c "echo deb https://apt.octopus.com/ stable main > /etc/apt/sources.list.d/octopus.com.list" && \ + sudo apt update && sudo apt install octopuscli + + - name: Create Ocotpus package + run: | + mkdir -p ./packages + octo pack --id="${{env.OCTOPUS_PACKAGE_NAME}}" --format="Zip" --version="${{steps.buildAndPush.outputs.version}}" --basePath="./extracted-app" --outFolder="./packages" + + - name: Push to Octopus + run: octo push --package="./packages/${{env.OCTOPUS_PACKAGE_NAME}}.${{steps.buildAndPush.outputs.version}}.zip" --server="${{ secrets.OCTOPUS_SERVER_URL }}" --apiKey="${{ secrets.OCTOPUS_API_KEY }}" + - name: Convert markdown to PDF uses: CMInformatik/markdown-to-pdf@master with: From 90a34caf31ee09683f0f1d18aa4114ac0453505a Mon Sep 17 00:00:00 2001 From: cmiapps Date: Tue, 13 Apr 2021 13:08:12 +0200 Subject: [PATCH 16/59] Update ci-dotnet-core.yml --- workflow-templates/ci-dotnet-core.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/workflow-templates/ci-dotnet-core.yml b/workflow-templates/ci-dotnet-core.yml index 57856cc..3e6c81b 100644 --- a/workflow-templates/ci-dotnet-core.yml +++ b/workflow-templates/ci-dotnet-core.yml @@ -12,6 +12,8 @@ on: jobs: build: runs-on: ubuntu-latest + env: + APP_NAME: APP-Name (Bsp. cmi-push-service) steps: - name: Check Out uses: actions/checkout@v2 @@ -21,7 +23,7 @@ jobs: - name: Build docker image and push uses: CMInformatik/dotnet-build@main with: - app-name: Beispiel: cmi-push-service + app-name: ${{env.APP_NAME}} myget-pre-auth-url: ${{secrets.MYGET_PRE_AUTH_URL}} docker-password: ${{secrets.DOCKER_PASSWORD}} docker-username: ${{secrets.DOCKER_USERNAME}} From 6966b1cc6bfc83f6e513fa49f7b23c5cc9989cbd Mon Sep 17 00:00:00 2001 From: cmiapps Date: Tue, 13 Apr 2021 13:09:21 +0200 Subject: [PATCH 17/59] Create docker-template --- docker/docker-template | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 docker/docker-template diff --git a/docker/docker-template b/docker/docker-template new file mode 100644 index 0000000..db73360 --- /dev/null +++ b/docker/docker-template @@ -0,0 +1,34 @@ +# syntax = docker/dockerfile:1.0-experimental +# the line above allows using buildtime secrets on buildkit-enabled docker hosts. +FROM mcr.microsoft.com/dotnet/sdk:3.1 AS publish + +ARG buildConfiguration=debug +ENV appName=Solution-Name ohne Endung (Bsp. CMI.PushService) +ENV solutionfile=$appName.sln + +WORKDIR / +COPY . . + +RUN --mount=type=secret,id=nuget_config \ + cp /run/secrets/nuget_config ./nuget.config &&\ + dotnet nuget disable source "Microsoft Visual Studio Offline Packages" || true &&\ + dotnet restore "./$solutionfile" &&\ + rm nuget.config + +RUN echo Configuration: $buildConfiguration +RUN dotnet build "./$solutionfile" --no-restore -c $buildConfiguration +RUN dotnet test "./$solutionfile" --no-restore -c $buildConfiguration +RUN dotnet publish "./$solutionfile" -o /app/publish --no-restore -c $buildConfiguration + +FROM mcr.microsoft.com/dotnet/aspnet:3.1 AS final +ENV appName=CMI.PushService +RUN adduser --disabled-password \ + --home /app \ + --gecos '' dotnetuser && chown -R dotnetuser /app + +USER dotnetuser +WORKDIR /app +EXPOSE 5000 +COPY --from=publish /app/publish . + +ENTRYPOINT dotnet ./${appName}.dll --urls "https://+:5001" From 0b7d001c8a47f9ebfd4c1181788cad864d4944fb Mon Sep 17 00:00:00 2001 From: cmiapps Date: Tue, 13 Apr 2021 13:14:23 +0200 Subject: [PATCH 18/59] Update ci-dotnet-core.yml --- workflow-templates/ci-dotnet-core.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/workflow-templates/ci-dotnet-core.yml b/workflow-templates/ci-dotnet-core.yml index 3e6c81b..02a003b 100644 --- a/workflow-templates/ci-dotnet-core.yml +++ b/workflow-templates/ci-dotnet-core.yml @@ -12,6 +12,9 @@ on: jobs: build: runs-on: ubuntu-latest + defaults: + run: + working-directory: src env: APP_NAME: APP-Name (Bsp. cmi-push-service) steps: From d430598182dbbde6ef4f2e72e668dac7d880c41e Mon Sep 17 00:00:00 2001 From: cmiapps Date: Tue, 13 Apr 2021 13:14:36 +0200 Subject: [PATCH 19/59] Update release-dotnet-core.yml --- workflow-templates/release-dotnet-core.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/workflow-templates/release-dotnet-core.yml b/workflow-templates/release-dotnet-core.yml index 02e7499..1928faf 100644 --- a/workflow-templates/release-dotnet-core.yml +++ b/workflow-templates/release-dotnet-core.yml @@ -14,6 +14,9 @@ on: jobs: build: runs-on: ubuntu-latest + defaults: + run: + working-directory: src env: APP_NAME: APP-Name (Bsp. cmi-push-service) OCTOPUS_PACKAGE_NAME: Package-Name for Octopus (Bsp. CMI.PushService) From 5fd13159709595a9993e6698c07b74575289bfee Mon Sep 17 00:00:00 2001 From: cmiapps Date: Tue, 13 Apr 2021 13:21:34 +0200 Subject: [PATCH 20/59] Update release-dotnet-core.yml --- workflow-templates/release-dotnet-core.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/workflow-templates/release-dotnet-core.yml b/workflow-templates/release-dotnet-core.yml index 1928faf..02e7499 100644 --- a/workflow-templates/release-dotnet-core.yml +++ b/workflow-templates/release-dotnet-core.yml @@ -14,9 +14,6 @@ on: jobs: build: runs-on: ubuntu-latest - defaults: - run: - working-directory: src env: APP_NAME: APP-Name (Bsp. cmi-push-service) OCTOPUS_PACKAGE_NAME: Package-Name for Octopus (Bsp. CMI.PushService) From d230157a8f132d6fbcd244db36236ed84818e77d Mon Sep 17 00:00:00 2001 From: cmiapps Date: Tue, 13 Apr 2021 13:21:48 +0200 Subject: [PATCH 21/59] Update ci-dotnet-core.yml --- workflow-templates/ci-dotnet-core.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/workflow-templates/ci-dotnet-core.yml b/workflow-templates/ci-dotnet-core.yml index 02a003b..3e6c81b 100644 --- a/workflow-templates/ci-dotnet-core.yml +++ b/workflow-templates/ci-dotnet-core.yml @@ -12,9 +12,6 @@ on: jobs: build: runs-on: ubuntu-latest - defaults: - run: - working-directory: src env: APP_NAME: APP-Name (Bsp. cmi-push-service) steps: From 36ab72a24e0f08fc645617b78286e1a064eb30ee Mon Sep 17 00:00:00 2001 From: cmiapps Date: Tue, 13 Apr 2021 13:23:09 +0200 Subject: [PATCH 22/59] Create .dockerignore-vorlage --- docker/.dockerignore-vorlage | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 docker/.dockerignore-vorlage diff --git a/docker/.dockerignore-vorlage b/docker/.dockerignore-vorlage new file mode 100644 index 0000000..76bc25f --- /dev/null +++ b/docker/.dockerignore-vorlage @@ -0,0 +1,5 @@ +**/bin +**/obj +**/.vscode +**/.vs +**/.idea From 1bdc98664c2eae26c68e56c8fadea36d1fffcd5d Mon Sep 17 00:00:00 2001 From: cmiapps Date: Tue, 13 Apr 2021 13:23:23 +0200 Subject: [PATCH 23/59] Rename .dockerignore-vorlage to .dockerignore-template --- docker/{.dockerignore-vorlage => .dockerignore-template} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename docker/{.dockerignore-vorlage => .dockerignore-template} (100%) diff --git a/docker/.dockerignore-vorlage b/docker/.dockerignore-template similarity index 100% rename from docker/.dockerignore-vorlage rename to docker/.dockerignore-template From 0f72c8577e0d1573c7fafb18f7504d116dab9fe1 Mon Sep 17 00:00:00 2001 From: cmiapps Date: Tue, 13 Apr 2021 14:27:10 +0200 Subject: [PATCH 24/59] Update docker-template --- docker/docker-template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/docker-template b/docker/docker-template index db73360..d442ef6 100644 --- a/docker/docker-template +++ b/docker/docker-template @@ -3,11 +3,11 @@ FROM mcr.microsoft.com/dotnet/sdk:3.1 AS publish ARG buildConfiguration=debug -ENV appName=Solution-Name ohne Endung (Bsp. CMI.PushService) +ENV appName=CMI.Webapi.Contactsync ENV solutionfile=$appName.sln -WORKDIR / COPY . . +WORKDIR /src RUN --mount=type=secret,id=nuget_config \ cp /run/secrets/nuget_config ./nuget.config &&\ From 021836f01bf5c6fb2eea2c244981fae70df1ab41 Mon Sep 17 00:00:00 2001 From: cmiapps Date: Tue, 13 Apr 2021 15:53:21 +0200 Subject: [PATCH 25/59] Update docker-template From 33511f7b6071715a6a01d90a574cdca14b00a436 Mon Sep 17 00:00:00 2001 From: cmiapps Date: Tue, 13 Apr 2021 16:05:46 +0200 Subject: [PATCH 26/59] Update docker-template --- docker/docker-template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/docker-template b/docker/docker-template index d442ef6..8e1fefc 100644 --- a/docker/docker-template +++ b/docker/docker-template @@ -3,7 +3,7 @@ FROM mcr.microsoft.com/dotnet/sdk:3.1 AS publish ARG buildConfiguration=debug -ENV appName=CMI.Webapi.Contactsync +ENV appName=Solution-Name ohne Endung (Bsp. CMI.Webapi.Contactsync) ENV solutionfile=$appName.sln COPY . . From 3ba9bd70224570c6152368bc7c88ed7f2a9184c8 Mon Sep 17 00:00:00 2001 From: Milan Bursac Date: Fri, 30 Apr 2021 10:38:35 +0200 Subject: [PATCH 27/59] Update docker-template --- docker/docker-template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/docker-template b/docker/docker-template index 8e1fefc..90d85eb 100644 --- a/docker/docker-template +++ b/docker/docker-template @@ -21,7 +21,7 @@ RUN dotnet test "./$solutionfile" --no-restore -c $buildConfiguration RUN dotnet publish "./$solutionfile" -o /app/publish --no-restore -c $buildConfiguration FROM mcr.microsoft.com/dotnet/aspnet:3.1 AS final -ENV appName=CMI.PushService +ENV appName=Solution-Name ohne Endung (Bsp. CMI.Webapi.Contactsync) RUN adduser --disabled-password \ --home /app \ --gecos '' dotnetuser && chown -R dotnetuser /app From c1af7f274fb1ba9261b12c9329c6329ea5415f83 Mon Sep 17 00:00:00 2001 From: Denoshan Rajasingam <35264425+DenoshanRajasingam@users.noreply.github.com> Date: Tue, 9 Aug 2022 13:31:31 +0200 Subject: [PATCH 28/59] Create addfixversionyoutrack.yml (#2) --- workflows/addfixversionyoutrack.yml | 88 +++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 workflows/addfixversionyoutrack.yml diff --git a/workflows/addfixversionyoutrack.yml b/workflows/addfixversionyoutrack.yml new file mode 100644 index 0000000..9dcdf9c --- /dev/null +++ b/workflows/addfixversionyoutrack.yml @@ -0,0 +1,88 @@ +name: YouTrack "Gelöst in Version" setzen + +# Controls when the workflow will run +on: + # Triggers the workflow on push or pull request events but only for the "release" branch + push: + branches: + - 'release/**' + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + setup: + runs-on: ubuntu-latest + outputs: + matrix: ${{steps.matrix.outputs.result}} + branch: ${{ steps.extract_branch.outputs.branch }} + steps: + - name: Extract branch name + shell: bash + run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/release/v.})" + id: extract_branch + - name: Get Tickets + id: matrix + uses: actions/github-script@v6 + with: + script: | + const commits = ${{ toJSON(github.event.commits) }}; + + var includes = []; + for (const commit of commits) { + var arr = commit.message.match(/[A-Za-z]{2,5}\d{0,5}-\d{1,5}/gi); + if (arr != null) { + includes.push({message: arr[0]}); + } + } + + return { include: includes }; + - name: Create Version + continue-on-error: true + env: + YOUTRACK_AUTH_TOKEN: ${{ secrets.YOUTRACK_AUTH_TOKEN }} + uses: fjogeleit/http-request-action@v1 + with: + customHeaders: '{"Authorization": "${{ env.YOUTRACK_AUTH_TOKEN }}"}' + data: '{ "name": "${{ steps.extract_branch.outputs.branch }}", "$type": "VersionBundleElement" }' + method: POST + url: "https://cmiag.myjetbrains.com/api/admin/projects/69-45/customFields/70-519/bundle/values?fields=id,name" + + updater: + needs: setup + runs-on: ubuntu-latest + strategy: + matrix: ${{ fromJSON(needs.setup.outputs.matrix) }} + steps: + - name: "get current values in youtrack" + id: getcurrent + env: + YOUTRACK_AUTH_TOKEN: ${{ secrets.YOUTRACK_AUTH_TOKEN }} + uses: fjogeleit/http-request-action@v1 + with: + customHeaders: '{"Authorization": "${{ env.YOUTRACK_AUTH_TOKEN }}"}' + method: GET + url: "https://cmiag.myjetbrains.com/youtrack/api/issues/${{ matrix.message }}/customFields/70-519?fields=value(name, $type)" + - name: Build Post-Data + id: builddata + uses: actions/github-script@v6 + with: + script: | + const input = ${{ toJSON(steps.getcurrent.outputs.response) }}; + const obj = JSON.parse(input); + + var value = []; + + obj.value.forEach(elm => value.push({"name": elm.name})); + value.push({"name": "${{ needs.setup.outputs.branch }}"}); + + return {"customFields":[{"name":"Fix versions","$type":"MultiVersionIssueCustomField","value": value}]} + - name: "set fix version in youtrack" + env: + YOUTRACK_AUTH_TOKEN: ${{ secrets.YOUTRACK_AUTH_TOKEN }} + uses: fjogeleit/http-request-action@v1 + with: + customHeaders: '{"Authorization": "${{ env.YOUTRACK_AUTH_TOKEN }}", "Content-Type": "application/json", "Accept": "application/json"}' + data: ${{ steps.builddata.outputs.result }} + method: POST + url: "https://cmiag.myjetbrains.com/youtrack/api/issues/${{ matrix.message }}?fields=customFields(name,value(name,text))" From 8a9ce87b13e07878498f7a9c91f32d93fb6d2642 Mon Sep 17 00:00:00 2001 From: Denoshan Rajasingam <35264425+DenoshanRajasingam@users.noreply.github.com> Date: Tue, 9 Aug 2022 13:36:22 +0200 Subject: [PATCH 29/59] Create addfixversionyoutrack.yml --- workflow-templates/addfixversionyoutrack.yml | 88 ++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 workflow-templates/addfixversionyoutrack.yml diff --git a/workflow-templates/addfixversionyoutrack.yml b/workflow-templates/addfixversionyoutrack.yml new file mode 100644 index 0000000..9dcdf9c --- /dev/null +++ b/workflow-templates/addfixversionyoutrack.yml @@ -0,0 +1,88 @@ +name: YouTrack "Gelöst in Version" setzen + +# Controls when the workflow will run +on: + # Triggers the workflow on push or pull request events but only for the "release" branch + push: + branches: + - 'release/**' + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + setup: + runs-on: ubuntu-latest + outputs: + matrix: ${{steps.matrix.outputs.result}} + branch: ${{ steps.extract_branch.outputs.branch }} + steps: + - name: Extract branch name + shell: bash + run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/release/v.})" + id: extract_branch + - name: Get Tickets + id: matrix + uses: actions/github-script@v6 + with: + script: | + const commits = ${{ toJSON(github.event.commits) }}; + + var includes = []; + for (const commit of commits) { + var arr = commit.message.match(/[A-Za-z]{2,5}\d{0,5}-\d{1,5}/gi); + if (arr != null) { + includes.push({message: arr[0]}); + } + } + + return { include: includes }; + - name: Create Version + continue-on-error: true + env: + YOUTRACK_AUTH_TOKEN: ${{ secrets.YOUTRACK_AUTH_TOKEN }} + uses: fjogeleit/http-request-action@v1 + with: + customHeaders: '{"Authorization": "${{ env.YOUTRACK_AUTH_TOKEN }}"}' + data: '{ "name": "${{ steps.extract_branch.outputs.branch }}", "$type": "VersionBundleElement" }' + method: POST + url: "https://cmiag.myjetbrains.com/api/admin/projects/69-45/customFields/70-519/bundle/values?fields=id,name" + + updater: + needs: setup + runs-on: ubuntu-latest + strategy: + matrix: ${{ fromJSON(needs.setup.outputs.matrix) }} + steps: + - name: "get current values in youtrack" + id: getcurrent + env: + YOUTRACK_AUTH_TOKEN: ${{ secrets.YOUTRACK_AUTH_TOKEN }} + uses: fjogeleit/http-request-action@v1 + with: + customHeaders: '{"Authorization": "${{ env.YOUTRACK_AUTH_TOKEN }}"}' + method: GET + url: "https://cmiag.myjetbrains.com/youtrack/api/issues/${{ matrix.message }}/customFields/70-519?fields=value(name, $type)" + - name: Build Post-Data + id: builddata + uses: actions/github-script@v6 + with: + script: | + const input = ${{ toJSON(steps.getcurrent.outputs.response) }}; + const obj = JSON.parse(input); + + var value = []; + + obj.value.forEach(elm => value.push({"name": elm.name})); + value.push({"name": "${{ needs.setup.outputs.branch }}"}); + + return {"customFields":[{"name":"Fix versions","$type":"MultiVersionIssueCustomField","value": value}]} + - name: "set fix version in youtrack" + env: + YOUTRACK_AUTH_TOKEN: ${{ secrets.YOUTRACK_AUTH_TOKEN }} + uses: fjogeleit/http-request-action@v1 + with: + customHeaders: '{"Authorization": "${{ env.YOUTRACK_AUTH_TOKEN }}", "Content-Type": "application/json", "Accept": "application/json"}' + data: ${{ steps.builddata.outputs.result }} + method: POST + url: "https://cmiag.myjetbrains.com/youtrack/api/issues/${{ matrix.message }}?fields=customFields(name,value(name,text))" From a952163b2e99816522a562596788aa97c35d1b32 Mon Sep 17 00:00:00 2001 From: Denoshan Rajasingam <35264425+DenoshanRajasingam@users.noreply.github.com> Date: Tue, 9 Aug 2022 13:36:42 +0200 Subject: [PATCH 30/59] Delete addfixversionyoutrack.yml --- workflows/addfixversionyoutrack.yml | 88 ----------------------------- 1 file changed, 88 deletions(-) delete mode 100644 workflows/addfixversionyoutrack.yml diff --git a/workflows/addfixversionyoutrack.yml b/workflows/addfixversionyoutrack.yml deleted file mode 100644 index 9dcdf9c..0000000 --- a/workflows/addfixversionyoutrack.yml +++ /dev/null @@ -1,88 +0,0 @@ -name: YouTrack "Gelöst in Version" setzen - -# Controls when the workflow will run -on: - # Triggers the workflow on push or pull request events but only for the "release" branch - push: - branches: - - 'release/**' - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -jobs: - setup: - runs-on: ubuntu-latest - outputs: - matrix: ${{steps.matrix.outputs.result}} - branch: ${{ steps.extract_branch.outputs.branch }} - steps: - - name: Extract branch name - shell: bash - run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/release/v.})" - id: extract_branch - - name: Get Tickets - id: matrix - uses: actions/github-script@v6 - with: - script: | - const commits = ${{ toJSON(github.event.commits) }}; - - var includes = []; - for (const commit of commits) { - var arr = commit.message.match(/[A-Za-z]{2,5}\d{0,5}-\d{1,5}/gi); - if (arr != null) { - includes.push({message: arr[0]}); - } - } - - return { include: includes }; - - name: Create Version - continue-on-error: true - env: - YOUTRACK_AUTH_TOKEN: ${{ secrets.YOUTRACK_AUTH_TOKEN }} - uses: fjogeleit/http-request-action@v1 - with: - customHeaders: '{"Authorization": "${{ env.YOUTRACK_AUTH_TOKEN }}"}' - data: '{ "name": "${{ steps.extract_branch.outputs.branch }}", "$type": "VersionBundleElement" }' - method: POST - url: "https://cmiag.myjetbrains.com/api/admin/projects/69-45/customFields/70-519/bundle/values?fields=id,name" - - updater: - needs: setup - runs-on: ubuntu-latest - strategy: - matrix: ${{ fromJSON(needs.setup.outputs.matrix) }} - steps: - - name: "get current values in youtrack" - id: getcurrent - env: - YOUTRACK_AUTH_TOKEN: ${{ secrets.YOUTRACK_AUTH_TOKEN }} - uses: fjogeleit/http-request-action@v1 - with: - customHeaders: '{"Authorization": "${{ env.YOUTRACK_AUTH_TOKEN }}"}' - method: GET - url: "https://cmiag.myjetbrains.com/youtrack/api/issues/${{ matrix.message }}/customFields/70-519?fields=value(name, $type)" - - name: Build Post-Data - id: builddata - uses: actions/github-script@v6 - with: - script: | - const input = ${{ toJSON(steps.getcurrent.outputs.response) }}; - const obj = JSON.parse(input); - - var value = []; - - obj.value.forEach(elm => value.push({"name": elm.name})); - value.push({"name": "${{ needs.setup.outputs.branch }}"}); - - return {"customFields":[{"name":"Fix versions","$type":"MultiVersionIssueCustomField","value": value}]} - - name: "set fix version in youtrack" - env: - YOUTRACK_AUTH_TOKEN: ${{ secrets.YOUTRACK_AUTH_TOKEN }} - uses: fjogeleit/http-request-action@v1 - with: - customHeaders: '{"Authorization": "${{ env.YOUTRACK_AUTH_TOKEN }}", "Content-Type": "application/json", "Accept": "application/json"}' - data: ${{ steps.builddata.outputs.result }} - method: POST - url: "https://cmiag.myjetbrains.com/youtrack/api/issues/${{ matrix.message }}?fields=customFields(name,value(name,text))" From f3bdabef326926109b94a6fd191dc0db6c1f5b43 Mon Sep 17 00:00:00 2001 From: Lukas Merz <81758471+LukasMerz@users.noreply.github.com> Date: Tue, 9 Aug 2022 13:38:17 +0200 Subject: [PATCH 31/59] Rename addfixversionyoutrack.yml to add-version-youtrack.yml --- .../{addfixversionyoutrack.yml => add-version-youtrack.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename workflow-templates/{addfixversionyoutrack.yml => add-version-youtrack.yml} (100%) diff --git a/workflow-templates/addfixversionyoutrack.yml b/workflow-templates/add-version-youtrack.yml similarity index 100% rename from workflow-templates/addfixversionyoutrack.yml rename to workflow-templates/add-version-youtrack.yml From 589d532c48047a83c838843c0297eb291b038cb5 Mon Sep 17 00:00:00 2001 From: Lukas Merz <81758471+LukasMerz@users.noreply.github.com> Date: Tue, 9 Aug 2022 13:41:48 +0200 Subject: [PATCH 32/59] Create add-version-youtrack.json --- workflow-templates/add-version-youtrack.json | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 workflow-templates/add-version-youtrack.json diff --git a/workflow-templates/add-version-youtrack.json b/workflow-templates/add-version-youtrack.json new file mode 100644 index 0000000..ddec256 --- /dev/null +++ b/workflow-templates/add-version-youtrack.json @@ -0,0 +1,8 @@ +{ + "name": "Gelöst in in Youtrack-Ticket nachtragen auf Release-Branches", + "description": "Youtrack-Tickets nachtragen", + "iconName": "release", + "categories": [ + "C#" + ] +} From 10f858dd2519f4ffc74a51163dc756119a5fc89a Mon Sep 17 00:00:00 2001 From: Lukas Merz <81758471+LukasMerz@users.noreply.github.com> Date: Tue, 9 Aug 2022 13:42:02 +0200 Subject: [PATCH 33/59] Rename add-version-youtrack.json to add-version-youtrack.properties.json --- ...version-youtrack.json => add-version-youtrack.properties.json} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename workflow-templates/{add-version-youtrack.json => add-version-youtrack.properties.json} (100%) diff --git a/workflow-templates/add-version-youtrack.json b/workflow-templates/add-version-youtrack.properties.json similarity index 100% rename from workflow-templates/add-version-youtrack.json rename to workflow-templates/add-version-youtrack.properties.json From 74cf6aafe70ed95e94eb1fe995d0718b1110384a Mon Sep 17 00:00:00 2001 From: Lukas Merz Date: Thu, 11 Aug 2022 07:49:57 +0200 Subject: [PATCH 34/59] feat(add-version-youtrack): move file and add workflow-call [NO-TICKET] --- workflow-templates/add-version-youtrack.properties.json | 8 -------- .../add-version-youtrack.yml | 1 + 2 files changed, 1 insertion(+), 8 deletions(-) delete mode 100644 workflow-templates/add-version-youtrack.properties.json rename {workflow-templates => workflows}/add-version-youtrack.yml (99%) diff --git a/workflow-templates/add-version-youtrack.properties.json b/workflow-templates/add-version-youtrack.properties.json deleted file mode 100644 index ddec256..0000000 --- a/workflow-templates/add-version-youtrack.properties.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "Gelöst in in Youtrack-Ticket nachtragen auf Release-Branches", - "description": "Youtrack-Tickets nachtragen", - "iconName": "release", - "categories": [ - "C#" - ] -} diff --git a/workflow-templates/add-version-youtrack.yml b/workflows/add-version-youtrack.yml similarity index 99% rename from workflow-templates/add-version-youtrack.yml rename to workflows/add-version-youtrack.yml index 9dcdf9c..113b2dd 100644 --- a/workflow-templates/add-version-youtrack.yml +++ b/workflows/add-version-youtrack.yml @@ -9,6 +9,7 @@ on: # Allows you to run this workflow manually from the Actions tab workflow_dispatch: + workflow_call: jobs: setup: From a5d238a5f3b30f12769f6d39516a2e6f31ec87e0 Mon Sep 17 00:00:00 2001 From: Lukas Merz Date: Thu, 11 Aug 2022 08:00:17 +0200 Subject: [PATCH 35/59] feat(Action): Move Action [NO-TICKET] --- {workflows => .github/workflows}/add-version-youtrack.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {workflows => .github/workflows}/add-version-youtrack.yml (100%) diff --git a/workflows/add-version-youtrack.yml b/.github/workflows/add-version-youtrack.yml similarity index 100% rename from workflows/add-version-youtrack.yml rename to .github/workflows/add-version-youtrack.yml From 05d90dbffbcdc44ed4e40158a18cd2dbbceeb474 Mon Sep 17 00:00:00 2001 From: Lukas Merz Date: Thu, 11 Aug 2022 08:07:50 +0200 Subject: [PATCH 36/59] feat(add-version-youtrack): require secrets [NO-TICKET] --- .github/workflows/add-version-youtrack.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/add-version-youtrack.yml b/.github/workflows/add-version-youtrack.yml index 113b2dd..69876d4 100644 --- a/.github/workflows/add-version-youtrack.yml +++ b/.github/workflows/add-version-youtrack.yml @@ -10,6 +10,9 @@ on: # Allows you to run this workflow manually from the Actions tab workflow_dispatch: workflow_call: + secrets: + YOUTRACK_AUTH_TOKEN: + required: true jobs: setup: From fa514360d8670a51c4226f8088c94b439410ac6c Mon Sep 17 00:00:00 2001 From: Denoshan Rajasingam <35264425+DenoshanRajasingam@users.noreply.github.com> Date: Thu, 11 Aug 2022 09:07:47 +0200 Subject: [PATCH 37/59] Create add-version-youtrack.yml --- ref_workflows/add-version-youtrack.yml | 92 ++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 ref_workflows/add-version-youtrack.yml diff --git a/ref_workflows/add-version-youtrack.yml b/ref_workflows/add-version-youtrack.yml new file mode 100644 index 0000000..69876d4 --- /dev/null +++ b/ref_workflows/add-version-youtrack.yml @@ -0,0 +1,92 @@ +name: YouTrack "Gelöst in Version" setzen + +# Controls when the workflow will run +on: + # Triggers the workflow on push or pull request events but only for the "release" branch + push: + branches: + - 'release/**' + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + workflow_call: + secrets: + YOUTRACK_AUTH_TOKEN: + required: true + +jobs: + setup: + runs-on: ubuntu-latest + outputs: + matrix: ${{steps.matrix.outputs.result}} + branch: ${{ steps.extract_branch.outputs.branch }} + steps: + - name: Extract branch name + shell: bash + run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/release/v.})" + id: extract_branch + - name: Get Tickets + id: matrix + uses: actions/github-script@v6 + with: + script: | + const commits = ${{ toJSON(github.event.commits) }}; + + var includes = []; + for (const commit of commits) { + var arr = commit.message.match(/[A-Za-z]{2,5}\d{0,5}-\d{1,5}/gi); + if (arr != null) { + includes.push({message: arr[0]}); + } + } + + return { include: includes }; + - name: Create Version + continue-on-error: true + env: + YOUTRACK_AUTH_TOKEN: ${{ secrets.YOUTRACK_AUTH_TOKEN }} + uses: fjogeleit/http-request-action@v1 + with: + customHeaders: '{"Authorization": "${{ env.YOUTRACK_AUTH_TOKEN }}"}' + data: '{ "name": "${{ steps.extract_branch.outputs.branch }}", "$type": "VersionBundleElement" }' + method: POST + url: "https://cmiag.myjetbrains.com/api/admin/projects/69-45/customFields/70-519/bundle/values?fields=id,name" + + updater: + needs: setup + runs-on: ubuntu-latest + strategy: + matrix: ${{ fromJSON(needs.setup.outputs.matrix) }} + steps: + - name: "get current values in youtrack" + id: getcurrent + env: + YOUTRACK_AUTH_TOKEN: ${{ secrets.YOUTRACK_AUTH_TOKEN }} + uses: fjogeleit/http-request-action@v1 + with: + customHeaders: '{"Authorization": "${{ env.YOUTRACK_AUTH_TOKEN }}"}' + method: GET + url: "https://cmiag.myjetbrains.com/youtrack/api/issues/${{ matrix.message }}/customFields/70-519?fields=value(name, $type)" + - name: Build Post-Data + id: builddata + uses: actions/github-script@v6 + with: + script: | + const input = ${{ toJSON(steps.getcurrent.outputs.response) }}; + const obj = JSON.parse(input); + + var value = []; + + obj.value.forEach(elm => value.push({"name": elm.name})); + value.push({"name": "${{ needs.setup.outputs.branch }}"}); + + return {"customFields":[{"name":"Fix versions","$type":"MultiVersionIssueCustomField","value": value}]} + - name: "set fix version in youtrack" + env: + YOUTRACK_AUTH_TOKEN: ${{ secrets.YOUTRACK_AUTH_TOKEN }} + uses: fjogeleit/http-request-action@v1 + with: + customHeaders: '{"Authorization": "${{ env.YOUTRACK_AUTH_TOKEN }}", "Content-Type": "application/json", "Accept": "application/json"}' + data: ${{ steps.builddata.outputs.result }} + method: POST + url: "https://cmiag.myjetbrains.com/youtrack/api/issues/${{ matrix.message }}?fields=customFields(name,value(name,text))" From bb9f6eb39ecf3b09265a11dd73eb7f806e3a781a Mon Sep 17 00:00:00 2001 From: Denoshan Rajasingam <35264425+DenoshanRajasingam@users.noreply.github.com> Date: Thu, 11 Aug 2022 15:27:42 +0200 Subject: [PATCH 38/59] =?UTF-8?q?Dokumentation=20zentrale=20Templates=20f?= =?UTF-8?q?=C3=BCr=20Workflows=20(#3)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ref_workflows/Readme.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 ref_workflows/Readme.md diff --git a/ref_workflows/Readme.md b/ref_workflows/Readme.md new file mode 100644 index 0000000..7d9df66 --- /dev/null +++ b/ref_workflows/Readme.md @@ -0,0 +1,15 @@ +# Allgemein +Dieser Ordner wird verwendet für Workflows, die von anderen Repositories refernziert werden. + +**Eine Änderungen an dem Workflow hat immer Einfluss auf verschiede Repositories.** + +Dokumentation: https://github.blog/2022-02-10-using-reusable-workflows-github-actions/ + +## Änderungen +Änderungen die weitere seid Effekts haben können sollen in einem dedizierten Repository geprüft. +Wie geht das? +1. Den betroffener Workflow kopieren +2. Einfügen dedizierten Repository +3. Änderungen und Anpassungen vornehmen +4. Testen und Reviewen +5. Änderungen hier (zentrale Repository) nachführen From a437039dea6444c6445ea48bba3fdb9277b3d7e7 Mon Sep 17 00:00:00 2001 From: Denoshan Rajasingam <35264425+DenoshanRajasingam@users.noreply.github.com> Date: Thu, 11 Aug 2022 15:33:15 +0200 Subject: [PATCH 39/59] Create add-version-youtrack.yml --- workflows/add-version-youtrack.yml | 92 ++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 workflows/add-version-youtrack.yml diff --git a/workflows/add-version-youtrack.yml b/workflows/add-version-youtrack.yml new file mode 100644 index 0000000..69876d4 --- /dev/null +++ b/workflows/add-version-youtrack.yml @@ -0,0 +1,92 @@ +name: YouTrack "Gelöst in Version" setzen + +# Controls when the workflow will run +on: + # Triggers the workflow on push or pull request events but only for the "release" branch + push: + branches: + - 'release/**' + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + workflow_call: + secrets: + YOUTRACK_AUTH_TOKEN: + required: true + +jobs: + setup: + runs-on: ubuntu-latest + outputs: + matrix: ${{steps.matrix.outputs.result}} + branch: ${{ steps.extract_branch.outputs.branch }} + steps: + - name: Extract branch name + shell: bash + run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/release/v.})" + id: extract_branch + - name: Get Tickets + id: matrix + uses: actions/github-script@v6 + with: + script: | + const commits = ${{ toJSON(github.event.commits) }}; + + var includes = []; + for (const commit of commits) { + var arr = commit.message.match(/[A-Za-z]{2,5}\d{0,5}-\d{1,5}/gi); + if (arr != null) { + includes.push({message: arr[0]}); + } + } + + return { include: includes }; + - name: Create Version + continue-on-error: true + env: + YOUTRACK_AUTH_TOKEN: ${{ secrets.YOUTRACK_AUTH_TOKEN }} + uses: fjogeleit/http-request-action@v1 + with: + customHeaders: '{"Authorization": "${{ env.YOUTRACK_AUTH_TOKEN }}"}' + data: '{ "name": "${{ steps.extract_branch.outputs.branch }}", "$type": "VersionBundleElement" }' + method: POST + url: "https://cmiag.myjetbrains.com/api/admin/projects/69-45/customFields/70-519/bundle/values?fields=id,name" + + updater: + needs: setup + runs-on: ubuntu-latest + strategy: + matrix: ${{ fromJSON(needs.setup.outputs.matrix) }} + steps: + - name: "get current values in youtrack" + id: getcurrent + env: + YOUTRACK_AUTH_TOKEN: ${{ secrets.YOUTRACK_AUTH_TOKEN }} + uses: fjogeleit/http-request-action@v1 + with: + customHeaders: '{"Authorization": "${{ env.YOUTRACK_AUTH_TOKEN }}"}' + method: GET + url: "https://cmiag.myjetbrains.com/youtrack/api/issues/${{ matrix.message }}/customFields/70-519?fields=value(name, $type)" + - name: Build Post-Data + id: builddata + uses: actions/github-script@v6 + with: + script: | + const input = ${{ toJSON(steps.getcurrent.outputs.response) }}; + const obj = JSON.parse(input); + + var value = []; + + obj.value.forEach(elm => value.push({"name": elm.name})); + value.push({"name": "${{ needs.setup.outputs.branch }}"}); + + return {"customFields":[{"name":"Fix versions","$type":"MultiVersionIssueCustomField","value": value}]} + - name: "set fix version in youtrack" + env: + YOUTRACK_AUTH_TOKEN: ${{ secrets.YOUTRACK_AUTH_TOKEN }} + uses: fjogeleit/http-request-action@v1 + with: + customHeaders: '{"Authorization": "${{ env.YOUTRACK_AUTH_TOKEN }}", "Content-Type": "application/json", "Accept": "application/json"}' + data: ${{ steps.builddata.outputs.result }} + method: POST + url: "https://cmiag.myjetbrains.com/youtrack/api/issues/${{ matrix.message }}?fields=customFields(name,value(name,text))" From 73b51e788bca5c89320a8c410bac3619d1731920 Mon Sep 17 00:00:00 2001 From: Denoshan Rajasingam <35264425+DenoshanRajasingam@users.noreply.github.com> Date: Thu, 11 Aug 2022 15:33:35 +0200 Subject: [PATCH 40/59] Create Readme.md --- workflows/Readme.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 workflows/Readme.md diff --git a/workflows/Readme.md b/workflows/Readme.md new file mode 100644 index 0000000..7d9df66 --- /dev/null +++ b/workflows/Readme.md @@ -0,0 +1,15 @@ +# Allgemein +Dieser Ordner wird verwendet für Workflows, die von anderen Repositories refernziert werden. + +**Eine Änderungen an dem Workflow hat immer Einfluss auf verschiede Repositories.** + +Dokumentation: https://github.blog/2022-02-10-using-reusable-workflows-github-actions/ + +## Änderungen +Änderungen die weitere seid Effekts haben können sollen in einem dedizierten Repository geprüft. +Wie geht das? +1. Den betroffener Workflow kopieren +2. Einfügen dedizierten Repository +3. Änderungen und Anpassungen vornehmen +4. Testen und Reviewen +5. Änderungen hier (zentrale Repository) nachführen From 0dfa16344e8ef35af1dfa4fa7a9dd0b5e985abe8 Mon Sep 17 00:00:00 2001 From: Denoshan Rajasingam <35264425+DenoshanRajasingam@users.noreply.github.com> Date: Thu, 11 Aug 2022 15:33:54 +0200 Subject: [PATCH 41/59] Delete ref_workflows directory --- ref_workflows/Readme.md | 15 ----- ref_workflows/add-version-youtrack.yml | 92 -------------------------- 2 files changed, 107 deletions(-) delete mode 100644 ref_workflows/Readme.md delete mode 100644 ref_workflows/add-version-youtrack.yml diff --git a/ref_workflows/Readme.md b/ref_workflows/Readme.md deleted file mode 100644 index 7d9df66..0000000 --- a/ref_workflows/Readme.md +++ /dev/null @@ -1,15 +0,0 @@ -# Allgemein -Dieser Ordner wird verwendet für Workflows, die von anderen Repositories refernziert werden. - -**Eine Änderungen an dem Workflow hat immer Einfluss auf verschiede Repositories.** - -Dokumentation: https://github.blog/2022-02-10-using-reusable-workflows-github-actions/ - -## Änderungen -Änderungen die weitere seid Effekts haben können sollen in einem dedizierten Repository geprüft. -Wie geht das? -1. Den betroffener Workflow kopieren -2. Einfügen dedizierten Repository -3. Änderungen und Anpassungen vornehmen -4. Testen und Reviewen -5. Änderungen hier (zentrale Repository) nachführen diff --git a/ref_workflows/add-version-youtrack.yml b/ref_workflows/add-version-youtrack.yml deleted file mode 100644 index 69876d4..0000000 --- a/ref_workflows/add-version-youtrack.yml +++ /dev/null @@ -1,92 +0,0 @@ -name: YouTrack "Gelöst in Version" setzen - -# Controls when the workflow will run -on: - # Triggers the workflow on push or pull request events but only for the "release" branch - push: - branches: - - 'release/**' - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - workflow_call: - secrets: - YOUTRACK_AUTH_TOKEN: - required: true - -jobs: - setup: - runs-on: ubuntu-latest - outputs: - matrix: ${{steps.matrix.outputs.result}} - branch: ${{ steps.extract_branch.outputs.branch }} - steps: - - name: Extract branch name - shell: bash - run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/release/v.})" - id: extract_branch - - name: Get Tickets - id: matrix - uses: actions/github-script@v6 - with: - script: | - const commits = ${{ toJSON(github.event.commits) }}; - - var includes = []; - for (const commit of commits) { - var arr = commit.message.match(/[A-Za-z]{2,5}\d{0,5}-\d{1,5}/gi); - if (arr != null) { - includes.push({message: arr[0]}); - } - } - - return { include: includes }; - - name: Create Version - continue-on-error: true - env: - YOUTRACK_AUTH_TOKEN: ${{ secrets.YOUTRACK_AUTH_TOKEN }} - uses: fjogeleit/http-request-action@v1 - with: - customHeaders: '{"Authorization": "${{ env.YOUTRACK_AUTH_TOKEN }}"}' - data: '{ "name": "${{ steps.extract_branch.outputs.branch }}", "$type": "VersionBundleElement" }' - method: POST - url: "https://cmiag.myjetbrains.com/api/admin/projects/69-45/customFields/70-519/bundle/values?fields=id,name" - - updater: - needs: setup - runs-on: ubuntu-latest - strategy: - matrix: ${{ fromJSON(needs.setup.outputs.matrix) }} - steps: - - name: "get current values in youtrack" - id: getcurrent - env: - YOUTRACK_AUTH_TOKEN: ${{ secrets.YOUTRACK_AUTH_TOKEN }} - uses: fjogeleit/http-request-action@v1 - with: - customHeaders: '{"Authorization": "${{ env.YOUTRACK_AUTH_TOKEN }}"}' - method: GET - url: "https://cmiag.myjetbrains.com/youtrack/api/issues/${{ matrix.message }}/customFields/70-519?fields=value(name, $type)" - - name: Build Post-Data - id: builddata - uses: actions/github-script@v6 - with: - script: | - const input = ${{ toJSON(steps.getcurrent.outputs.response) }}; - const obj = JSON.parse(input); - - var value = []; - - obj.value.forEach(elm => value.push({"name": elm.name})); - value.push({"name": "${{ needs.setup.outputs.branch }}"}); - - return {"customFields":[{"name":"Fix versions","$type":"MultiVersionIssueCustomField","value": value}]} - - name: "set fix version in youtrack" - env: - YOUTRACK_AUTH_TOKEN: ${{ secrets.YOUTRACK_AUTH_TOKEN }} - uses: fjogeleit/http-request-action@v1 - with: - customHeaders: '{"Authorization": "${{ env.YOUTRACK_AUTH_TOKEN }}", "Content-Type": "application/json", "Accept": "application/json"}' - data: ${{ steps.builddata.outputs.result }} - method: POST - url: "https://cmiag.myjetbrains.com/youtrack/api/issues/${{ matrix.message }}?fields=customFields(name,value(name,text))" From 1752b50843934f75b91f557099b6dbdcdc11d67e Mon Sep 17 00:00:00 2001 From: Denoshan Rajasingam <35264425+DenoshanRajasingam@users.noreply.github.com> Date: Thu, 11 Aug 2022 15:43:24 +0200 Subject: [PATCH 42/59] Create Readme.md --- .github/workflows/Readme.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/Readme.md diff --git a/.github/workflows/Readme.md b/.github/workflows/Readme.md new file mode 100644 index 0000000..7d9df66 --- /dev/null +++ b/.github/workflows/Readme.md @@ -0,0 +1,15 @@ +# Allgemein +Dieser Ordner wird verwendet für Workflows, die von anderen Repositories refernziert werden. + +**Eine Änderungen an dem Workflow hat immer Einfluss auf verschiede Repositories.** + +Dokumentation: https://github.blog/2022-02-10-using-reusable-workflows-github-actions/ + +## Änderungen +Änderungen die weitere seid Effekts haben können sollen in einem dedizierten Repository geprüft. +Wie geht das? +1. Den betroffener Workflow kopieren +2. Einfügen dedizierten Repository +3. Änderungen und Anpassungen vornehmen +4. Testen und Reviewen +5. Änderungen hier (zentrale Repository) nachführen From 39e66eaac23ece1952799c0fca6bb8d50c8c62a7 Mon Sep 17 00:00:00 2001 From: Denoshan Rajasingam <35264425+DenoshanRajasingam@users.noreply.github.com> Date: Thu, 11 Aug 2022 15:43:36 +0200 Subject: [PATCH 43/59] Delete workflows directory --- workflows/Readme.md | 15 ----- workflows/add-version-youtrack.yml | 92 ------------------------------ 2 files changed, 107 deletions(-) delete mode 100644 workflows/Readme.md delete mode 100644 workflows/add-version-youtrack.yml diff --git a/workflows/Readme.md b/workflows/Readme.md deleted file mode 100644 index 7d9df66..0000000 --- a/workflows/Readme.md +++ /dev/null @@ -1,15 +0,0 @@ -# Allgemein -Dieser Ordner wird verwendet für Workflows, die von anderen Repositories refernziert werden. - -**Eine Änderungen an dem Workflow hat immer Einfluss auf verschiede Repositories.** - -Dokumentation: https://github.blog/2022-02-10-using-reusable-workflows-github-actions/ - -## Änderungen -Änderungen die weitere seid Effekts haben können sollen in einem dedizierten Repository geprüft. -Wie geht das? -1. Den betroffener Workflow kopieren -2. Einfügen dedizierten Repository -3. Änderungen und Anpassungen vornehmen -4. Testen und Reviewen -5. Änderungen hier (zentrale Repository) nachführen diff --git a/workflows/add-version-youtrack.yml b/workflows/add-version-youtrack.yml deleted file mode 100644 index 69876d4..0000000 --- a/workflows/add-version-youtrack.yml +++ /dev/null @@ -1,92 +0,0 @@ -name: YouTrack "Gelöst in Version" setzen - -# Controls when the workflow will run -on: - # Triggers the workflow on push or pull request events but only for the "release" branch - push: - branches: - - 'release/**' - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - workflow_call: - secrets: - YOUTRACK_AUTH_TOKEN: - required: true - -jobs: - setup: - runs-on: ubuntu-latest - outputs: - matrix: ${{steps.matrix.outputs.result}} - branch: ${{ steps.extract_branch.outputs.branch }} - steps: - - name: Extract branch name - shell: bash - run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/release/v.})" - id: extract_branch - - name: Get Tickets - id: matrix - uses: actions/github-script@v6 - with: - script: | - const commits = ${{ toJSON(github.event.commits) }}; - - var includes = []; - for (const commit of commits) { - var arr = commit.message.match(/[A-Za-z]{2,5}\d{0,5}-\d{1,5}/gi); - if (arr != null) { - includes.push({message: arr[0]}); - } - } - - return { include: includes }; - - name: Create Version - continue-on-error: true - env: - YOUTRACK_AUTH_TOKEN: ${{ secrets.YOUTRACK_AUTH_TOKEN }} - uses: fjogeleit/http-request-action@v1 - with: - customHeaders: '{"Authorization": "${{ env.YOUTRACK_AUTH_TOKEN }}"}' - data: '{ "name": "${{ steps.extract_branch.outputs.branch }}", "$type": "VersionBundleElement" }' - method: POST - url: "https://cmiag.myjetbrains.com/api/admin/projects/69-45/customFields/70-519/bundle/values?fields=id,name" - - updater: - needs: setup - runs-on: ubuntu-latest - strategy: - matrix: ${{ fromJSON(needs.setup.outputs.matrix) }} - steps: - - name: "get current values in youtrack" - id: getcurrent - env: - YOUTRACK_AUTH_TOKEN: ${{ secrets.YOUTRACK_AUTH_TOKEN }} - uses: fjogeleit/http-request-action@v1 - with: - customHeaders: '{"Authorization": "${{ env.YOUTRACK_AUTH_TOKEN }}"}' - method: GET - url: "https://cmiag.myjetbrains.com/youtrack/api/issues/${{ matrix.message }}/customFields/70-519?fields=value(name, $type)" - - name: Build Post-Data - id: builddata - uses: actions/github-script@v6 - with: - script: | - const input = ${{ toJSON(steps.getcurrent.outputs.response) }}; - const obj = JSON.parse(input); - - var value = []; - - obj.value.forEach(elm => value.push({"name": elm.name})); - value.push({"name": "${{ needs.setup.outputs.branch }}"}); - - return {"customFields":[{"name":"Fix versions","$type":"MultiVersionIssueCustomField","value": value}]} - - name: "set fix version in youtrack" - env: - YOUTRACK_AUTH_TOKEN: ${{ secrets.YOUTRACK_AUTH_TOKEN }} - uses: fjogeleit/http-request-action@v1 - with: - customHeaders: '{"Authorization": "${{ env.YOUTRACK_AUTH_TOKEN }}", "Content-Type": "application/json", "Accept": "application/json"}' - data: ${{ steps.builddata.outputs.result }} - method: POST - url: "https://cmiag.myjetbrains.com/youtrack/api/issues/${{ matrix.message }}?fields=customFields(name,value(name,text))" From 21cd4dbd2318ab817d54f72c68488a6000874cbb Mon Sep 17 00:00:00 2001 From: Lukas Merz <81758471+LukasMerz@users.noreply.github.com> Date: Fri, 12 Aug 2022 15:07:24 +0200 Subject: [PATCH 44/59] fix action [ST2-1328] (#5) --- .github/workflows/add-version-youtrack.yml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/add-version-youtrack.yml b/.github/workflows/add-version-youtrack.yml index 69876d4..899721c 100644 --- a/.github/workflows/add-version-youtrack.yml +++ b/.github/workflows/add-version-youtrack.yml @@ -13,6 +13,17 @@ on: secrets: YOUTRACK_AUTH_TOKEN: required: true + inputs: + youtrack_field_name: + description: 'Field-Name, welche im Youtrack aktualisiert werden soll' + default: 'Fix versions' + required: false + type: string + youtrack_field_id: + description: 'Field-ID im Projekt CMI, welche im Youtrack aktualisiert werden soll' + default: '70-303' + required: false + type: string jobs: setup: @@ -50,7 +61,7 @@ jobs: customHeaders: '{"Authorization": "${{ env.YOUTRACK_AUTH_TOKEN }}"}' data: '{ "name": "${{ steps.extract_branch.outputs.branch }}", "$type": "VersionBundleElement" }' method: POST - url: "https://cmiag.myjetbrains.com/api/admin/projects/69-45/customFields/70-519/bundle/values?fields=id,name" + url: "https://cmiag.myjetbrains.com/api/admin/projects/69-28/customFields/${{ inputs.youtrack_field_id }}/bundle/values?fields=id,name" updater: needs: setup @@ -66,7 +77,7 @@ jobs: with: customHeaders: '{"Authorization": "${{ env.YOUTRACK_AUTH_TOKEN }}"}' method: GET - url: "https://cmiag.myjetbrains.com/youtrack/api/issues/${{ matrix.message }}/customFields/70-519?fields=value(name, $type)" + url: "https://cmiag.myjetbrains.com/youtrack/api/issues/${{ matrix.message }}/customFields?fields=name,value(name)" - name: Build Post-Data id: builddata uses: actions/github-script@v6 @@ -77,10 +88,10 @@ jobs: var value = []; - obj.value.forEach(elm => value.push({"name": elm.name})); + obj.filter(elm => elm.name == ${{ inputs.youtrack_field_name }})[0].value.forEach(elm => value.push({"name": elm.name})); value.push({"name": "${{ needs.setup.outputs.branch }}"}); - return {"customFields":[{"name":"Fix versions","$type":"MultiVersionIssueCustomField","value": value}]} + return {"customFields":[{"name":"${{ inputs.youtrack_field_name }}","$type":"MultiVersionIssueCustomField","value": value}]} - name: "set fix version in youtrack" env: YOUTRACK_AUTH_TOKEN: ${{ secrets.YOUTRACK_AUTH_TOKEN }} From 035f17f9dac0e0a20be56376cf0241b2a44f4d8d Mon Sep 17 00:00:00 2001 From: Lukas Merz <81758471+LukasMerz@users.noreply.github.com> Date: Mon, 15 Aug 2022 11:32:10 +0200 Subject: [PATCH 45/59] Update add-version-youtrack.yml --- .github/workflows/add-version-youtrack.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/add-version-youtrack.yml b/.github/workflows/add-version-youtrack.yml index 899721c..41e7d1b 100644 --- a/.github/workflows/add-version-youtrack.yml +++ b/.github/workflows/add-version-youtrack.yml @@ -88,7 +88,7 @@ jobs: var value = []; - obj.filter(elm => elm.name == ${{ inputs.youtrack_field_name }})[0].value.forEach(elm => value.push({"name": elm.name})); + obj.filter(elm => elm.name == "${{ inputs.youtrack_field_name }}")[0].value.forEach(elm => value.push({"name": elm.name})); value.push({"name": "${{ needs.setup.outputs.branch }}"}); return {"customFields":[{"name":"${{ inputs.youtrack_field_name }}","$type":"MultiVersionIssueCustomField","value": value}]} From 0376053f2078be68e49e1758b79ebafa5d090e7a Mon Sep 17 00:00:00 2001 From: Denoshan Rajasingam <35264425+DenoshanRajasingam@users.noreply.github.com> Date: Wed, 26 Oct 2022 16:38:46 +0200 Subject: [PATCH 46/59] Update PULL_REQUEST_TEMPLATE.md --- docs/PULL_REQUEST_TEMPLATE.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/PULL_REQUEST_TEMPLATE.md b/docs/PULL_REQUEST_TEMPLATE.md index bcd67dd..378f927 100644 --- a/docs/PULL_REQUEST_TEMPLATE.md +++ b/docs/PULL_REQUEST_TEMPLATE.md @@ -10,3 +10,6 @@ __Reminder__ - [ ] YouTrack-Ticket ist mit der Umsetzungsbeschreibung aktualisiert. - [ ] Status des YouTrack-Tickets ist auf «Behoben» gesetzt. - [ ] Branch in alle benötigten Release-Branches zurückführen gemäss «zu lösen in». + +Dokumentation und Do's and Dont's +https://cminformatik.atlassian.net/l/cp/usT6kKy5 From 47512c32440a320654db90088bd713b83eac5817 Mon Sep 17 00:00:00 2001 From: Denoshan Rajasingam <35264425+DenoshanRajasingam@users.noreply.github.com> Date: Thu, 27 Oct 2022 06:40:35 +0200 Subject: [PATCH 47/59] Update PULL_REQUEST_TEMPLATE.md --- docs/PULL_REQUEST_TEMPLATE.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/PULL_REQUEST_TEMPLATE.md b/docs/PULL_REQUEST_TEMPLATE.md index 378f927..68467ed 100644 --- a/docs/PULL_REQUEST_TEMPLATE.md +++ b/docs/PULL_REQUEST_TEMPLATE.md @@ -11,5 +11,5 @@ __Reminder__ - [ ] Status des YouTrack-Tickets ist auf «Behoben» gesetzt. - [ ] Branch in alle benötigten Release-Branches zurückführen gemäss «zu lösen in». -Dokumentation und Do's and Dont's -https://cminformatik.atlassian.net/l/cp/usT6kKy5 +__Dokumentationen'__ +- [Do's and Dont](https://cminformatik.atlassian.net/l/cp/usT6kKy5) From 6ba036c7adf14ae35a998e85abf2b2e537defc5f Mon Sep 17 00:00:00 2001 From: Denoshan Rajasingam <35264425+DenoshanRajasingam@users.noreply.github.com> Date: Thu, 27 Oct 2022 06:40:51 +0200 Subject: [PATCH 48/59] Update PULL_REQUEST_TEMPLATE.md --- docs/PULL_REQUEST_TEMPLATE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/PULL_REQUEST_TEMPLATE.md b/docs/PULL_REQUEST_TEMPLATE.md index 68467ed..da60605 100644 --- a/docs/PULL_REQUEST_TEMPLATE.md +++ b/docs/PULL_REQUEST_TEMPLATE.md @@ -11,5 +11,5 @@ __Reminder__ - [ ] Status des YouTrack-Tickets ist auf «Behoben» gesetzt. - [ ] Branch in alle benötigten Release-Branches zurückführen gemäss «zu lösen in». -__Dokumentationen'__ +__Dokumentationen__ - [Do's and Dont](https://cminformatik.atlassian.net/l/cp/usT6kKy5) From d370918d7e546514d74d4e0455d38ba0b00b513c Mon Sep 17 00:00:00 2001 From: Patrick Borgogno <789401+borgiman@users.noreply.github.com> Date: Tue, 1 Nov 2022 11:06:44 +0100 Subject: [PATCH 49/59] docs: make dos and donts more clear [-] --- docs/PULL_REQUEST_TEMPLATE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/PULL_REQUEST_TEMPLATE.md b/docs/PULL_REQUEST_TEMPLATE.md index da60605..0fd8eb8 100644 --- a/docs/PULL_REQUEST_TEMPLATE.md +++ b/docs/PULL_REQUEST_TEMPLATE.md @@ -12,4 +12,4 @@ __Reminder__ - [ ] Branch in alle benötigten Release-Branches zurückführen gemäss «zu lösen in». __Dokumentationen__ -- [Do's and Dont](https://cminformatik.atlassian.net/l/cp/usT6kKy5) +- [CMI-Webclients Dos and Don’ts](https://cminformatik.atlassian.net/l/cp/usT6kKy5) From 532917dec9efc3b32d787c9cde2620976c119a8a Mon Sep 17 00:00:00 2001 From: Alexander Klee Date: Thu, 2 Feb 2023 09:04:03 +0100 Subject: [PATCH 50/59] Add Changelog Entry to DoD (#6) --- docs/PULL_REQUEST_TEMPLATE.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/PULL_REQUEST_TEMPLATE.md b/docs/PULL_REQUEST_TEMPLATE.md index 0fd8eb8..ffe784f 100644 --- a/docs/PULL_REQUEST_TEMPLATE.md +++ b/docs/PULL_REQUEST_TEMPLATE.md @@ -4,6 +4,7 @@ - [ ] Unit- / BDD-Tests sind erstellt _(Frage lautet immer: Warum braucht es keine Unit-/BDD-Tests)_. - [ ] Keine Todo’s im Code _(nur mit Begründung)_. - [ ] ReSharper Kriterien sind alle grün _(mind. bei neuen Klassen, wenn möglich auch bei geänderten)_. +- [ ] Changelog Eintrag geschrieben _(bei Major oder Minor bump)_. __Reminder__ - [ ] Dokumentation ist aktualisiert _(Updatealeitung, Wiki, Readme.md, Installation.md)_. From efc8cddaba8a2c53a96039fa9e60e386c46da438 Mon Sep 17 00:00:00 2001 From: Denoshan Rajasingam <35264425+DenoshanRajasingam@users.noreply.github.com> Date: Fri, 17 Feb 2023 07:56:47 +0100 Subject: [PATCH 51/59] Update PULL_REQUEST_TEMPLATE.md --- docs/PULL_REQUEST_TEMPLATE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/PULL_REQUEST_TEMPLATE.md b/docs/PULL_REQUEST_TEMPLATE.md index ffe784f..6037a1e 100644 --- a/docs/PULL_REQUEST_TEMPLATE.md +++ b/docs/PULL_REQUEST_TEMPLATE.md @@ -1,4 +1,4 @@ -### Definition of Done +### Todo's - [ ] Alle Texte welche im UI ersichtlich sind übersetzbar. - [ ] Unit- / BDD-Tests sind erstellt _(Frage lautet immer: Warum braucht es keine Unit-/BDD-Tests)_. From 860cc5b68257900f641b8141ed130d65b926d413 Mon Sep 17 00:00:00 2001 From: Lukas Merz <81758471+LukasMerz@users.noreply.github.com> Date: Mon, 22 May 2023 14:00:41 +0200 Subject: [PATCH 52/59] Create CODEOWNERS --- .github/CODEOWNERS | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..2599e74 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +/.github/workflows/check-codeowners.yml @CMInformatik/reviewer_innen-cmi-sourcecontrolmanager From 4275a663d87a110a71e837efb72aa8089699e38b Mon Sep 17 00:00:00 2001 From: Lukas Merz <81758471+LukasMerz@users.noreply.github.com> Date: Mon, 22 May 2023 14:02:02 +0200 Subject: [PATCH 53/59] Create check-codeowners.yml --- .github/workflows/check-codeowners.yml | 35 ++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/check-codeowners.yml diff --git a/.github/workflows/check-codeowners.yml b/.github/workflows/check-codeowners.yml new file mode 100644 index 0000000..ac26672 --- /dev/null +++ b/.github/workflows/check-codeowners.yml @@ -0,0 +1,35 @@ +name: PR von Codeowner reviewed + +on: + pull_request: + pull_request_review: + types: [submitted] + +jobs: + codeowners: + if: github.event.review.state == 'approved' + name: Generelle Codeowners (Alle ohne Lernende und neue Mitarbeiter) + runs-on: ubuntu-latest + env: + codeowners: "borgiman;gregorbosshard;urva;Matthias-Hess;fdc-cmi;EliaSaSe;bschaeublin;cmiagmbu;cmiagika;HeinzBiglerCMI;DenoshanRajasingam;Luca-Guettinger;jweiss27;juergotter;andreaszingg;marco554;LukasMerz;OliverBecker92;PhilipCereto;cmimar01;SimonSchwendele;cmiagpsc" + steps: + - name: Check Codeowners + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR: ${{ github.event.pull_request.number }} + run: | + gh --version + hasreviewer=false + for reviewer in $(gh pr view $PR --json reviews -q '.reviews[] | select(.state == "APPROVED") | .author["login"]' --repo $GITHUB_REPOSITORY); do + echo "Checking ${reviewer}" + hasreviewer=true + [[ "$reviewer" =~ 'app/' ]] && reviewer="${reviewer:4}" + if [[ "${{ env.codeowners }}" =~ ${reviewer} ]]; then + echo "Found reviewer" + exit 0 + fi + done + if $hasreviewer; then + echo "Review muss von einem Codeowner durchgeführt werden ${{ env.codeowners }}" + exit 1 + fi From cc3bfd1047e87e9ca47e8e6ee7863a61d4064bf9 Mon Sep 17 00:00:00 2001 From: Lukas Merz <81758471+LukasMerz@users.noreply.github.com> Date: Wed, 7 Aug 2024 17:14:26 +0200 Subject: [PATCH 54/59] Update check-codeowners.yml --- .github/workflows/check-codeowners.yml | 73 ++++++++++++++++++-------- 1 file changed, 52 insertions(+), 21 deletions(-) diff --git a/.github/workflows/check-codeowners.yml b/.github/workflows/check-codeowners.yml index ac26672..803ebd9 100644 --- a/.github/workflows/check-codeowners.yml +++ b/.github/workflows/check-codeowners.yml @@ -1,35 +1,66 @@ name: PR von Codeowner reviewed on: - pull_request: pull_request_review: - types: [submitted] + types: + - submitted + - edited + - dismissed jobs: codeowners: - if: github.event.review.state == 'approved' - name: Generelle Codeowners (Alle ohne Lernende und neue Mitarbeiter) + name: Check codeowners runs-on: ubuntu-latest - env: - codeowners: "borgiman;gregorbosshard;urva;Matthias-Hess;fdc-cmi;EliaSaSe;bschaeublin;cmiagmbu;cmiagika;HeinzBiglerCMI;DenoshanRajasingam;Luca-Guettinger;jweiss27;juergotter;andreaszingg;marco554;LukasMerz;OliverBecker92;PhilipCereto;cmimar01;SimonSchwendele;cmiagpsc" steps: - - name: Check Codeowners + - name: Check codeowners approval + id: cocheck env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.CMI_GITHUB_TOKEN }} PR: ${{ github.event.pull_request.number }} run: | - gh --version - hasreviewer=false - for reviewer in $(gh pr view $PR --json reviews -q '.reviews[] | select(.state == "APPROVED") | .author["login"]' --repo $GITHUB_REPOSITORY); do - echo "Checking ${reviewer}" - hasreviewer=true - [[ "$reviewer" =~ 'app/' ]] && reviewer="${reviewer:4}" - if [[ "${{ env.codeowners }}" =~ ${reviewer} ]]; then - echo "Found reviewer" - exit 0 - fi + function isApproved { + for reviewer in "${approver[@]}"; do + echo "Try approval of $reviewer" + [[ "$reviewer" =~ 'app/' ]] && reviewer="${reviewer:4}" + [[ "$2" =~ "${reviewer}" ]] && echo "Approved by: $reviewer" && return 0 done - if $hasreviewer; then - echo "Review muss von einem Codeowner durchgeführt werden ${{ env.codeowners }}" - exit 1 + echo "* Review of \`$1\` requires one of \`$2\`" >> missingCos + canContinue='false' + } + + approver=() + mapfile -t approver < <(gh pr view $PR --json reviews -q '.reviews[] | select(.state == "APPROVED") | .author["login"]' --repo $GITHUB_REPOSITORY) + + [[ ${#approver[@]} > 0 ]] || ( echo "At least one approver is required" && exit 1) + + canContinue='true' + isApproved "any" "${{ vars.CO_GENERAL }}" + + echo "MISSING_COS<> $GITHUB_ENV + + echo "CAN_CONTINUE=$canContinue" >> "$GITHUB_OUTPUT" + echo "Output: ${canContinue}" + + if [[ "$canContinue" == 'true' ]];then + echo "No futher approvals required" + echo "No further" >> $GITHUB_ENV + echo "EOF" >> $GITHUB_ENV + exit 0 fi + + echo "Some files require further approvals.." + echo "$(cat ./missingCos)" >> $GITHUB_ENV + echo "EOF" >> $GITHUB_ENV + + exit 1 + + - name: Decorate PR + if: ( success() || failure() ) && steps.cocheck.outputs.CAN_CONTINUE == 'false' + uses: thollander/actions-comment-pull-request@v2.4.2 + with: + message: | + ${{ env.MISSING_COS }} + comment_tag: codeowner_checklist + mode: recreate + create_if_not_exists: true + GITHUB_TOKEN: ${{ secrets.CMI_GITHUBTOKEN_RW }} From 70fc53747b0c1b0d95ad0a7b2b1e8197b7519bce Mon Sep 17 00:00:00 2001 From: Denoshan Rajasingam <35264425+DenoshanRajasingam@users.noreply.github.com> Date: Sun, 1 Jun 2025 08:53:21 +0200 Subject: [PATCH 55/59] Update PULL_REQUEST_TEMPLATE.md --- docs/PULL_REQUEST_TEMPLATE.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/PULL_REQUEST_TEMPLATE.md b/docs/PULL_REQUEST_TEMPLATE.md index 6037a1e..6beff11 100644 --- a/docs/PULL_REQUEST_TEMPLATE.md +++ b/docs/PULL_REQUEST_TEMPLATE.md @@ -9,8 +9,17 @@ __Reminder__ - [ ] Dokumentation ist aktualisiert _(Updatealeitung, Wiki, Readme.md, Installation.md)_. - [ ] YouTrack-Ticket ist mit der Umsetzungsbeschreibung aktualisiert. -- [ ] Status des YouTrack-Tickets ist auf «Behoben» gesetzt. +- [ ] Status des YouTrack-Tickets ist auf «Verifiziert» gesetzt. - [ ] Branch in alle benötigten Release-Branches zurückführen gemäss «zu lösen in». __Dokumentationen__ - [CMI-Webclients Dos and Don’ts](https://cminformatik.atlassian.net/l/cp/usT6kKy5) +- [Branch Handling Umsetzung bis zur Verifikation](https://cminformatik.atlassian.net/wiki/spaces/DOK/pages/1788936221/Tickethandling+Sprint+und+Zeiterfassung#Verifikation-und-Testing) + +__Statushandling Ticketing__ +| **Status** | **Bedeutung** | +|-------------------|-------------------------------------------------------------------------------| +| In Bearbeitung | Feature befindet sich in Entwicklung / Umsetzung | +| Im Review | Entwicklung abgeschlossen, Code wartet auf Review | +| Behoben | Code Review abgeschlossen, Feature bereit zur fachlichen Prüfung | +| Verifiziert | Fachlich abgenommen, Feature wurde in DEV- oder Release-Branch zurückgeführt | From 92f487b60651fc583c32e74df00233727f630373 Mon Sep 17 00:00:00 2001 From: Samuel Schaffranek Date: Fri, 12 Sep 2025 17:41:36 +0200 Subject: [PATCH 56/59] Update PULL_REQUEST_TEMPLATE.md --- docs/PULL_REQUEST_TEMPLATE.md | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/docs/PULL_REQUEST_TEMPLATE.md b/docs/PULL_REQUEST_TEMPLATE.md index 6beff11..0cd1464 100644 --- a/docs/PULL_REQUEST_TEMPLATE.md +++ b/docs/PULL_REQUEST_TEMPLATE.md @@ -1,25 +1,10 @@ -### Todo's -- [ ] Alle Texte welche im UI ersichtlich sind übersetzbar. -- [ ] Unit- / BDD-Tests sind erstellt _(Frage lautet immer: Warum braucht es keine Unit-/BDD-Tests)_. -- [ ] Keine Todo’s im Code _(nur mit Begründung)_. -- [ ] ReSharper Kriterien sind alle grün _(mind. bei neuen Klassen, wenn möglich auch bei geänderten)_. -- [ ] Changelog Eintrag geschrieben _(bei Major oder Minor bump)_. +### Pull Request + +Bitte prüfe dein Feature anhand unserer **[Definition of Done](https://cmiag.cmicloud.ch/#/link/ae4dc12b839240f1a6d5b26f66d40cc7)** – sie ist unser gemeinsamer Qualitätsstandard. -__Reminder__ -- [ ] Dokumentation ist aktualisiert _(Updatealeitung, Wiki, Readme.md, Installation.md)_. -- [ ] YouTrack-Ticket ist mit der Umsetzungsbeschreibung aktualisiert. -- [ ] Status des YouTrack-Tickets ist auf «Verifiziert» gesetzt. -- [ ] Branch in alle benötigten Release-Branches zurückführen gemäss «zu lösen in». __Dokumentationen__ -- [CMI-Webclients Dos and Don’ts](https://cminformatik.atlassian.net/l/cp/usT6kKy5) +- [YouTrack Ticket - Inhalt und Statusübergänge](https://cminformatik.atlassian.net/wiki/spaces/DOK/pages/1520271404/YouTrack+Ticket+-+Inhalt+und+Status+berg+nge) - [Branch Handling Umsetzung bis zur Verifikation](https://cminformatik.atlassian.net/wiki/spaces/DOK/pages/1788936221/Tickethandling+Sprint+und+Zeiterfassung#Verifikation-und-Testing) - -__Statushandling Ticketing__ -| **Status** | **Bedeutung** | -|-------------------|-------------------------------------------------------------------------------| -| In Bearbeitung | Feature befindet sich in Entwicklung / Umsetzung | -| Im Review | Entwicklung abgeschlossen, Code wartet auf Review | -| Behoben | Code Review abgeschlossen, Feature bereit zur fachlichen Prüfung | -| Verifiziert | Fachlich abgenommen, Feature wurde in DEV- oder Release-Branch zurückgeführt | +- [CMI-Webclients Dos and Don’ts](https://cminformatik.atlassian.net/l/cp/usT6kKy5) \ No newline at end of file From 9d1c058b9d3900330aa4c2475c51b6d5227b07a7 Mon Sep 17 00:00:00 2001 From: SimonSchwendele Date: Thu, 18 Dec 2025 13:11:19 +0100 Subject: [PATCH 57/59] [NO-TICKET] add-version-youtrack allows overriding the target version --- .github/workflows/add-version-youtrack.yml | 55 +++++++++++++--------- 1 file changed, 34 insertions(+), 21 deletions(-) diff --git a/.github/workflows/add-version-youtrack.yml b/.github/workflows/add-version-youtrack.yml index 41e7d1b..6cd1329 100644 --- a/.github/workflows/add-version-youtrack.yml +++ b/.github/workflows/add-version-youtrack.yml @@ -4,7 +4,7 @@ name: YouTrack "Gelöst in Version" setzen on: # Triggers the workflow on push or pull request events but only for the "release" branch push: - branches: + branches: - 'release/**' # Allows you to run this workflow manually from the Actions tab @@ -24,25 +24,35 @@ on: default: '70-303' required: false type: string + version_override: + description: 'Expliciti version to set. This should be used when a non release branch should set the version' + required: false + type: string jobs: setup: runs-on: ubuntu-latest outputs: matrix: ${{steps.matrix.outputs.result}} - branch: ${{ steps.extract_branch.outputs.branch }} + version: ${{ steps.extract_version.outputs.targetVersion }} steps: - - name: Extract branch name - shell: bash - run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/release/v.})" - id: extract_branch + - name: Extract version from branch + id: extract_version + run: | + if [[ -n "${{ inputs.version_override }}" ]]; then + echo "Version of ${{ github.ref_name }} overriden with ${{ inputs.version_override }}" + echo "targetVersion=${{ inputs.version_override }}" >> "$GITHUB_OUTPUT" + else + echo "targetVersion=$(echo "${{ github.ref_name }}" | awk -F'v.' '{print $2}')" >> "$GITHUB_OUTPUT" + fi + - name: Get Tickets id: matrix uses: actions/github-script@v6 with: script: | const commits = ${{ toJSON(github.event.commits) }}; - + var includes = []; for (const commit of commits) { var arr = commit.message.match(/[A-Za-z]{2,5}\d{0,5}-\d{1,5}/gi); @@ -50,19 +60,22 @@ jobs: includes.push({message: arr[0]}); } } - + return { include: includes }; - - name: Create Version + + - name: Create Version if missing continue-on-error: true env: YOUTRACK_AUTH_TOKEN: ${{ secrets.YOUTRACK_AUTH_TOKEN }} - uses: fjogeleit/http-request-action@v1 - with: - customHeaders: '{"Authorization": "${{ env.YOUTRACK_AUTH_TOKEN }}"}' - data: '{ "name": "${{ steps.extract_branch.outputs.branch }}", "$type": "VersionBundleElement" }' - method: POST - url: "https://cmiag.myjetbrains.com/api/admin/projects/69-28/customFields/${{ inputs.youtrack_field_id }}/bundle/values?fields=id,name" - + run: | + curl -X POST "https://cmiag.myjetbrains.com/api/admin/projects/69-28/customFields/${{ inputs.youtrack_field_id }}/bundle/values?fields=id,name" \ + -H "Authorization: ${{ env.YOUTRACK_AUTH_TOKEN }}" \ + -H "Content-Type: application/json" \ + -d '{ + "name": "${{ steps.extract_version.outputs.targetVersion }}", + "$type": "VersionBundleElement" + }' + updater: needs: setup runs-on: ubuntu-latest @@ -74,7 +87,7 @@ jobs: env: YOUTRACK_AUTH_TOKEN: ${{ secrets.YOUTRACK_AUTH_TOKEN }} uses: fjogeleit/http-request-action@v1 - with: + with: customHeaders: '{"Authorization": "${{ env.YOUTRACK_AUTH_TOKEN }}"}' method: GET url: "https://cmiag.myjetbrains.com/youtrack/api/issues/${{ matrix.message }}/customFields?fields=name,value(name)" @@ -85,18 +98,18 @@ jobs: script: | const input = ${{ toJSON(steps.getcurrent.outputs.response) }}; const obj = JSON.parse(input); - + var value = []; - + obj.filter(elm => elm.name == "${{ inputs.youtrack_field_name }}")[0].value.forEach(elm => value.push({"name": elm.name})); - value.push({"name": "${{ needs.setup.outputs.branch }}"}); + value.push({"name": "${{ needs.setup.outputs.version }}"}); return {"customFields":[{"name":"${{ inputs.youtrack_field_name }}","$type":"MultiVersionIssueCustomField","value": value}]} - name: "set fix version in youtrack" env: YOUTRACK_AUTH_TOKEN: ${{ secrets.YOUTRACK_AUTH_TOKEN }} uses: fjogeleit/http-request-action@v1 - with: + with: customHeaders: '{"Authorization": "${{ env.YOUTRACK_AUTH_TOKEN }}", "Content-Type": "application/json", "Accept": "application/json"}' data: ${{ steps.builddata.outputs.result }} method: POST From 8ff131648e712919297eb724406e5944069c5bcf Mon Sep 17 00:00:00 2001 From: Lukas Merz <81758471+LukasMerz@users.noreply.github.com> Date: Thu, 18 Dec 2025 13:13:48 +0100 Subject: [PATCH 58/59] [NO-TICKET] Fix typo in version_override description --- .github/workflows/add-version-youtrack.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/add-version-youtrack.yml b/.github/workflows/add-version-youtrack.yml index 6cd1329..ba8896d 100644 --- a/.github/workflows/add-version-youtrack.yml +++ b/.github/workflows/add-version-youtrack.yml @@ -25,7 +25,7 @@ on: required: false type: string version_override: - description: 'Expliciti version to set. This should be used when a non release branch should set the version' + description: 'Explicit version to set. This should be used when a non release branch should set the version' required: false type: string From ea8a371c07dbf088f4cb0d6219a10a92a4fc18f5 Mon Sep 17 00:00:00 2001 From: Patrick Borgogno <789401+borgiman@users.noreply.github.com> Date: Wed, 18 Mar 2026 12:19:48 +0100 Subject: [PATCH 59/59] chore: remove workflow-templates folder --- .../ci-dotnet-core.properties.json | 8 -- workflow-templates/ci-dotnet-core.yml | 30 ----- .../release-dotnet-core.properties.json | 8 -- workflow-templates/release-dotnet-core.yml | 104 ------------------ workflow-templates/release.svg | 1 - 5 files changed, 151 deletions(-) delete mode 100644 workflow-templates/ci-dotnet-core.properties.json delete mode 100644 workflow-templates/ci-dotnet-core.yml delete mode 100644 workflow-templates/release-dotnet-core.properties.json delete mode 100644 workflow-templates/release-dotnet-core.yml delete mode 100644 workflow-templates/release.svg diff --git a/workflow-templates/ci-dotnet-core.properties.json b/workflow-templates/ci-dotnet-core.properties.json deleted file mode 100644 index ffb9b25..0000000 --- a/workflow-templates/ci-dotnet-core.properties.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "CI Build for .NET Core Services", - "description": "Standardvorlage für einen .NET Core Service", - "iconName": "release", - "categories": [ - "C#" - ] -} diff --git a/workflow-templates/ci-dotnet-core.yml b/workflow-templates/ci-dotnet-core.yml deleted file mode 100644 index 3e6c81b..0000000 --- a/workflow-templates/ci-dotnet-core.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: .NET Core CI Build - -on: - workflow_dispatch: - inputs: - comment: - description: 'Bemerkung' - required: false - pull_request: - branches: [ develop ] - -jobs: - build: - runs-on: ubuntu-latest - env: - APP_NAME: APP-Name (Bsp. cmi-push-service) - steps: - - name: Check Out - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: Build docker image and push - uses: CMInformatik/dotnet-build@main - with: - app-name: ${{env.APP_NAME}} - myget-pre-auth-url: ${{secrets.MYGET_PRE_AUTH_URL}} - docker-password: ${{secrets.DOCKER_PASSWORD}} - docker-username: ${{secrets.DOCKER_USERNAME}} - build-configuration: debug diff --git a/workflow-templates/release-dotnet-core.properties.json b/workflow-templates/release-dotnet-core.properties.json deleted file mode 100644 index 196d200..0000000 --- a/workflow-templates/release-dotnet-core.properties.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "Release Build for .NET Core Services", - "description": "Standardvorlage für einen .NET Core Service", - "iconName": "release", - "categories": [ - "C#" - ] -} diff --git a/workflow-templates/release-dotnet-core.yml b/workflow-templates/release-dotnet-core.yml deleted file mode 100644 index 02e7499..0000000 --- a/workflow-templates/release-dotnet-core.yml +++ /dev/null @@ -1,104 +0,0 @@ -name: .NET Core Release Build - -on: - workflow_dispatch: - inputs: - comment: - description: 'Bemerkung' - required: false - pull_request: - branches: [ master ] - push: - branches: [ master ] - -jobs: - build: - runs-on: ubuntu-latest - env: - APP_NAME: APP-Name (Bsp. cmi-push-service) - OCTOPUS_PACKAGE_NAME: Package-Name for Octopus (Bsp. CMI.PushService) - outputs: - version: ${{ steps.buildAndPush.outputs.version}} - artifact-name: ${{ steps.buildAndPush.outputs.artifact-name}} - is-pre-release: ${{ steps.buildAndPush.outputs.is-pre-release}} - steps: - - name: Check Out - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - id: buildAndPush - name: Build docker image and push - uses: CMInformatik/dotnet-build@main - with: - app-name: ${{env.APP_NAME}} - myget-pre-auth-url: ${{secrets.MYGET_PRE_AUTH_URL}} - docker-password: ${{secrets.DOCKER_PASSWORD}} - docker-username: ${{secrets.DOCKER_USERNAME}} - build-configuration: release - - - name: Install Octopus CLI - run: | - sudo apt update && sudo apt install --no-install-recommends gnupg curl ca-certificates apt-transport-https && \ - curl -sSfL https://apt.octopus.com/public.key | sudo apt-key add - && \ - sudo sh -c "echo deb https://apt.octopus.com/ stable main > /etc/apt/sources.list.d/octopus.com.list" && \ - sudo apt update && sudo apt install octopuscli - - - name: Create Ocotpus package - run: | - mkdir -p ./packages - octo pack --id="${{env.OCTOPUS_PACKAGE_NAME}}" --format="Zip" --version="${{steps.buildAndPush.outputs.version}}" --basePath="./extracted-app" --outFolder="./packages" - - - name: Push to Octopus - run: octo push --package="./packages/${{env.OCTOPUS_PACKAGE_NAME}}.${{steps.buildAndPush.outputs.version}}.zip" --server="${{ secrets.OCTOPUS_SERVER_URL }}" --apiKey="${{ secrets.OCTOPUS_API_KEY }}" - - - name: Convert markdown to PDF - uses: CMInformatik/markdown-to-pdf@master - with: - input_dir: doc - output_dir: Dokumentation - build_html: false - - - name: Upload PDF as artifact - uses: actions/upload-artifact@v1 - with: - name: Dokumentation - path: Dokumentation - - createRelease: - needs: build - runs-on: ubuntu-latest - - steps: - - name: Create release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: v.${{ needs.build.outputs.version }} - release_name: v.${{ needs.build.outputs.version }} - draft: false - prerelease: ${{ needs.build.outputs.is-pre-release }} - - - name: Download artifacts - id: download_artifacts - uses: actions/download-artifact@v2 - with: - path: ./ - - - name: Create artifacts archive - run: | - cd ${{steps.download_artifacts.outputs.download-path}} - mv ${{ needs.build.outputs.artifact-name }} Installationsdateien - zip -r ./result.zip . - - - name: Upload release asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./result.zip - asset_name: ${{ needs.build.outputs.artifact-name }}.zip - asset_content_type: application/zip diff --git a/workflow-templates/release.svg b/workflow-templates/release.svg deleted file mode 100644 index 021ce92..0000000 --- a/workflow-templates/release.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file