Skip to content

Commit bee0226

Browse files
Enable CI (#62)
* Enable CI Signed-off-by: Mu Chen <[email protected]> * Update Dockerfile for SQ error Signed-off-by: Mu Chen <[email protected]> * Specify jenkins agent Signed-off-by: Mu Chen <[email protected]> * fix errors found by gofmt Signed-off-by: Mu Chen <[email protected]> --------- Signed-off-by: Mu Chen <[email protected]>
1 parent 5dce375 commit bee0226

23 files changed

+84
-57
lines changed

.jenkinsfile.blaze-semantic.groovy

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
def buildInfo = bzSemantic(
2+
pushLatestTag : true,
3+
architecture : 's390x',
4+
buildDockerImage : false,
5+
useAnalysisCodeCoverage : false,
6+
useAnalysisDependencyCheck : false,
7+
useAnalysisOsscCheck : false,
8+
addDependenciesToBuildInfo : false,
9+
buildNodeLabel: 'blaze-build-agent-s390-colo-new',
10+
baseVersion : '0.11.4',
11+
verbose: true,
12+
useAnalysisSonarQube: true,
13+
sonarQube: [
14+
useEE: true
15+
],
16+
native: [
17+
kind: "go",
18+
build: [
19+
platforms: ["linux/arm64", "linux/s390x"]
20+
]
21+
]
22+
)

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:18.04 as pem
1+
FROM ubuntu:22.04 AS pem
22
RUN apt update && apt install curl -y
33
WORKDIR /root/
44
# The links of the IBM root CA and intermediate certs are from https://daymvs1.pok.ibm.com/ibmca/certificates.do;

collector/mdisk_collector.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ func init() {
1414
registerCollector("lsmdisk", defaultDisabled, NewMdiskCollector)
1515
}
1616

17-
//mdiskCollector collects mdisk metrics
17+
// mdiskCollector collects mdisk metrics
1818
type mdiskCollector struct {
1919
}
2020

@@ -28,12 +28,12 @@ func NewMdiskCollector() (Collector, error) {
2828
return &mdiskCollector{}, nil
2929
}
3030

31-
//Describe describes the metrics
31+
// Describe describes the metrics
3232
func (*mdiskCollector) Describe(ch chan<- *prometheus.Desc) {
3333
ch <- mdiskCapacity
3434
}
3535

36-
//Collect collects metrics from Spectrum Virtualize Restful API
36+
// Collect collects metrics from Spectrum Virtualize Restful API
3737
func (c *mdiskCollector) Collect(sClient utils.SpectrumClient, ch chan<- prometheus.Metric) error {
3838

3939
logger.Debugln("entering MDisk collector ...")

collector/mdiskgrp_collector.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func init() {
3333
registerCollector("lsmdiskgrp", defaultDisabled, NewMdiskgrpCollector)
3434
}
3535

36-
//mdiskgrpCollector collects mdisk metrics
36+
// mdiskgrpCollector collects mdisk metrics
3737
type mdiskgrpCollector struct {
3838
}
3939

@@ -62,7 +62,7 @@ func NewMdiskgrpCollector() (Collector, error) {
6262
return &mdiskgrpCollector{}, nil
6363
}
6464

65-
//Describe describes the metrics
65+
// Describe describes the metrics
6666
func (*mdiskgrpCollector) Describe(ch chan<- *prometheus.Desc) {
6767
ch <- mdiskgrp_capacity
6868
ch <- extent_size
@@ -82,7 +82,7 @@ func (*mdiskgrpCollector) Describe(ch chan<- *prometheus.Desc) {
8282
ch <- reclaimable_capacity
8383
}
8484

85-
//Collect collects metrics from Spectrum Virtualize Restful API
85+
// Collect collects metrics from Spectrum Virtualize Restful API
8686
func (c *mdiskgrpCollector) Collect(sClient utils.SpectrumClient, ch chan<- prometheus.Metric) error {
8787

8888
logger.Debugln("entering MDiskgrp collector ...")

collector/node_stats_collector.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func init() {
1616
registerCollector("lsnodestats", defaultDisabled, NewNodeStatsCollector)
1717
}
1818

19-
//nodeStatsCollector collects nodeStats metrics
19+
// nodeStatsCollector collects nodeStats metrics
2020
type nodeStatsCollector struct {
2121
}
2222

@@ -93,7 +93,7 @@ func NewNodeStatsCollector() (Collector, error) {
9393
return &nodeStatsCollector{}, nil
9494
}
9595

96-
//Describe describes the metrics
96+
// Describe describes the metrics
9797
func (*nodeStatsCollector) Describe(ch chan<- *prometheus.Desc) {
9898

9999
for _, nodestat_metric := range nodeStats_metrics {
@@ -102,7 +102,7 @@ func (*nodeStatsCollector) Describe(ch chan<- *prometheus.Desc) {
102102

103103
}
104104

105-
//Collect collects metrics from Spectrum Virtualize Restful API
105+
// Collect collects metrics from Spectrum Virtualize Restful API
106106
func (c *nodeStatsCollector) Collect(sClient utils.SpectrumClient, ch chan<- prometheus.Metric) error {
107107

108108
logger.Debugln("entering NodeStats collector ...")

collector/system_collector.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ func NewSystemCollector() (Collector, error) {
9393
return &systemCollector{}, nil
9494
}
9595

96-
//Describe describes the metrics
96+
// Describe describes the metrics
9797
func (*systemCollector) Describe(ch chan<- *prometheus.Desc) {
9898
ch <- total_mdisk_capacity
9999
ch <- space_in_mdisk_grps
@@ -128,7 +128,7 @@ func (*systemCollector) Describe(ch chan<- *prometheus.Desc) {
128128
ch <- mdiskgrp_capacity_usage
129129
}
130130

131-
//Collect collects metrics from Spectrum Virtualize Restful API
131+
// Collect collects metrics from Spectrum Virtualize Restful API
132132
func (c *systemCollector) Collect(sClient utils.SpectrumClient, ch chan<- prometheus.Metric) error {
133133
logger.Debugln("entering System collector ...")
134134
systemMetrics, err := sClient.CallSpectrumAPI("lssystem", true)

collector/system_stats_collector.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ func NewSystemStatsCollector() (Collector, error) {
9797
return &systemStatsCollector{}, nil
9898
}
9999

100-
//Describe describes the metrics
100+
// Describe describes the metrics
101101
func (*systemStatsCollector) Describe(ch chan<- *prometheus.Desc) {
102102

103103
for _, metric := range metrics {
@@ -106,7 +106,7 @@ func (*systemStatsCollector) Describe(ch chan<- *prometheus.Desc) {
106106

107107
}
108108

109-
//Collect collects metrics from Spectrum Virtualize Restful API
109+
// Collect collects metrics from Spectrum Virtualize Restful API
110110
func (c *systemStatsCollector) Collect(sClient utils.SpectrumClient, ch chan<- prometheus.Metric) error {
111111
logger.Debugln("entering SystemStats collector ...")
112112
systemStatsResp, err := sClient.CallSpectrumAPI("lssystemstats", true)

collector/volume_collector.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func init() {
1616
registerCollector("lsvdisk", defaultDisabled, NewVolumeCollector)
1717
}
1818

19-
//volumeCollector collects vdisk metrics
19+
// volumeCollector collects vdisk metrics
2020
type volumeCollector struct {
2121
}
2222

@@ -30,14 +30,14 @@ func NewVolumeCollector() (Collector, error) {
3030
return &volumeCollector{}, nil
3131
}
3232

33-
//Describe describes the metrics
33+
// Describe describes the metrics
3434
func (*volumeCollector) Describe(ch chan<- *prometheus.Desc) {
3535

3636
ch <- volumeCapacity
3737

3838
}
3939

40-
//Collect collects metrics from Spectrum Virtualize Restful API
40+
// Collect collects metrics from Spectrum Virtualize Restful API
4141
func (c *volumeCollector) Collect(sClient utils.SpectrumClient, ch chan<- prometheus.Metric) error {
4242
logger.Debugln("entering volume collector ...")
4343
volumeResp, err := sClient.CallSpectrumAPI("lsvdisk", true)

collector/volume_copy_collector.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func init() {
1616
registerCollector("lsvdiskcopy", defaultDisabled, NewVolumeCopyCollector)
1717
}
1818

19-
//volumeCopyCollector collects volume cpoy metrics
19+
// volumeCopyCollector collects volume cpoy metrics
2020
type volumeCopyCollector struct {
2121
}
2222

@@ -30,14 +30,14 @@ func NewVolumeCopyCollector() (Collector, error) {
3030
return &volumeCopyCollector{}, nil
3131
}
3232

33-
//Describe describes the metrics
33+
// Describe describes the metrics
3434
func (*volumeCopyCollector) Describe(ch chan<- *prometheus.Desc) {
3535

3636
ch <- volumeCopy_Capacity
3737

3838
}
3939

40-
//Collect collects metrics from Spectrum Virtualize Restful API
40+
// Collect collects metrics from Spectrum Virtualize Restful API
4141
func (c *volumeCopyCollector) Collect(sClient utils.SpectrumClient, ch chan<- prometheus.Metric) error {
4242
logger.Debugln("entering volumeCopy collector ...")
4343
volumeCopyResp, err := sClient.CallSpectrumAPI("lsvdiskcopy", true)

collector_s/callhome_collector.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func init() {
1616
registerCollector("lscloudcallhome", defaultEnabled, NewCallhomeInfoCollector)
1717
}
1818

19-
//callhomeInfoCollector collects callhome setting metrics
19+
// callhomeInfoCollector collects callhome setting metrics
2020
type callhomeInfoCollector struct {
2121
}
2222

@@ -30,12 +30,12 @@ func NewCallhomeInfoCollector() (Collector, error) {
3030
return &callhomeInfoCollector{}, nil
3131
}
3232

33-
//Describe describes the metrics
33+
// Describe describes the metrics
3434
func (*callhomeInfoCollector) Describe(ch chan<- *prometheus.Desc) {
3535
ch <- callhomeInfo
3636
}
3737

38-
//Collect collects metrics from Spectrum Virtualize Restful API
38+
// Collect collects metrics from Spectrum Virtualize Restful API
3939
func (c *callhomeInfoCollector) Collect(sClient utils.SpectrumClient, ch chan<- prometheus.Metric) error {
4040

4141
logger.Debugln("entering Callhome collector ...")

0 commit comments

Comments
 (0)