-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (94 loc) · 3.56 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# This workflow will build the project and upload the jar files to
# GitHub as build artifacts. It is triggered by push or pull requests.
# It may also be run manually.
#
# For deploying a package to the maven central repository
# and also as a GitHub Package, use its sibling, deploy.yml.
name: Build
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
workflow_dispatch:
inputs:
tags:
description: 'Manual build'
jobs:
build:
name: Build
runs-on: ubuntu-latest
# Permissions are needed to write updated artifacts and write the package
permissions:
contents: write
packages: write
steps:
# Checkout (using V2)
- uses: actions/checkout@v2
with:
fetch-depth: 0
# Install helm
- name: Helm tool installer
uses: Azure/setup-helm@v1
# Get the helm repos
- name: Get helm repos
run: |
helm version
helm repo add alfresco-incubator https://kubernetes-charts.alfresco.com/incubator
helm repo add alfresco-stable https://kubernetes-charts.alfresco.com/stable
helm repo add melahn https://melahn.github.io/helm-repo-test
helm repo add stable https://charts.helm.sh/stable
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add codecentric https://codecentric.github.io/helm-charts
helm repo add nuxeo https://chartmuseum.platform.dev.nuxeo.com/
helm repo update
helm repo list
helm env
# Install the helm quay plugin so APPR downloads can be tested
- name: Install helm quay plugin
run: helm plugin install https://github.com/app-registry/quay-helmv3-plugin
# Install Graphviz so images can be generated from the generated PlantUML files
- name: Install graphviz
run: sudo apt-get install graphviz
# Setup Java 11 with a settings.xml file setup for signatures
# Note: maven caching is done here
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: 11
cache: 'maven'
server-id: github
gpg-private-key: ${{ secrets.GPG_JAR_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
# Cache Sonar packages
- name: Cache SonarCloud packages
uses: actions/cache@v2
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
# Run the Verify Phase using the github profile
- name: Verify
run: mvn -B -Dgpg.passphrase=${{ secrets.GPG_JAR_PASSWORD }} verify -P github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_JAR_PASSWORD }}
# Copy the jars and signature files
- name: Package Jars and Signatures
run: |
mkdir jars && cp target/helm-chartmap*.jar jars
cp target/*.asc jars
# Upload the jars and signature files
- uses: actions/upload-artifact@v2
with:
name: Jar and Signature Package
path: jars
# Run the sonar plugin to update Sonar content
- name: Update Sonar Cloud
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
mvn -B org.sonarsource.scanner.maven:sonar-maven-plugin:sonar