Remove azure-pipelines as outdated and if needed shall be implemented via github actions (#1857)
Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
This commit is contained in:
@@ -1,126 +0,0 @@
|
|||||||
# Build hawkBit and run tests with Apache Maven.
|
|
||||||
# Runs a matrix of various DB,JDK,RabbitMQ versions that are supported by hawkBit
|
|
||||||
#
|
|
||||||
# Requires the SonarCloud plugin and connection setup
|
|
||||||
# https://kaizimmerm.com/post/azure-pipelines-for-the-oss-developer/#analyze-the-code-with-sonarcloud
|
|
||||||
#
|
|
||||||
# Add steps that analyze code, save build artifacts, deploy, and more:
|
|
||||||
# https://docs.microsoft.com/en-us/azure/devops/pipelines/ecosystems/java
|
|
||||||
# https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema
|
|
||||||
# https://docs.microsoft.com/en-us/azure/devops/pipelines/release/caching?view=azure-devops#maven
|
|
||||||
|
|
||||||
pool:
|
|
||||||
vmImage: "ubuntu-18.04"
|
|
||||||
|
|
||||||
# Default values for the hawbit build. Can be overriden in the variable group 'hawkbit'
|
|
||||||
# see https://docs.microsoft.com/en-us/azure/devops/pipelines/library/variable-groups
|
|
||||||
variables:
|
|
||||||
# Defines defaults
|
|
||||||
- name: sonarCloudConnection
|
|
||||||
value: 'hawkBitSonar'
|
|
||||||
- name: sonarCloudOrganization
|
|
||||||
value: 'hawkbit'
|
|
||||||
- name: sonarProjectKey
|
|
||||||
value: 'org.eclipse:hawkbit'
|
|
||||||
# Override defaults
|
|
||||||
- group: hawkbit
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
- job: JDK
|
|
||||||
displayName: Verify with hawkBit default JDK and SonarCloud analysis
|
|
||||||
steps:
|
|
||||||
- template: rabbitmq-template.yml
|
|
||||||
- template: maven-template.yml
|
|
||||||
parameters:
|
|
||||||
mavenGoals: "verify -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=$(sonarCloudOrganization) -Dsonar.projectKey=$(sonarProjectKey)"
|
|
||||||
sonarQubeRunAnalysis: true
|
|
||||||
sonarCloudConnection: $(sonarCloudConnection)
|
|
||||||
sonarCloudOrganization: $(sonarCloudOrganization)
|
|
||||||
- job: JDK_11
|
|
||||||
displayName: Build with JDK-11 (hawkBit default)
|
|
||||||
steps:
|
|
||||||
- template: maven-template.yml
|
|
||||||
parameters:
|
|
||||||
mavenGoals: "install license:check"
|
|
||||||
jdkVersionOption: "1.11"
|
|
||||||
- job: JDK_8
|
|
||||||
displayName: Build with JDK-8 (hawkBit default)
|
|
||||||
steps:
|
|
||||||
- template: maven-template.yml
|
|
||||||
parameters:
|
|
||||||
mavenGoals: "install license:check"
|
|
||||||
jdkVersionOption: "1.8"
|
|
||||||
- job:
|
|
||||||
dependsOn: JDK
|
|
||||||
condition: succeeded()
|
|
||||||
displayName: RABBIT
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
3.6:
|
|
||||||
rabbitmqVersion: "3.6"
|
|
||||||
3.7:
|
|
||||||
rabbitmqVersion: "3.7"
|
|
||||||
3.8:
|
|
||||||
rabbitmqVersion: "3.8"
|
|
||||||
steps:
|
|
||||||
- template: rabbitmq-template.yml
|
|
||||||
parameters:
|
|
||||||
rabbitmqVersion: $(rabbitmqVersion)
|
|
||||||
- template: maven-template.yml
|
|
||||||
parameters:
|
|
||||||
mavenGoals: "verify"
|
|
||||||
- job:
|
|
||||||
dependsOn: JDK
|
|
||||||
condition: succeeded()
|
|
||||||
displayName: MYSQL
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
5.6:
|
|
||||||
dbVersion: "5.6"
|
|
||||||
5.7:
|
|
||||||
dbVersion: "5.7"
|
|
||||||
steps:
|
|
||||||
- template: rabbitmq-template.yml
|
|
||||||
- script: "docker run --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=8236472364 -e MYSQL_DATABASE=hawkbit -d mysql:$(dbVersion)"
|
|
||||||
displayName: "Setup MYSQL Database docker instance"
|
|
||||||
- template: maven-template.yml
|
|
||||||
parameters:
|
|
||||||
mavenGoals: "verify -Dspring.jpa.database=MYSQL -Dspring.datasource.driverClassName=org.mariadb.jdbc.Driver -Dspring.datasource.url=jdbc:mariadb://localhost:3306/hawkbit -Dspring.datasource.username=root -Dspring.datasource.password=8236472364"
|
|
||||||
- job:
|
|
||||||
dependsOn: JDK
|
|
||||||
condition: succeeded()
|
|
||||||
displayName: MSSQL
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
2017:
|
|
||||||
dbVersion: "2017-latest"
|
|
||||||
2019:
|
|
||||||
dbVersion: "2019-latest"
|
|
||||||
steps:
|
|
||||||
- template: rabbitmq-template.yml
|
|
||||||
- script: |
|
|
||||||
docker run --name mssql -p 1433:1433 -e ACCEPT_EULA=Y -e SA_PASSWORD=1234567890.Ab -d mcr.microsoft.com/mssql/server:$(dbVersion)
|
|
||||||
until [ "`/usr/bin/docker inspect -f {{.State.Running}} mssql`" == "true" ]; do sleep 1; done
|
|
||||||
sleep 120
|
|
||||||
until docker exec mssql /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P "1234567890.Ab" -Q "CREATE DATABASE hawkbit"; do sleep 1; done
|
|
||||||
displayName: "Setup MSSQL Database docker instance"
|
|
||||||
- template: maven-template.yml
|
|
||||||
parameters:
|
|
||||||
mavenGoals: "verify -Dspring.jpa.database=SQL_SERVER -Dspring.datasource.url=jdbc:sqlserver://localhost:1433;database=hawkbit -Dspring.datasource.username=SA -Dspring.datasource.password=1234567890.Ab -Dspring.datasource.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver"
|
|
||||||
- job:
|
|
||||||
dependsOn: JDK
|
|
||||||
condition: succeeded()
|
|
||||||
displayName: POSTGRESQL
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
12:
|
|
||||||
dbVersion: "12"
|
|
||||||
13:
|
|
||||||
dbVersion: "13"
|
|
||||||
steps:
|
|
||||||
- template: rabbitmq-template.yml
|
|
||||||
- script: "docker run --name postgres -p 5432:5432 -e POSTGRES_PASSWORD=1234567890 -e POSTGRES_DB=hawkbit -d postgres:$(dbVersion)"
|
|
||||||
displayName: "Setup POSTGRESQL Database docker instance"
|
|
||||||
- template: maven-template.yml
|
|
||||||
parameters:
|
|
||||||
mavenGoals: "verify -Dspring.jpa.database=POSTGRESQL -Dspring.datasource.url=jdbc:postgresql://localhost:5432/hawkbit?currentSchema=hawkbit -Dspring.datasource.username=postgres -Dspring.datasource.password=1234567890 -Dspring.datasource.driverClassName=org.postgresql.Driver"
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
parameters:
|
|
||||||
- name: mavenGoals
|
|
||||||
displayName: Maven Goal
|
|
||||||
type: string
|
|
||||||
- name: jdkVersionOption
|
|
||||||
displayName: JDK Version
|
|
||||||
type: string
|
|
||||||
default: "1.17"
|
|
||||||
- name: sonarQubeRunAnalysis
|
|
||||||
displayName: Enable SonarQube analysis
|
|
||||||
type: boolean
|
|
||||||
default: false
|
|
||||||
- name: sonarCloudConnection
|
|
||||||
displayName: Optional SonarCloud connection
|
|
||||||
type: string
|
|
||||||
default: ''
|
|
||||||
- name: sonarCloudOrganization
|
|
||||||
displayName: Optional SonarCloud organization
|
|
||||||
type: string
|
|
||||||
default: ''
|
|
||||||
- name: mavenCacheFolder
|
|
||||||
displayName: Maven Cache Folder
|
|
||||||
type: string
|
|
||||||
default: $(Pipeline.Workspace)/.m2/repository
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- task: SonarCloudPrepare@1
|
|
||||||
condition: eq('${{ parameters.sonarQubeRunAnalysis }}', true)
|
|
||||||
displayName: 'Prepare SonarCloud analysis configuration'
|
|
||||||
inputs:
|
|
||||||
SonarCloud: ${{ parameters.sonarCloudConnection }}
|
|
||||||
organization: ${{ parameters.sonarCloudOrganization }}
|
|
||||||
scannerMode: Other
|
|
||||||
- task: Cache@2
|
|
||||||
inputs:
|
|
||||||
key: 'maven | "$(Agent.OS)" | "${{ parameters.jdkVersionOption }}" | **/pom.xml'
|
|
||||||
path: ${{ parameters.mavenCacheFolder }}
|
|
||||||
displayName: Cache Maven local repo
|
|
||||||
- task: Maven@3
|
|
||||||
inputs:
|
|
||||||
mavenPomFile: "pom.xml"
|
|
||||||
mavenOptions: "-Xmx3072m"
|
|
||||||
javaHomeOption: "JDKVersion"
|
|
||||||
jdkVersionOption: ${{ parameters.jdkVersionOption }}
|
|
||||||
jdkArchitectureOption: "x64"
|
|
||||||
publishJUnitResults: true
|
|
||||||
sonarQubeRunAnalysis: ${{ parameters.sonarQubeRunAnalysis }}
|
|
||||||
sqMavenPluginVersionChoice: 'latest'
|
|
||||||
testResultsFiles: "**/surefire-reports/TEST-*.xml"
|
|
||||||
goals: "${{ parameters.mavenGoals }} -Dmaven.repo.local=${{ parameters.mavenCacheFolder }}"
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
parameters:
|
|
||||||
- name: rabbitmqVersion
|
|
||||||
displayName: RabbitMQ Version
|
|
||||||
type: string
|
|
||||||
default: "3.8"
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- script: docker run -d --name rabbit -p 15672:15672 -p 5672:5672 -e RABBITMQ_DEFAULT_VHOST=/ rabbitmq:${{ parameters.rabbitmqVersion }}-management
|
|
||||||
displayName: "Setup RabbitMQ docker instance"
|
|
||||||
Reference in New Issue
Block a user