Skip to content

Commit 964089e

Browse files
OPE-843 Moving to github actions
1 parent 49354dc commit 964089e

File tree

3 files changed

+78
-1
lines changed

3 files changed

+78
-1
lines changed

.github/workflows/private-prod.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Private Production Update Center
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
generate-update-center-prod:
8+
runs-on: sonar-runner-large
9+
environment: production
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
13+
- name: Setup Mise
14+
uses: jdx/mise-action@c37c93293d6b742fc901e1406b8f764f6fb19dac # v2.4.4
15+
with:
16+
version: 2025.7.12
17+
- name: Vault Secrets
18+
id: secrets
19+
uses: SonarSource/vault-action-wrapper@320bd31b03e5dacaac6be51bbbb15adf7caccc32 # v3.1.0
20+
with:
21+
paths: |
22+
development/artifactory/token/${{ github.repository_owner }}-${{ github.event.repository.name }}-public-reader
23+
development/aws/sts/downloads
24+
development/kv/data/repox
25+
- name: Prepare Maven Settings
26+
run: cp ~/.m2/settings-public-auth.xml ~/.m2/settings.xml
27+
- name: Generate Update Center Metadata
28+
run: |
29+
source po-generate-update-center-prod/generate.sh
30+
source po-generate-update-center-prod/prepare_transfer_dir.sh
31+
- name: Upload Metadata
32+
if: always() && ! canceled()
33+
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
34+
with:
35+
name: update-center-prod
36+
path: target/update-center/json/*.json
37+
- name: Upload to S3
38+
run: po-generate-update-center-prod/upload.sh
39+
env:
40+
AWS_ACCESS_KEY_ID: ${{ fromJSON(steps.secrets.outputs.vault).AWS_ACCESS_KEY_ID }}
41+
AWS_SECRET_ACCESS_KEY: ${{ fromJSON(steps.secrets.outputs.vault).AWS_SECRET_ACCESS_KEY }}
42+
AWS_SESSION_TOKEN: ${{ fromJSON(steps.secrets.outputs.vault).AWS_SESSION_TOKEN }}
43+
S3_BUCKET: downloads-cdn-eu-central-1-prod
44+
AWS_DEFAULT_REGION: eu-central-1
45+
ARTIFACTORY_URL: ${{ fromJSON(steps.secrets.outputs.vault).ARTIFACTORY_URL }}
46+
ARTIFACTORY_ACCESS_TOKEN: ${{ fromJSON(steps.secrets.outputs.vault).ARTIFACTORY_ACCESS_TOKEN }}
47+

.github/workflows/public-build.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Public Build
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- '**'
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-24.04-large
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
14+
- name: Setup Mise
15+
uses: jdx/mise-action@c37c93293d6b742fc901e1406b8f764f6fb19dac # v2.4.4
16+
with:
17+
version: 2025.7.12
18+
- name: Maven Build & Validate
19+
run: |
20+
mvn org.sonarsource.update-center:sonar-update-center-mojo:1.35.0.2835:generate-metadata \
21+
-DinputFile=update-center-source.properties \
22+
-DvalidateOnly=true \
23+
-DoutputDir=/tmp
24+
- name: Upload Metadata
25+
if: always() && ! canceled()
26+
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
27+
with:
28+
name: update-center-metadata
29+
path: /tmp
30+

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Sonar Update Center Properties
2-
2+
[![Build Status](https://github.com/SonarSource/sonar-update-center-properties/actions/workflows/public-build.yml/badge.svg?branch=master)](https://github.com/SonarSource/sonar-update-center-properties/actions/workflows/public-build.yml)
33
This allows you to deploy a plugin to the [SonarQube Marketplace](https://docs.sonarqube.org/latest/instance-administration/marketplace/).
44

55
[Read here for more information](https://community.sonarsource.com/t/deploying-to-the-marketplace/35236).

0 commit comments

Comments
 (0)