Skip to content

Implemented release pipelines #198

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/main-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ jobs:
run: npm install -g azure-functions-core-tools@4
working-directory: durablefunctionsmonitor-vscodeext
- name: run tests on durablefunctionsmonitor-vscodeext
# TODO: vscode test pipeline was broken, need to investigate and fix
if: 'false'
run: npm run test
working-directory: durablefunctionsmonitor-vscodeext
Expand Down
75 changes: 75 additions & 0 deletions .github/workflows/push-to-docker-hub.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@

name: push-to-docker-hub

on:
workflow_dispatch:
inputs:
imageTag:
description: Docker image tag to be applied
required: true

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

# Building and copying React

- name: npm install durablefunctionsmonitor.react
run: npm install -legacy-peer-deps
working-directory: durablefunctionsmonitor.react
- name: npm build durablefunctionsmonitor.react
run: npm run build
working-directory: durablefunctionsmonitor.react

- name: copy statics to durablefunctionsmonitor.dotnetbackend/DfmStatics
run: |
rm -rf durablefunctionsmonitor.dotnetbackend/DfmStatics
cp -r durablefunctionsmonitor.react/build durablefunctionsmonitor.dotnetbackend/DfmStatics

- name: copy statics to durablefunctionsmonitor.dotnetisolated/DfmStatics
run: |
rm -rf durablefunctionsmonitor.dotnetisolated/DfmStatics
cp -r durablefunctionsmonitor.react/build durablefunctionsmonitor.dotnetisolated/DfmStatics

# Building and testing .NET

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x

