Skip to content

Commit cb0446e

Browse files
authored
ci: Publish build scans to develocity.apache.org (#3782)
1 parent 55c182c commit cb0446e

File tree

13 files changed

+387
-545
lines changed

13 files changed

+387
-545
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,14 @@ jobs:
4242
cache: 'npm'
4343
cache-dependency-path: ui/package-lock.json
4444

45+
- name: Set up Develocity npm agent
46+
run: |
47+
npm exec -y -- pacote extract @gradle-tech/develocity-agent ~/.node_libraries/@gradle-tech/develocity-agent
48+
4549
- name: Build with Maven
4650
run: mvn clean verify
51+
env:
52+
DEVELOCITY_ACCESS_KEY: ${{ secrets.STREAMPIPES_DEVELOCITY_ACCESS_KEY }}
4753

4854
- name: Set env variables for Docker builds
4955
run: |
@@ -83,6 +89,9 @@ jobs:
8389
run: |
8490
npm install
8591
npm run build
92+
env:
93+
DEVELOCITY_ACCESS_KEY: ${{ secrets.STREAMPIPES_DEVELOCITY_ACCESS_KEY }}
94+
NODE_OPTIONS: '-r @gradle-tech/develocity-agent/preload'
8695

8796
- name: Build and Push Docker UI Image
8897
uses: docker/build-push-action@v6
@@ -123,4 +132,3 @@ jobs:
123132
platforms: linux/amd64,linux/arm64/v8,linux/arm/v7
124133
push: true
125134
tags: ${{ env.DOCKERHUB_APACHE_REPO }}/extensions-iiot-minimal:${{ env.MVN_VERSION }}
126-

.github/workflows/cypress-test.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,24 @@ jobs:
4141
cache: 'npm'
4242
cache-dependency-path: ui/package-lock.json
4343

44+
- name: Set up Develocity npm agent
45+
run: |
46+
npm exec -y -- pacote extract @gradle-tech/develocity-agent ~/.node_libraries/@gradle-tech/develocity-agent
47+
4448
- name: Build UI
4549
working-directory: ./ui
4650
run: |
4751
rm -rf node_modules package-lock.json
4852
npm install
4953
npm run build
54+
env:
55+
DEVELOCITY_ACCESS_KEY: ${{ secrets.STREAMPIPES_DEVELOCITY_ACCESS_KEY }}
56+
NODE_OPTIONS: '-r @gradle-tech/develocity-agent/preload'
5057

5158
- name: Build with Maven
5259
run: mvn clean package
60+
env:
61+
DEVELOCITY_ACCESS_KEY: ${{ secrets.STREAMPIPES_DEVELOCITY_ACCESS_KEY }}
5362

5463
- name: Build and run streampipes
5564
run: docker compose up --build -d
@@ -60,4 +69,7 @@ jobs:
6069

6170
- name: 'UI Tests'
6271
working-directory: ./ui
63-
run: npx cypress run --record --key ${{ secrets.CYPRESS_RECORD_KEY }} --spec "cypress/tests/**/*.spec.ts"
72+
run: npx cypress run --record --key ${{ secrets.CYPRESS_RECORD_KEY }} --spec "cypress/tests/**/*.spec.ts"
73+
env:
74+
DEVELOCITY_ACCESS_KEY: ${{ secrets.STREAMPIPES_DEVELOCITY_ACCESS_KEY }}
75+
NODE_OPTIONS: '-r @gradle-tech/develocity-agent/preload'

.github/workflows/extensions-docs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ jobs:
4242

4343
- name: Build with Maven
4444
run: mvn clean package
45+
env:
46+
DEVELOCITY_ACCESS_KEY: ${{ secrets.STREAMPIPES_DEVELOCITY_ACCESS_KEY }}
4547

4648
- name: Publish Extensions docs as artifact
4749
uses: actions/upload-artifact@v4

.github/workflows/go-client-e2e-test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ jobs:
5050

5151
- name: Build with Maven
5252
run: mvn clean install
53+
env:
54+
DEVELOCITY_ACCESS_KEY: ${{ secrets.STREAMPIPES_DEVELOCITY_ACCESS_KEY }}
5355

5456
- name: Build Docker image
5557
run: |

.github/workflows/pr-validation.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ jobs:
3434

3535
- name: Validate java code
3636
run: mvn clean verify
37+
env:
38+
DEVELOCITY_ACCESS_KEY: ${{ secrets.STREAMPIPES_DEVELOCITY_ACCESS_KEY }}
3739

3840
run-format-and-lint-ui:
3941
runs-on: ubuntu-latest
@@ -48,16 +50,26 @@ jobs:
4850
cache: 'npm'
4951
cache-dependency-path: ui/package-lock.json
5052

53+
- name: Set up Develocity npm agent
54+
run: |
55+
npm exec -y -- pacote extract @gradle-tech/develocity-agent ~/.node_libraries/@gradle-tech/develocity-agent
56+
5157
- name: Install dependencies
5258
working-directory: ./ui
5359
run: |
5460
npm install
61+
env:
62+
DEVELOCITY_ACCESS_KEY: ${{ secrets.STREAMPIPES_DEVELOCITY_ACCESS_KEY }}
63+
NODE_OPTIONS: '-r @gradle-tech/develocity-agent/preload'
5564

5665
- name: Format and Lint all files
5766
working-directory: ./ui
5867
run: |
5968
npm run format
6069
npm run lint
70+
env:
71+
DEVELOCITY_ACCESS_KEY: ${{ secrets.STREAMPIPES_DEVELOCITY_ACCESS_KEY }}
72+
NODE_OPTIONS: '-r @gradle-tech/develocity-agent/preload'
6173

6274
run-cypress-e2e-tests:
6375
runs-on: ubuntu-latest
@@ -80,19 +92,31 @@ jobs:
8092
cache: 'npm'
8193
cache-dependency-path: ui/package-lock.json
8294

95+
- name: Set up Develocity npm agent
96+
run: |
97+
npm exec -y -- pacote extract @gradle-tech/develocity-agent ~/.node_libraries/@gradle-tech/develocity-agent
98+
8399
- name: Install NPM dependencies
84100
working-directory: ./ui
85101
run: |
86102
rm -rf node_modules package-lock.json
87103
npm install
104+
env:
105+
DEVELOCITY_ACCESS_KEY: ${{ secrets.STREAMPIPES_DEVELOCITY_ACCESS_KEY }}
106+
NODE_OPTIONS: '-r @gradle-tech/develocity-agent/preload'
88107

89108
- name: Build UI
90109
working-directory: ./ui
91110
run: |
92111
npm run build
112+
env:
113+
DEVELOCITY_ACCESS_KEY: ${{ secrets.STREAMPIPES_DEVELOCITY_ACCESS_KEY }}
114+
NODE_OPTIONS: '-r @gradle-tech/develocity-agent/preload'
93115

94116
- name: Build with Maven
95117
run: mvn clean package
118+
env:
119+
DEVELOCITY_ACCESS_KEY: ${{ secrets.STREAMPIPES_DEVELOCITY_ACCESS_KEY }}
96120

97121
- name: Build and run streampipes
98122
run: docker compose up --build -d
@@ -104,6 +128,9 @@ jobs:
104128
- name: 'UI Tests'
105129
working-directory: ./ui
106130
run: npx cypress run --spec "cypress/tests/**/*.smoke.spec.ts"
131+
env:
132+
DEVELOCITY_ACCESS_KEY: ${{ secrets.STREAMPIPES_DEVELOCITY_ACCESS_KEY }}
133+
NODE_OPTIONS: '-r @gradle-tech/develocity-agent/preload'
107134

108135
python-quality-checks:
109136
runs-on: ubuntu-latest

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,3 +152,6 @@ dist/
152152
*whl
153153
*egg-info/
154154
__pycache__
155+
156+
# Develocity
157+
.mvn/.develocity

.mvn/develocity.xml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
2+
<!--
3+
4+
Licensed to the Apache Software Foundation (ASF) under one
5+
or more contributor license agreements. See the NOTICE file
6+
distributed with this work for additional information
7+
regarding copyright ownership. The ASF licenses this file
8+
to you under the Apache License, Version 2.0 (the
9+
"License"); you may not use this file except in compliance
10+
with the License. You may obtain a copy of the License at
11+
12+
http://www.apache.org/licenses/LICENSE-2.0
13+
14+
Unless required by applicable law or agreed to in writing,
15+
software distributed under the License is distributed on an
16+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17+
KIND, either express or implied. See the License for the
18+
specific language governing permissions and limitations
19+
under the License.
20+
21+
-->
22+
<develocity
23+
xmlns="https://www.gradle.com/develocity-maven" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
24+
xsi:schemaLocation="https://www.gradle.com/develocity-maven https://www.gradle.com/schema/develocity-maven.xsd">
25+
<projectId>streampipes</projectId>
26+
<server>
27+
<url>https://develocity.apache.org</url>
28+
</server>
29+
<buildScan>
30+
<backgroundBuildScanUpload>#{isFalse(env['CI'])}</backgroundBuildScanUpload>
31+
<publishing>
32+
<onlyIf>authenticated</onlyIf>
33+
</publishing>
34+
<obfuscation>
35+
<ipAddresses>#{{'0.0.0.0'}}</ipAddresses>
36+
</obfuscation>
37+
</buildScan>
38+
<buildCache>
39+
<local>
40+
<enabled>#{isFalse(env['CI'])}</enabled>
41+
</local>
42+
<remote>
43+
<enabled>true</enabled>
44+
<storeEnabled>#{isTrue(env['CI']) and isTrue(env['STREAMPIPES_DEVELOCITY_ACCESS_KEY'])}</storeEnabled>
45+
</remote>
46+
</buildCache>
47+
</develocity>

.mvn/extensions.xml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
2+
<!--
3+
4+
Licensed to the Apache Software Foundation (ASF) under one
5+
or more contributor license agreements. See the NOTICE file
6+
distributed with this work for additional information
7+
regarding copyright ownership. The ASF licenses this file
8+
to you under the Apache License, Version 2.0 (the
9+
"License"); you may not use this file except in compliance
10+
with the License. You may obtain a copy of the License at
11+
12+
http://www.apache.org/licenses/LICENSE-2.0
13+
14+
Unless required by applicable law or agreed to in writing,
15+
software distributed under the License is distributed on an
16+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17+
KIND, either express or implied. See the License for the
18+
specific language governing permissions and limitations
19+
under the License.
20+
21+
-->
22+
<extensions xmlns="http://maven.apache.org/EXTENSIONS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
23+
xsi:schemaLocation="http://maven.apache.org/EXTENSIONS/1.0.0 http://maven.apache.org/xsd/core-extensions-1.0.0.xsd">
24+
<extension>
25+
<groupId>com.gradle</groupId>
26+
<artifactId>develocity-maven-extension</artifactId>
27+
<version>2.1</version>
28+
</extension>
29+
<extension>
30+
<groupId>com.gradle</groupId>
31+
<artifactId>common-custom-user-data-maven-extension</artifactId>
32+
<version>2.0.5</version>
33+
</extension>
34+
</extensions>

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@
147147
<mockito.version>5.12.0</mockito.version>
148148

149149
<!-- Maven settings & dependencies -->
150-
<apache-rat-plugin.version>0.13</apache-rat-plugin.version>
150+
<apache-rat-plugin.version>0.16.1</apache-rat-plugin.version>
151151
<checksum-maven-plugin.version>1.11</checksum-maven-plugin.version>
152152
<checkstyle.version>10.17.0</checkstyle.version>
153153
<extra-enforcer-rules.version>1.8.0</extra-enforcer-rules.version>

ui/cypress.config.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
// tslint:disable-next-line:no-implicit-dependencies
2020
import { defineConfig } from 'cypress';
2121

22+
const develocityReporter = require.resolve(
23+
'@gradle-tech/develocity-agent/cypress-reporter',
24+
);
25+
2226
export default defineConfig({
2327
projectId: 'q1jdu2',
2428
downloadsFolder: 'cypress/downloads',
@@ -57,4 +61,9 @@ export default defineConfig({
5761
},
5862
specPattern: '**/*.cy.ts',
5963
},
64+
65+
reporter: 'cypress-multi-reporters',
66+
reporterOptions: {
67+
reporterEnabled: ['spec', develocityReporter].join(', '),
68+
},
6069
});

0 commit comments

Comments
 (0)