Skip to content

Commit 98e168c

Browse files
BUILD-6086: Release pipeline to push to test project (#5652)
BUILD-6086: Release pipeline to push to test project Signed-off-by: Jayadeep Kinavoor Madam <jayadeep.kinavoormadam@sonarsource.com>
1 parent c475603 commit 98e168c

File tree

3 files changed

+239
-0
lines changed

3 files changed

+239
-0
lines changed

.github/workflows/release.yaml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: sonar-release
2+
# This workflow is triggered when publishing a new github release
3+
on:
4+
release:
5+
types:
6+
- published
7+
8+
env:
9+
PYTHONUNBUFFERED: 1
10+
11+
jobs:
12+
release:
13+
permissions:
14+
id-token: write
15+
contents: write
16+
uses: SonarSource/gh-action_release/.github/workflows/main.yaml@v5
17+
with:
18+
publishToBinaries: false
19+
mavenCentralSync: false
20+
slackChannel: squad-ide-visualstudio
21+
22+
deploy_to_microsoft_marketplace:
23+
permissions:
24+
id-token: write
25+
contents: write
26+
runs-on: windows-latest
27+
name: Deploy to Visual Studio marketplace
28+
# TODO: Uncomment this once releasability checks are confirmed to be working
29+
# needs: release
30+
env:
31+
RELEASE_TAG: ${{ github.event.release.tag_name }}
32+
steps:
33+
- uses: actions/checkout@v3
34+
- name: Get vault secrets
35+
id: secrets
36+
uses: SonarSource/vault-action-wrapper@v3
37+
with:
38+
secrets: |
39+
development/artifactory/token/{REPO_OWNER_NAME_DASH}-private-reader access_token | ARTIFACTORY_ACCESS_TOKEN;
40+
development/kv/data/visualstudio VSCE_TOKEN | VCSE_TOKEN
41+
42+
- name: Setup JFrog
43+
uses: SonarSource/jfrog-setup-wrapper@907e87c3d2081a98d2ab8cb03284ee6711f1ee83 # tag=3.2.3
44+
with:
45+
jfrogAccessToken: ${{ fromJSON(steps.secrets.outputs.vault).ARTIFACTORY_ACCESS_TOKEN }}
46+
47+
- name: Create local directory
48+
id: local_repo
49+
shell: bash
50+
run: echo "dir=$(mktemp -d repo.XXXXXXXX)" >> $GITHUB_OUTPUT
51+
52+
- name: Get the version
53+
id: get_version
54+
shell: bash
55+
run: |
56+
IFS=. read -r major minor patch build <<< "$RELEASE_TAG"
57+
echo "build=${build}" >> $GITHUB_OUTPUT
58+
echo "version=${major}.${minor}.${patch}" >> $GITHUB_OUTPUT
59+
60+
- name: Download Artifacts
61+
uses: SonarSource/gh-action_release/download-build@master
62+
with:
63+
build-number: ${{ steps.get_version.outputs.build }}
64+
local-repo-dir: ${{ steps.local_repo.outputs.dir }}
65+
# TODO: Change this to sonarsource-public-releases once releasability checks are confirmed to be working
66+
remote-repo: sonarsource-public-builds
67+
flat-download: true
68+
download-checksums: false
69+
70+
- name: Publish extension to Marketplace
71+
uses: cezarypiatek/VsixPublisherAction@1.1
72+
with:
73+
extension-file: ${{ steps.local_repo.outputs.dir }}\SonarLint.VSIX-${{env.RELEASE_TAG}}-2022.vsix
74+
# TODO: Rename VS2022Test to VS20202 when doing actual release
75+
publish-manifest-file: MarketPlaceFiles\VS2022Test\manifest-2022.json
76+
personal-access-code: ${{ fromJSON(steps.secrets.outputs.vault).VCSE_TOKEN }}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"$schema": "http://json.schemastore.org/vsix-publish",
3+
"categories": [ "Coding", "Programming Languages", "Security" ],
4+
"identity": {
5+
"internalName": "SonarLintforVisualStudio2022Test"
6+
},
7+
"overview": "overview-2022.md",
8+
"priceCategory": "free",
9+
"publisher": "SonarSource",
10+
"private": true,
11+
"qna": false,
12+
"repo": "https://github.com/SonarSource/sonarlint-visualstudio"
13+
}
Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
## **SonarLint: Your first line of defense for quality and secure code**
2+
3+
SonarLint helps you detect and fix Bugs, Code Smells, and Security Vulnerabilities in-IDE.
4+
5+
It supports C#, VB.NET, C, C++, JS, and TS. The extension highlights coding flaws on the fly and provides clear guidance to fix issues before code is committed.
6+
7+
## **What is SonarLint**
8+
9+
SonarLint is a **_Free_** and **_Open Source_** IDE extension that identifies and helps you fix Code Quality and Code Security issues as you code. Analogous to a spell checker, SonarLint squiggles flaws and provides real-time feedback and clear remediation guidance so you can deliver clean code from the get-go.
10+
11+
SonarLint for Visual Studio is more than your average linting tool.
12+
13+
14+
15+
* Scans code written in C#, VB.NET, C, C++, Javascript, TypeScript.
16+
* Open source JavaScript, TypeScript, C# & VB.NET code analyzers.
17+
* C and C++ support for Application, Dynamic Library and Static Library types of MSBuild (.vcxproj) projects
18+
* Deep code analysis algorithms using pattern matching and dataflow analysis
19+
* Hundreds of language-specific static code analysis rules, and growing
20+
* In-context help and remediation guidance with detailed examples
21+
22+
Highlights issues in your code, tells you why they are harmful, and how they should be fixed
23+
24+
25+
SonarLint provides Visual Studio developers a comprehensive in-IDE solution for improving the quality and security of the code they deliver.
26+
27+
[Learn More](https://www.sonarsource.com/products/sonarlint/features/visual-studio/)
28+
29+
30+
![sonarlint-warnings](https://raw.githubusercontent.com/wiki/SonarSource/sonarlint-visualstudio/images/Marketplace/squiggly.png)
31+
32+
## **Get Started with SonarLint**
33+
34+
After you download SonarLint, simply open a project, start coding and SonarLint will start analyzing your issues.
35+
36+
You can also check out the [SonarLint documentation here](https://docs.sonarsource.com/sonarlint/visual-studio/).
37+
38+
![sonarlint-installation](https://raw.githubusercontent.com/wiki/SonarSource/sonarlint-visualstudio/images/Marketplace/2022-install.PNG)
39+
40+
41+
## **Why SonarLint**
42+
43+
With unparalleled support for C#, VB.NET, C, C++, JavaScript, and TypeScript, SonarLint performs on-the-fly smart analysis to ensure that the code you deliver is always high quality and secure.
44+
45+
46+
47+
* **Instant feedback on coding issues**
48+
49+
SonarLint provides immediate feedback on Bugs, Code Smells, and Security Vulnerabilities as you code.
50+
51+
* **Hundreds of language-specific rules with clear guidance**
52+
53+
SonarLint provides you with all the information on why the highlighted issue is problematic and how to fix it. With clear remediation guidance and plenty of detailed examples, addressing issues is simple and intuitive.
54+
55+
56+
Check out the language specific rules:
57+
58+
59+
<table>
60+
<tr>
61+
<td>
62+
C#
63+
</td>
64+
<td><a href="https://rules.sonarsource.com/csharp">View Rules</a>
65+
</td>
66+
</tr>
67+
<tr>
68+
<td>VB.NET
69+
</td>
70+
<td><a href="https://rules.sonarsource.com/vbnet">View Rules</a>
71+
</td>
72+
</tr>
73+
<tr>
74+
<td>JavaScript
75+
</td>
76+
<td><a href="https://rules.sonarsource.com/javascript">View Rules</a>
77+
</td>
78+
</tr>
79+
<tr>
80+
<td>TypeScript
81+
</td>
82+
<td><a href="https://rules.sonarsource.com/typescript">View Rules</a>
83+
</td>
84+
</tr>
85+
<tr>
86+
<td>C++
87+
</td>
88+
<td><a href="https://rules.sonarsource.com/cpp">View Rules</a>
89+
</td>
90+
</tr>
91+
<tr>
92+
<td>C
93+
</td>
94+
<td><a href="https://rules.sonarsource.com/c">View Rules</a>
95+
</td>
96+
</tr>
97+
</table>
98+
99+
100+
101+
102+
* **Fast and Precise Analysis**
103+
104+
High precision analysis means fewer false positives and false negatives, providing consistent, reliable results.
105+
106+
* **Helps you grow in your development journey**
107+
108+
Aside from detecting issues and providing useful cues to fix the issues, the insights provided by SonarLint support better code ownership so that as a developer you will begin to recognize those mistakes and remember to prevent them in the future.
109+
110+
111+
112+
## **SonarLint for Teams**
113+
114+
SonarLint works great as a standalone tool but you can take it to the next level by connecting it with [SonarQube](https://www.sonarqube.org/) or [SonarCloud](https://sonarcloud.io/). SonarQube and SonarCloud analyze Pull Requests and branches in your DevOps platform (BitBucket, GitHub, Microsoft Azure, GitLab) and perform non-disruptive code quality and security checks to reliably track your codebase health.
115+
116+
The 'connected mode' configuration ties SonarLint's continuous Code Quality and Code Security analysis from IDE to the entire CI/CD workflow and back again to your IDE.
117+
118+
119+
120+
* **Common expectations for Code Quality and Code Security**
121+
122+
Applied rules and analysis settings from SonarQube/SonarCloud are extended to SonarLint so that teams can coalesce on a shared definition of code health.
123+
124+
* **More rule coverage**
125+
126+
When paired with SonarQube or SonarCloud, you can benefit from additional rules for security vulnerabilities and security hotspots in IDE to identify issues earlier.
127+
128+
* **Smart notifications for improved quality and delivery**
129+
130+
'Connected mode' sends smart alerts to individuals/teams when new issues are discovered. With everyone in the loop, issues can be addressed promptly, improving the overall software quality and delivery.
131+
132+
133+
134+
## **Connect with our Community**
135+
136+
Have questions or need to report issues or provide suggestions? Stay connected with us on the [SonarSource Community Forum](https://community.sonarsource.com/).
137+
138+
139+
## **Our strong open source commitment**
140+
141+
Since 2007 to present, SonarSource has invested in working closely with our community to provide code quality and security tooling that directly empower developers to deliver better software.
142+
143+
Check out the [source code on GitHub](https://github.com/SonarSource/sonarlint-visualstudio) or view our [issue tracker.](https://github.com/SonarSource/sonarlint-visualstudio/issues) If you are interested in contributing, visit our [contributing page](https://github.com/SonarSource/sonarlint-visualstudio/blob/master/CONTRIBUTING.md).
144+
145+
146+
## **License**
147+
148+
Copyright 2016-2024 SonarSource.
149+
150+
Licensed under the GNU Lesser General Public License, Version 3.0

0 commit comments

Comments
 (0)