- name: dotnet test tests/durablefunctionsmonitor.dotnetbackend.tests
run: dotnet test tests/durablefunctionsmonitor.dotnetbackend.tests/*.csproj
- name: dotnet test tests/durablefunctionsmonitor.dotnetisolated.core.tests
run: dotnet test tests/durablefunctionsmonitor.dotnetisolated.core.tests/*.csproj

- name: login to Docker hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: build and push durablefunctionsmonitor.dotnetbackend
uses: docker/build-push-action@v6
with:
context: ./durablefunctionsmonitor.dotnetbackend
push: true
tags: scaletone/durablefunctionsmonitor:${{ github.event.inputs.imageTag }}

- name: build and push custom-backends/mssql
uses: docker/build-push-action@v6
with:
context: ./custom-backends/mssql
push: true
tags: scaletone/durablefunctionsmonitor.mssql:${{ github.event.inputs.imageTag }}

- name: build and push custom-backends/netherite
uses: docker/build-push-action@v6
with:
context: ./custom-backends/netherite
push: true
tags: scaletone/durablefunctionsmonitor.netherite:${{ github.event.inputs.imageTag }}
80 changes: 80 additions & 0 deletions .github/workflows/push-to-nuget.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@

name: push-to-nuget

on:
workflow_dispatch:

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: create ArtifactStagingDirectory folder
run: mkdir drop

# Building and copying React

- name: npm install durablefunctionsmonitor.react
run: npm install -legacy-peer-deps
working-directory: durablefunctionsmonitor.react
- name: npm build durablefunctionsmonitor.react
run: npm run build
working-directory: durablefunctionsmonitor.react

- name: copy statics to durablefunctionsmonitor.dotnetbackend/DfmStatics
run: |
rm -rf durablefunctionsmonitor.dotnetbackend/DfmStatics
cp -r durablefunctionsmonitor.react/build durablefunctionsmonitor.dotnetbackend/DfmStatics

- name: copy statics to durablefunctionsmonitor.dotnetisolated/DfmStatics
run: |
rm -rf durablefunctionsmonitor.dotnetisolated/DfmStatics
cp -r durablefunctionsmonitor.react/build durablefunctionsmonitor.dotnetisolated/DfmStatics

# Building and testing .NET

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x

- name: dotnet test tests/durablefunctionsmonitor.dotnetbackend.tests
run: dotnet test tests/durablefunctionsmonitor.dotnetbackend.tests/*.csproj
- name: dotnet test tests/durablefunctionsmonitor.dotnetisolated.core.tests
run: dotnet test tests/durablefunctionsmonitor.dotnetisolated.core.tests/*.csproj

- name: copy durablefunctionsmonitor.dotnetbackend to ArtifactStagingDirectory
run: cp -r durablefunctionsmonitor.dotnetbackend drop/durablefunctionsmonitor.dotnetbackend

- name: copy durablefunctionsmonitor.dotnetisolated to ArtifactStagingDirectory
run: cp -r durablefunctionsmonitor.dotnetisolated drop/durablefunctionsmonitor.dotnetisolated

- name: dotnet publish durablefunctionsmonitor.dotnetbackend
run: dotnet publish durablefunctionsmonitor.dotnetbackend --output drop/durablefunctionsmonitor.dotnetbackend/output
- name: dotnet publish durablefunctionsmonitor.dotnetisolated
run: dotnet publish durablefunctionsmonitor.dotnetisolated --output drop/durablefunctionsmonitor.dotnetisolated/output

# Building nuget packages

- name: copy LICENSE to durablefunctionsmonitor.dotnetbackend/output
run: cp LICENSE drop/durablefunctionsmonitor.dotnetbackend/output
- name: copy LICENSE.txt to durablefunctionsmonitor.dotnetisolated/output
run: cp durablefunctionsmonitor.dotnetisolated/LICENSE.txt drop/durablefunctionsmonitor.dotnetisolated/output

- name: Install latest nuget.exe
uses: nuget/setup-nuget@v1.2.0
- name: package dotnetbackend into a Nuget package
run: nuget pack drop/durablefunctionsmonitor.dotnetbackend/output/nuspec.nuspec -OutputDirectory drop
- name: package dotnetisolated into a Nuget package
run: nuget pack drop/durablefunctionsmonitor.dotnetisolated/output/nuspec.nuspec -OutputDirectory drop

# Pushing nuget packages

- name: push nuget packages
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: nuget push drop/*.nupkg -ApiKey $(NUGET_API_KEY) -src https://api.nuget.org/v3/index.json

93 changes: 93 additions & 0 deletions .github/workflows/push-to-vscode-marketplace.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@

name: push-to-vscode-marketplace

on:
workflow_dispatch:

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: create ArtifactStagingDirectory folder
run: mkdir drop

# Building and copying React

- name: npm install durablefunctionsmonitor.react
run: npm install -legacy-peer-deps
working-directory: durablefunctionsmonitor.react
- name: npm build durablefunctionsmonitor.react
run: npm run build
working-directory: durablefunctionsmonitor.react

- name: copy statics to durablefunctionsmonitor.dotnetbackend/DfmStatics
run: |
rm -rf durablefunctionsmonitor.dotnetbackend/DfmStatics
cp -r durablefunctionsmonitor.react/build durablefunctionsmonitor.dotnetbackend/DfmStatics

- name: copy statics to durablefunctionsmonitor.dotnetisolated/DfmStatics
run: |
rm -rf durablefunctionsmonitor.dotnetisolated/DfmStatics
cp -r durablefunctionsmonitor.react/build durablefunctionsmonitor.dotnetisolated/DfmStatics

# Building and testing .NET

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x

- name: dotnet test tests/durablefunctionsmonitor.dotnetbackend.tests
run: dotnet test tests/durablefunctionsmonitor.dotnetbackend.tests/*.csproj
- name: dotnet test tests/durablefunctionsmonitor.dotnetisolated.core.tests
run: dotnet test tests/durablefunctionsmonitor.dotnetisolated.core.tests/*.csproj

- name: copy durablefunctionsmonitor.dotnetbackend to ArtifactStagingDirectory
run: cp -r durablefunctionsmonitor.dotnetbackend drop/durablefunctionsmonitor.dotnetbackend

- name: copy durablefunctionsmonitor.dotnetisolated to ArtifactStagingDirectory
run: cp -r durablefunctionsmonitor.dotnetisolated drop/durablefunctionsmonitor.dotnetisolated

- name: dotnet publish durablefunctionsmonitor.dotnetbackend
run: dotnet publish durablefunctionsmonitor.dotnetbackend --output drop/durablefunctionsmonitor.dotnetbackend/output
- name: dotnet publish durablefunctionsmonitor.dotnetisolated
run: dotnet publish durablefunctionsmonitor.dotnetisolated --output drop/durablefunctionsmonitor.dotnetisolated/output

# Building and testing vscode extension

- name: copy dotnetbackend to durablefunctionsmonitor-vscodeext/backend
run: cp -r drop/durablefunctionsmonitor.dotnetbackend/output durablefunctionsmonitor-vscodeext/backend

- name: copy custom-backends to durablefunctionsmonitor-vscodeext/custom-backends
run: cp -r custom-backends durablefunctionsmonitor-vscodeext/custom-backends

- name: npm install durablefunctionsmonitor-vscodeext
run: npm install
working-directory: durablefunctionsmonitor-vscodeext
- name: npm install -g azure-functions-core-tools@4
run: npm install -g azure-functions-core-tools@4
working-directory: durablefunctionsmonitor-vscodeext
- name: run tests on durablefunctionsmonitor-vscodeext
# TODO: vscode test pipeline was broken, need to investigate and fix
if: 'false'
run: npm run test
working-directory: durablefunctionsmonitor-vscodeext
- name: package durablefunctionsmonitor-vscodeext to VSIX-file
run: npm run package
working-directory: durablefunctionsmonitor-vscodeext
- name: copy VSIX-file to ArtifactStagingDirectory
run: cp durablefunctionsmonitor-vscodeext/durablefunctionsmonitor*.vsix drop

# Publish VSIX

- name: npm install vsce
run: npm install -g vsce

- name: publish vsix
env:
VSCODE_MARKETPLACE_PAT: ${{ secrets.VSCODE_MARKETPLACE_PAT }}
run: vsce publish --pat $(VSCODE_MARKETPLACE_PAT) --packagePath drop/durablefunctionsmonitor*.vsix
Loading