Skip to content

Commit 8f43d5b

Browse files
authored
4.5.0 release (#1290)
1 parent c410291 commit 8f43d5b

20 files changed

+178
-87
lines changed

.github/workflows/changelog-enforcer.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
changelog:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v4.1.2
11+
- uses: actions/checkout@v4.1.6
1212
- uses: dangoslen/changelog-enforcer@v3
1313
with:
1414
changeLogPath: 'CHANGELOG.md'

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
steps:
1717
- name: Checkout repository
18-
uses: actions/checkout@v4.1.2
18+
uses: actions/checkout@v4.1.6
1919
with:
2020
# We must fetch at least the immediate parents so that if this is
2121
# a pull request then we can checkout the head.

.github/workflows/continuous-integration-workflow.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
steps:
1313
-
1414
name: Checkout repository
15-
uses: actions/checkout@v4.1.2
15+
uses: actions/checkout@v4.1.6
1616
-
1717
name: Build UBI8 docker image
1818
run: |
@@ -27,7 +27,7 @@ jobs:
2727
steps:
2828
-
2929
name: Checkout repository
30-
uses: actions/checkout@v4.1.2
30+
uses: actions/checkout@v4.1.6
3131
- name: Build UBI8 docker image
3232
run: |
3333
./.github/workflows/build-docker-image.sh \
@@ -56,7 +56,7 @@ jobs:
5656
steps:
5757
-
5858
name: Checkout repository
59-
uses: actions/checkout@v4.1.2
59+
uses: actions/checkout@v4.1.6
6060
-
6161
name: Check shell scripts
6262
run: |
@@ -72,7 +72,7 @@ jobs:
7272
steps:
7373
-
7474
name: Checkout repository
75-
uses: actions/checkout@v4.1.2
75+
uses: actions/checkout@v4.1.6
7676
-
7777
name: Check shell scripts
7878
run: |
@@ -88,7 +88,7 @@ jobs:
8888
steps:
8989
-
9090
name: Checkout repository
91-
uses: actions/checkout@v4.1.2
91+
uses: actions/checkout@v4.1.6
9292
-
9393
name: Setup Go 1.18
9494
uses: actions/setup-go@v5
@@ -128,7 +128,7 @@ jobs:
128128
steps:
129129
-
130130
name: Checkout repository
131-
uses: actions/checkout@v4.1.2
131+
uses: actions/checkout@v4.1.6
132132
-
133133
name: Check shell scripts
134134
run: |
@@ -145,7 +145,7 @@ jobs:
145145
steps:
146146
-
147147
name: Checkout repository
148-
uses: actions/checkout@v4.1.2
148+
uses: actions/checkout@v4.1.6
149149
-
150150
name: Check jsl expectations
151151
run: |
@@ -163,7 +163,7 @@ jobs:
163163
steps:
164164
-
165165
name: Checkout repository
166-
uses: actions/checkout@v4.1.2
166+
uses: actions/checkout@v4.1.6
167167
-
168168
name: Setup Go 1.18
169169
uses: actions/setup-go@v5
@@ -184,7 +184,7 @@ jobs:
184184
exit 1
185185
-
186186
name: Verify all Go tests pass linting
187-
uses: golangci/golangci-lint-action@v4
187+
uses: golangci/golangci-lint-action@v6
188188
with:
189189
version: v1.49.0
190190
working-directory: tests
@@ -207,7 +207,7 @@ jobs:
207207
# run: jq . <<< "${GITHUB_CONTEXT}"
208208
# -
209209
# name: Checkout repository
210-
# uses: actions/checkout@v4.1.2
210+
# uses: actions/checkout@v4.1.6
211211
# with:
212212
# fetch-depth: 0
213213
# path: 'ods-core'

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,20 @@
22

33
## Unreleased
44

5+
### Added
6+
7+
### Changed
8+
59
### Fixed
610

11+
## [4.5.0] - 2024-06-06
12+
713
### Added
14+
- Add availability check for DocGen pod ([#1277](https://github.com/opendevstack/ods-core/pull/1277))
815

916
### Changed
17+
- Update SonarQube to 9.9.5 and configure resources for Nexus and Sonarqube in ods-configuration ([#1283](https://github.com/opendevstack/ods-core/pull/1283))
18+
- Update Nexus to 3.68.1-java11 to address a critical vulnerability ([#1286](https://github.com/opendevstack/ods-core/pull/1286))
1019

1120
## [4.4.0] - 2024-04-22
1221

configuration-sample/ods-core.env.sample

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ ODS_BITBUCKET_PROJECT=opendevstack
4545
# Nexus base image
4646
# See Dockerhub https://hub.docker.com/r/sonatype/nexus3/tags.
4747
# Officially supported is:
48-
# - 3.67.1-java11
49-
NEXUS_IMAGE_TAG=3.67.1-java11
48+
# - 3.68.1-java11
49+
NEXUS_IMAGE_TAG=3.68.1-java11
5050

5151
# Nexus host without protocol.
5252
# The domain should be equal to OPENSHIFT_APPS_BASEDOMAIN (see below).
@@ -71,6 +71,16 @@ NEXUS_AUTH=developer:changeme
7171
# See https://help.sonatype.com/en/sonatype-nexus-repository-system-requirements.html
7272
NEXUS_JVM_PARAMS="-Xms2703m -Xmx2703m -XX:MaxDirectMemorySize=2703m -Djava.util.prefs.userRoot=/nexus-data/javaprefs"
7373

74+
# Nexus memory and CPU resources
75+
NEXUS_CPU_REQUEST=200m
76+
NEXUS_MEMORY_REQUEST=3Gi
77+
NEXUS_CPU_LIMIT=1
78+
NEXUS_MEMORY_LIMIT=5Gi
79+
80+
# Nexus data and backup capacity
81+
NEXUS_DATA_CAPACITY=60Gi
82+
NEXUS_DATA_BACKUP_CAPACITY=10Gi
83+
7484
#############
7585
# SonarQube #
7686
#############
@@ -125,7 +135,27 @@ SONAR_EDITION=community
125135
# See Dockerhub https://hub.docker.com/_/sonarqube/tags
126136
# Officially supported is:
127137
# - 9.9 (LTS release)
128-
SONAR_VERSION=9.9.4
138+
SONAR_VERSION=9.9.5
139+
140+
# SonarQube memory and CPU resources
141+
SONARQUBE_CPU_REQUEST=200m
142+
SONARQUBE_MEMORY_REQUEST=2Gi
143+
SONARQUBE_CPU_LIMIT=1
144+
SONARQUBE_MEMORY_LIMIT=4Gi
145+
146+
# SonarQube data and backup capacity
147+
SONARQUBE_DATA_CAPACITY=2Gi
148+
SONARQUBE_EXTENSIONS_CAPACITY=1Gi
149+
150+
# SonarQube database memory and CPU resources
151+
SONARQUBE_DB_CPU_REQUEST=100m
152+
SONARQUBE_DB_MEMORY_REQUEST=256Mi
153+
SONARQUBE_DB_CPU_LIMIT=1
154+
SONARQUBE_DB_MEMORY_LIMIT=512Mi
155+
156+
# SonarQube database and backup capacity
157+
SONARQUBE_DB_CAPACITY=2Gi
158+
SONARQUBE_DB_BACKUP_CAPACITY=1Gi
129159

130160
#########
131161
# Jira #

jenkins/webhook-proxy/main.go

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ type Client interface {
101101
GetPipeline(e *Event) (bool, []byte, error)
102102
CreateOrUpdatePipeline(exists bool, tmpl *template.Template, e *Event, data BuildConfigData) (int, error)
103103
DeletePipeline(e *Event) error
104-
CheckAvailability(e *Event)
104+
CheckJenkinsAvailability(e *Event)
105+
CheckDocGenAvailability(e *Event)
105106
}
106107

107108
type ocClient struct {
@@ -584,7 +585,8 @@ func (c *ocClient) Forward(e *Event, triggerSecret string) (int, []byte, error)
584585
)
585586
log.Println(e.RequestID, "Forwarding to", url)
586587

587-
c.CheckAvailability(e)
588+
c.CheckJenkinsAvailability(e)
589+
c.CheckDocGenAvailability(e)
588590

589591
p := struct {
590592
Env []EnvPair `json:"env"`
@@ -617,7 +619,8 @@ func (c *ocClient) CreateOrUpdatePipeline(exists bool, tmpl *template.Template,
617619
return 500, err
618620
}
619621

620-
c.CheckAvailability(e)
622+
c.CheckJenkinsAvailability(e)
623+
c.CheckDocGenAvailability(e)
621624

622625
url := fmt.Sprintf(
623626
"%s/namespaces/%s/buildconfigs",
@@ -660,7 +663,8 @@ func (c *ocClient) DeletePipeline(e *Event) error {
660663
e.Pipeline,
661664
)
662665

663-
c.CheckAvailability(e)
666+
c.CheckJenkinsAvailability(e)
667+
c.CheckDocGenAvailability(e)
664668

665669
req, _ := http.NewRequest(
666670
"DELETE",
@@ -685,7 +689,7 @@ func (c *ocClient) DeletePipeline(e *Event) error {
685689
}
686690

687691
// Check that Jenkins is up in case the service is idle in OpenShift.
688-
func (c *ocClient) CheckAvailability(e *Event) {
692+
func (c *ocClient) CheckJenkinsAvailability(e *Event) {
689693
url := fmt.Sprintf(
690694
"http://jenkins.%s.svc.cluster.local",
691695
e.Namespace,
@@ -709,6 +713,31 @@ func (c *ocClient) CheckAvailability(e *Event) {
709713
}
710714
}
711715

716+
// Check that DocGen is up in case the service is idle in OpenShift.
717+
func (c *ocClient) CheckDocGenAvailability(e *Event) {
718+
url := fmt.Sprintf(
719+
"http://docgen.%s:8080",
720+
e.Namespace,
721+
)
722+
req, _ := http.NewRequest(
723+
"GET",
724+
url,
725+
nil,
726+
)
727+
728+
res, err := c.do(req)
729+
730+
if err != nil {
731+
log.Println(e.RequestID, "DocGen not reachable, if idled it will scale up in namespace", e.Namespace)
732+
} else {
733+
if res.StatusCode == 200 {
734+
log.Println(e.RequestID, "DocGen available in namespace", e.Namespace)
735+
} else {
736+
log.Println(e.RequestID, "DocGen not available, status code is", res.StatusCode)
737+
}
738+
}
739+
}
740+
712741
// GetPipeline determines whether the pipeline corresponding to the given
713742
// event already exists.
714743
func (c *ocClient) GetPipeline(e *Event) (bool, []byte, error) {

jenkins/webhook-proxy/main_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,10 @@ func (c *mockClient) DeletePipeline(e *Event) error {
198198
c.Event = e
199199
return nil
200200
}
201-
func (c *mockClient) CheckAvailability(e *Event) {
201+
func (c *mockClient) CheckJenkinsAvailability(e *Event) {
202+
c.Event = e
203+
}
204+
func (c *mockClient) CheckDocGenAvailability(e *Event) {
202205
c.Event = e
203206
}
204207

nexus/chart/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 1.0.0
18+
version: 1.1.0
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to
2222
# follow Semantic Versioning. They should reflect the version the application is using.
2323
# It is recommended to use it with quotes.
24-
appVersion: "3.67.1-java11"
24+
appVersion: "3.68.1-java11"

nexus/chart/templates/pvc-data.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ spec:
1313
- ReadWriteOnce
1414
resources:
1515
requests:
16-
storage: 60Gi
16+
storage: {{ .Values.nexus.pvcDataCapacity }}
1717
storageClassName: {{ .Values.global.storageClassData }}
1818
volumeMode: Filesystem

nexus/chart/templates/pvc-db-backup.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ spec:
1313
- ReadWriteOnce
1414
resources:
1515
requests:
16-
storage: 10Gi
16+
storage: {{ .Values.nexus.pvcDataBackupCapacity }}
1717
storageClassName: {{ .Values.global.storageClassData }}
1818
volumeMode: Filesystem

0 commit comments

Comments
 (0)