Skip to content

Commit b0bc3f9

Browse files
authored
feat: release 1.0.0 of @mdf.js library (#2)
1 parent ce61edc commit b0bc3f9

File tree

1,046 files changed

+76618
-201
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,046 files changed

+76618
-201
lines changed

.bin/GitVersion-linux.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
mono /home/ubuntu/GitVersion/GitVersion.exe /output buildserver /nofetch

.config/GitVersion.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
assembly-versioning-scheme: None
2+
branches:
3+
master:
4+
regex: ^master
5+
tag: ''
6+
mode: ContinuousDeployment
7+
increment: None
8+
prevent-increment-of-merged-branch-version: true
9+
track-merge-target: false
10+
tracks-release-branches: false
11+
is-release-branch: false
12+
release:
13+
regex: ^releases?[/-]
14+
tag: beta
15+
mode: ContinuousDeployment
16+
increment: Minor
17+
prevent-increment-of-merged-branch-version: true
18+
track-merge-target: false
19+
tracks-release-branches: false
20+
is-release-branch: true
21+
feature:
22+
regex: ^features?[/-]
23+
tag: useBranchName
24+
mode: ContinuousDeployment
25+
increment: Inherit
26+
prevent-increment-of-merged-branch-version: true
27+
track-merge-target: false
28+
tracks-release-branches: false
29+
is-release-branch: false
30+
pull-request:
31+
regex: ^(pull|pull\-requests|pr)[/-]
32+
tag: PullRequest
33+
mode: ContinuousDeployment
34+
increment: Inherit
35+
prevent-increment-of-merged-branch-version: false
36+
tag-number-pattern: '[/-](?<number>\d+)[-/]'
37+
track-merge-target: false
38+
tracks-release-branches: false
39+
is-release-branch: false
40+
hotfix:
41+
regex: ^hotfix(es)?[/-]
42+
tag: beta
43+
mode: ContinuousDeployment
44+
increment: Patch
45+
prevent-increment-of-merged-branch-version: false
46+
track-merge-target: false
47+
tracks-release-branches: false
48+
is-release-branch: false
49+
develop:
50+
regex: ^dev(elop)?(ment)?$
51+
tag: alpha
52+
mode: ContinuousDeployment
53+
increment: none
54+
prevent-increment-of-merged-branch-version: true
55+
track-merge-target: true
56+
tracks-release-branches: true
57+
is-release-branch: false

.config/azure-pipelines.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
## Template for a monorepository based on GitFlow, Docker and DockerCompose in Netin Development Ecosystem
2+
name: mdf-js$(Date:yyyyMMdd)$(Rev:.r)
3+
## CI trigger based on GitFlow
4+
trigger:
5+
- master
6+
- develop
7+
- release/*
8+
- hotfix/*
9+
- feature/*
10+
pr:
11+
- master
12+
- develop
13+
## Netin - Variables
14+
variables:
15+
## Artifact name
16+
- name: artifactName
17+
value: 'mdf-js-api'
18+
## Node version
19+
- name: nodeVersion
20+
value: '18'
21+
## Releases Wiki page
22+
- name: artifactWikiFileName
23+
value: '@mdf.js%2Djs-%2D-API'
24+
## GitFlow variables for branch maching
25+
- template: mdf-pipelines-variables.yml
26+
stages:
27+
- stage: 'APP'
28+
displayName: 'Application Build'
29+
pool:
30+
name: NUCHUB
31+
jobs:
32+
- job: 'CODE_QUALITY'
33+
displayName: 'Code Quality Assurance'
34+
workspace:
35+
clean: all
36+
timeoutInMinutes: 30
37+
steps:
38+
- checkout: self
39+
clean: true
40+
persistCredentials: true
41+
fetchDepth: 0
42+
- template: mdf-setup-gitversion.yml
43+
- template: mdf-setup-node-and-yarn.yml
44+
parameters:
45+
nodeVersion: ${{variables.nodeVersion}}
46+
- template: mdf-test-monorepo.yml
47+
- template: mdf-test-sonarqube-analysis.yml
48+
- template: mdf-publish-artifacts-lerna.yml
49+
# - template: mdf-release-library-version.yml
50+
# parameters:
51+
# artifactName: ${{variables.artifactName}}
52+
# artifactWikiFileName: ${{variables.artifactWikiFileName}}

.config/customFormat.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"name": "",
3+
"version": "",
4+
"description": "",
5+
"repository": "",
6+
"email": "",
7+
"url": "",
8+
"licenses": "",
9+
"copyright": "",
10+
"licenseFile": "none",
11+
"licenseText": "none",
12+
"licenseModified": "no"
13+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
variables:
2+
- group: NPM-Secrets
3+
#- group: Netin-Signing
4+
#- group: Netin-Release
5+
- name: isMaster
6+
value: ${{ eq(variables['Build.SourceBranch'], 'refs/heads/master') }}
7+
- name: isDevelop
8+
value: ${{ eq(variables['Build.SourceBranch'], 'refs/heads/develop') }}
9+
- name: isRelease
10+
value: ${{ startsWith(variables['Build.SourceBranch'], 'refs/heads/release/') }}
11+
- name: isHotfix
12+
value: ${{ startsWith(variables['Build.SourceBranch'], 'refs/heads/hotfix/') }}
13+
- name: isFeature
14+
value: ${{ startsWith(variables['Build.SourceBranch'], 'refs/heads/feature/') }}
15+
- name: isPR
16+
value: ${{ eq(variables['Build.Reason'], 'PullRequest') }}
17+
- name: isManual
18+
value: ${{ eq(variables['Build.Reason'], 'Manual') }}
19+
- name: isBuildable
20+
value: ${{ or(eq(variables['Build.SourceBranch'], 'refs/heads/master'), eq(variables['Build.SourceBranch'], 'refs/heads/develop'), startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'), startsWith(variables['Build.SourceBranch'], 'refs/heads/hotfix/'), eq(variables['Build.Reason'], 'PullRequest')) }}
21+
- name: imageTag
22+
${{ if eq(variables.isFeature, true) }}:
23+
value: 'nighty'
24+
${{ if or(eq(variables.isRelease, true), eq(variables.isHotfix, true)) }}:
25+
value: 'beta'
26+
${{ if eq(variables.isDevelop, true) }}:
27+
value: 'alpha'
28+
${{ if eq(variables.isMaster, true) }}:
29+
value: 'latest'
30+
${{ if eq(variables.isPR, true) }}:
31+
value: 'test'
32+
- name: dockerTag
33+
${{ if eq(variables.isFeature, true) }}:
34+
value: $(Build.SourceBranchName)
35+
${{ if eq(variables.isPR, true) }}:
36+
value: $(Build.SourceBranchName)
37+
${{ if or(eq(variables.isRelease, true), eq(variables.isHotfix, true)) }}:
38+
value: 'beta'
39+
${{ if eq(variables.isDevelop, true) }}:
40+
value: 'alpha'
41+
${{ if eq(variables.isMaster, true) }}:
42+
value: 'latest'
43+
- name: disable.coverage.autogenerate
44+
value: 'true'
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
steps:
2+
- task: Yarn@3
3+
displayName: 'Install node_modules with devDependencies'
4+
inputs:
5+
projectDirectory: '.'
6+
arguments: 'install'
7+
8+
- task: Yarn@3
9+
displayName: Publish package to internal feed as oficial version
10+
condition: and(succeeded(), eq(variables.isMaster, true))
11+
inputs:
12+
projectDirectory: '.'
13+
arguments: 'lerna publish $(Build.BuildNumber) --amend --dist-tag latest --conventional-commits --loglevel silly -m "chore(release): publish %v" --yes'
14+
customEndpoint: 'NPM-Registry'
15+
continueOnError: true
16+
17+
- task: Yarn@3
18+
displayName: Publish package to internal feed as beta version
19+
condition: and(succeeded(), or(eq(variables.isRelease, true), eq(variables.isHotfix, true)))
20+
inputs:
21+
projectDirectory: '.'
22+
arguments: 'lerna publish $(Build.BuildNumber) --amend --pre-dist-tag beta --loglevel silly -m "chore(release): publish %v" --yes'
23+
customEndpoint: 'NPM-Registry'
24+
continueOnError: true
25+
26+
- task: Yarn@3
27+
displayName: Publish package to internal feed as alfa version
28+
condition: and(succeeded(), eq(variables.isDevelop, true))
29+
inputs:
30+
projectDirectory: '.'
31+
arguments: 'lerna publish $(Build.BuildNumber) --amend --dist-tag alpha --loglevel silly -m "chore(release): publish %v" --yes'
32+
customEndpoint: 'NPM-Registry'
33+
continueOnError: true
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# ## Netin - Parameters for release process of a new artifact version
2+
# parameters:
3+
# - name: artifactName
4+
# displayName: NDF artifact mame
5+
# type: string
6+
# default: NameNotSet
7+
# - name: artifactWikiFileName
8+
# displayName: Name of the WIKI file
9+
# default: $(artifactName)
10+
# stages:
11+
# - stage: 'RELEASE'
12+
# condition: eq(variables.isMaster, true)
13+
# displayName: 'Release process for ${{parameters.artifactName}} artifact for version $(Build.BuildNumber)'
14+
# pool:
15+
# name: NUCHUB
16+
# jobs:
17+
# - deployment: 'PROCESS'
18+
# displayName: 'Perform the release publication'
19+
# workspace:
20+
# clean: 'all'
21+
# timeoutInMinutes: 15
22+
# environment:
23+
# name: 'NETIN-PUBLIC-RELEASES'
24+
# strategy:
25+
# runOnce:
26+
# deploy:
27+
# steps:
28+
# - checkout: self
29+
# clean: true
30+
# persistCredentials: true
31+
# - template: mdf-setup-gitversion.yml
32+
# - template: mdf-setup-node-and-yarn.yml
33+
# - template: mdf-release-publish-release-notes.yml
34+
# parameters:
35+
# artifactName: ${{parameters.artifactName}}
36+
# artifactWikiFileName: ${{parameters.artifactWikiFileName}}
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
# # Netin - Parameters for Release notes generation and publish
2+
# parameters:
3+
# - name: artifactName
4+
# displayName: NDF artifact mame
5+
# type: string
6+
# default: NameNotSet
7+
# - name: artifactWikiFileName
8+
# displayName: Name of the WIKI file
9+
# default: $(artifactName)
10+
# steps:
11+
# - task: XplatGenerateReleaseNotes@3
12+
# displayName: Generate Release Notes
13+
# inputs:
14+
# outputfile: 'RELEASE.md'
15+
# templateLocation: 'InLine'
16+
# inlinetemplate: |
17+
# --------------------------------------------
18+
19+
# ## 🚀 **{{buildDetails.buildNumber}}** - {{date buildDetails.finishTime "DD-MM-YYYY"}}
20+
# {{#if (hasWorkItemType this.workItems 'Feature')}}
21+
22+
# ### 🆕 Features
23+
24+
# {{#forEach this.workItems}}
25+
# {{#if (eq (lookup this.fields 'System.WorkItemType' ) 'Feature')}}
26+
# - #{{this.id}}
27+
# {{#if (lookup this.fields 'System.ReleaseNotes')}}
28+
# - {{ sanitize (lookup this.fields 'System.ReleaseNotes')}}
29+
# {{/if}}
30+
# {{/if}}
31+
# {{/forEach}}
32+
33+
34+
# {{/if}}
35+
# {{#if (hasWorkItemType this.workItems 'Requirement')}}
36+
# ### 🔧 Notable changes
37+
38+
# {{#forEach this.workItems}}
39+
# {{#if (eq (lookup this.fields 'System.ReleaseNotes' ) 'Requirement')}}
40+
# - #{{this.id}}
41+
# {{#if (lookup this.fields 'System.Description')}}
42+
# - {{ sanitize (lookup this.fields 'System.ReleaseNotes')}}
43+
# {{/if}}
44+
# {{/if}}
45+
# {{/forEach}}
46+
47+
48+
# {{/if}}
49+
# {{#if (hasWorkItemType this.workItems 'Bug')}}
50+
# ### 🐞 Bugfixes
51+
52+
# {{#forEach this.workItems}}
53+
# {{#if (eq (lookup this.fields 'System.WorkItemType' ) 'Bug')}}
54+
# - #{{this.id}}
55+
# {{#if (lookup this.fields 'System.ReleaseNotes')}}
56+
# - {{sanitize (lookup this.fields 'System.ReleaseNotes')}}
57+
# {{/if}}
58+
# {{/if}}
59+
# {{/forEach}}
60+
61+
62+
# {{/if}}
63+
# {{#if (hasWorkItemType this.workItems 'Upgrade')}}
64+
# ### ⬆️ Upgrades
65+
66+
# {{#forEach this.workItems}}
67+
# {{#if (eq (lookup this.fields 'System.WorkItemType' ) 'Upgrade')}}
68+
# - #{{this.id}}
69+
# {{#if (lookup this.fields 'System.ReleaseNotes')}}
70+
# - {{sanitize (lookup this.fields 'System.ReleaseNotes')}}
71+
# {{/if}}
72+
# {{/if}}
73+
# {{/forEach}}
74+
75+
76+
# {{/if}}
77+
# checkStage: true
78+
# stopOnRedeploy: true
79+
# sortWi: true
80+
# dumpPayloadToConsole: true
81+
# dumpPayloadToFile: false
82+
# replaceFile: true
83+
# getParentsAndChildren: true
84+
# getAllParents: true
85+
# getIndirectPullRequests: False
86+
# stopOnError: False
87+
# considerPartiallySuccessfulReleases: False
88+
# customHandlebarsExtensionCode: |
89+
# module.exports = {
90+
# hasWorkItemType: function (array, typeName) {
91+
# return array.some(workItem => workItem.fields['System.WorkItemType'] === typeName);
92+
# }
93+
# }
94+
# - task: WikiUpdaterTask@1
95+
# displayName: Push release notes to WIKI
96+
# inputs:
97+
# repo: 'https://devopmytra.visualstudio.com/NetinSystems/_git/NS-Artifacts_Release_Notes-WIKI'
98+
# filename: '${{parameters.artifactWikiFileName}}.md'
99+
# replaceFile: false
100+
# dataIsFile: true
101+
# sourceFile: 'RELEASE.md'
102+
# message: 'doc(wiki): update release notes for ${{parameters.artifactName}}'
103+
# gitname: '$BUILD_REQUESTEDFOR'
104+
# gitemail: '$BUILD_REQUESTEDFOREMAIL'
105+
# user: $(WIKI_REPO_USER)
106+
# password: $(WIKI_REPO_PAT)
107+
# useAgentToken: false
108+
# trimLeadingSpecialChar: true
109+
# fixSpaces: true
110+
# insertLinefeed: false

.config/mdf-setup-gitversion.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
steps:
2+
- task: Bash@3
3+
displayName: 'Set git config email & name'
4+
inputs:
5+
targetType: 'inline'
6+
script: |
7+
git config --global user.email $BUILD_REQUESTEDFOREMAIL
8+
git config --global user.name "$BUILD_REQUESTEDFOR"
9+
echo $BUILD_REQUESTEDFOREMAIL
10+
echo "$BUILD_REQUESTEDFOR"
11+
12+
- task: gitversion/setup@0
13+
displayName: 'Use GitVersion Setup'
14+
inputs:
15+
versionSpec: '5.x'
16+
17+
- task: gitversion/execute@0
18+
displayName: 'Use GitVersion Execute'
19+
inputs:
20+
useConfigFile: true
21+
configFilePath: './.config/GitVersion.yml'
22+
name: 'Version'

0 commit comments

Comments
 (0)