Skip to content

Commit 0331b7e

Browse files
authored
Merge pull request #1971 from DataDog/release/2.15.0
Release `2.15.0`
2 parents 65854b3 + 15e3ada commit 0331b7e

File tree

163 files changed

+3113
-2299
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

163 files changed

+3113
-2299
lines changed

.github/PULL_REQUEST_TEMPLATE.md

-3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,3 @@ A brief description of implementation details of this PR.
1010
- [ ] Feature or bugfix MUST have appropriate tests (unit, integration)
1111
- [ ] Make sure each commit and the PR mention the Issue number or JIRA reference
1212
- [ ] Add CHANGELOG entry for user facing changes
13-
14-
### Custom CI job configuration (optional)
15-
- [ ] Run unit tests for Session Replay

.gitignore

+6-3
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ Carthage/Build
77
Carthage/Checkouts
88

99
xcuserdata/
10-
instrumented-tests/DatadogSDKTesting.*
11-
instrumented-tests/LICENSE
12-
1310
*.local.xcconfig
11+
E2ETests/code-signing
12+
tools/dogfooding/repos
1413

1514
# Ignore files for Python tools:
1615
.idea
@@ -20,3 +19,7 @@ __pycache__
2019
*.swp
2120
.venv
2221
.vscode
22+
*.pytest_cache
23+
24+
# CI job artifacts
25+
artifacts/

.gitlab-ci.yml

+231-31
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,21 @@ stages:
44
- test
55
- ui-test
66
- smoke-test
7+
- e2e-test
8+
- dogfood
9+
- release-build
10+
- release-publish
711

812
variables:
913
MAIN_BRANCH: "master"
1014
DEVELOP_BRANCH: "develop"
15+
# Prefilled variables for running a pipeline manually:
16+
# Ref.: https://docs.gitlab.com/ee/ci/pipelines/index.html#prefill-variables-in-manual-pipelines
17+
RELEASE_GIT_TAG:
18+
description: "The Git tag for the release pipeline. If set, release pipeline will be triggered for the given tag."
19+
RELEASE_DRY_RUN:
20+
value: "1"
21+
description: "Controls the dry run mode for the release pipeline. If set to '1', the pipeline will execute all steps but will not publish artifacts. If set to '0', the pipeline will run fully."
1122

1223
default:
1324
tags:
@@ -18,36 +29,42 @@ default:
1829
# │ Utility jobs: │
1930
# └───────────────┘
2031

21-
# Trigger jobs on 'develop' and 'master' branches
22-
.run:when-develop-or-master:
23-
rules:
24-
- if: '$CI_COMMIT_BRANCH == $DEVELOP_BRANCH || $CI_COMMIT_BRANCH == $MAIN_BRANCH'
25-
when: always
32+
# Utility jobs define rules for including or excluding dependent jobs from the pipeline.
33+
#
34+
# Ref.: https://docs.gitlab.com/ee/ci/jobs/job_rules.html
35+
# > Rules are evaluated in order until the first match. When a match is found, the job is either included or excluded
36+
# > from the pipeline, depending on the configuration.
2637

27-
# Trigger jobs on SDK code changes, comparing against 'develop' branch
28-
.run:if-sdk-modified:
38+
.test-pipeline-job:
2939
rules:
30-
- changes:
40+
- if: '$CI_COMMIT_BRANCH == $DEVELOP_BRANCH || $CI_COMMIT_BRANCH == $MAIN_BRANCH' # always on main branches
41+
- if: '$CI_COMMIT_BRANCH' # when on other branch with following changes compared to develop
42+
changes:
3143
paths:
3244
- "Datadog*/**/*"
3345
- "IntegrationTests/**/*"
46+
- "SmokeTests/**/*"
3447
- "TestUtilities/**/*"
3548
- "*" # match any file in the root directory
36-
compare_to: 'develop' # cannot use variable due to: https://gitlab.com/gitlab-org/gitlab/-/issues/369916
49+
compare_to: 'develop' # cannot use $DEVELOP_BRANCH var due to: https://gitlab.com/gitlab-org/gitlab/-/issues/369916
3750

38-
# Trigger jobs on changes in `tools/*`, comparing against 'develop' branch
39-
.run:if-tools-modified:
40-
rules:
41-
- changes:
42-
paths:
43-
- "tools/**/*"
44-
- "Makefile"
45-
- ".gitlab-ci.yml"
46-
compare_to: 'develop'
51+
.release-pipeline-job:
52+
rules:
53+
- if: '$CI_COMMIT_TAG || $RELEASE_GIT_TAG'
54+
55+
.release-pipeline-delayed-job:
56+
rules:
57+
- if: '$CI_COMMIT_TAG || $RELEASE_GIT_TAG'
58+
when: delayed
59+
start_in: 20 minutes
4760

4861
ENV check:
4962
stage: pre
63+
rules:
64+
- !reference [.test-pipeline-job, rules]
65+
- !reference [.release-pipeline-job, rules]
5066
script:
67+
- ./tools/runner-setup.sh --datadog-ci # temporary, waiting for AMI
5168
- make env-check
5269

5370
# ┌──────────────────────────┐
@@ -57,8 +74,7 @@ ENV check:
5774
Lint:
5875
stage: lint
5976
rules:
60-
- !reference [.run:when-develop-or-master, rules]
61-
- !reference [.run:if-sdk-modified, rules]
77+
- !reference [.test-pipeline-job, rules]
6278
script:
6379
- make clean repo-setup ENV=ci
6480
- make lint license-check
@@ -67,8 +83,8 @@ Lint:
6783
Unit Tests (iOS):
6884
stage: test
6985
rules:
70-
- !reference [.run:when-develop-or-master, rules]
71-
- !reference [.run:if-sdk-modified, rules]
86+
- !reference [.test-pipeline-job, rules]
87+
- !reference [.release-pipeline-job, rules]
7288
variables:
7389
XCODE: "15.3.0"
7490
OS: "17.4"
@@ -82,8 +98,8 @@ Unit Tests (iOS):
8298
Unit Tests (tvOS):
8399
stage: test
84100
rules:
85-
- !reference [.run:when-develop-or-master, rules]
86-
- !reference [.run:if-sdk-modified, rules]
101+
- !reference [.test-pipeline-job, rules]
102+
- !reference [.release-pipeline-job, rules]
87103
variables:
88104
XCODE: "15.3.0"
89105
OS: "17.4"
@@ -97,8 +113,8 @@ Unit Tests (tvOS):
97113
UI Tests:
98114
stage: ui-test
99115
rules:
100-
- !reference [.run:when-develop-or-master, rules]
101-
- !reference [.run:if-sdk-modified, rules]
116+
- !reference [.test-pipeline-job, rules]
117+
- !reference [.release-pipeline-job, rules]
102118
variables:
103119
XCODE: "15.3.0"
104120
OS: "17.4"
@@ -116,17 +132,46 @@ UI Tests:
116132
- make clean repo-setup ENV=ci
117133
- make ui-test TEST_PLAN="$TEST_PLAN" OS="$OS" PLATFORM="$PLATFORM" DEVICE="$DEVICE"
118134

135+
SR Snapshot Tests:
136+
stage: ui-test
137+
rules:
138+
- !reference [.test-pipeline-job, rules]
139+
- !reference [.release-pipeline-job, rules]
140+
variables:
141+
XCODE: "15.4.0"
142+
OS: "17.5"
143+
PLATFORM: "iOS Simulator"
144+
DEVICE: "iPhone 15"
145+
ARTIFACTS_PATH: "artifacts"
146+
artifacts:
147+
paths:
148+
- artifacts
149+
expire_in: 1 week
150+
when: on_failure
151+
script:
152+
- ./tools/runner-setup.sh --xcode "$XCODE" --iOS --os "$OS" --ssh # temporary, waiting for AMI
153+
- make clean repo-setup ENV=ci
154+
- make sr-snapshots-pull sr-snapshot-test OS="$OS" PLATFORM="$PLATFORM" DEVICE="$DEVICE" ARTIFACTS_PATH="$ARTIFACTS_PATH"
155+
119156
Tools Tests:
120157
stage: test
121-
rules:
122-
- !reference [.run:when-develop-or-master, rules]
123-
- !reference [.run:if-tools-modified, rules]
158+
rules:
159+
- if: '$CI_COMMIT_BRANCH' # when on branch with following changes compared to develop
160+
changes:
161+
paths:
162+
- "tools/**/*"
163+
- "Makefile"
164+
- ".gitlab-ci.yml"
165+
compare_to: 'develop'
124166
script:
125167
- make clean repo-setup ENV=ci
126168
- make tools-test
127169

128170
Smoke Tests (iOS):
129171
stage: smoke-test
172+
rules:
173+
- !reference [.test-pipeline-job, rules]
174+
- !reference [.release-pipeline-job, rules]
130175
tags:
131176
- macos:ventura
132177
- specific:true
@@ -136,13 +181,16 @@ Smoke Tests (iOS):
136181
PLATFORM: "iOS Simulator"
137182
DEVICE: "iPhone 15 Pro"
138183
script:
139-
- ./tools/runner-setup.sh --xcode "$XCODE" --iOS --tvOS --os "$OS" # temporary, waiting for AMI
184+
- ./tools/runner-setup.sh --xcode "$XCODE" --iOS --tvOS --os "$OS" --ssh # temporary, waiting for AMI
140185
- make clean repo-setup ENV=ci
141186
- make spm-build-ios
142187
- make smoke-test-ios-all OS="$OS" PLATFORM="$PLATFORM" DEVICE="$DEVICE"
143188

144189
Smoke Tests (tvOS):
145190
stage: smoke-test
191+
rules:
192+
- !reference [.test-pipeline-job, rules]
193+
- !reference [.release-pipeline-job, rules]
146194
tags:
147195
- macos:ventura
148196
- specific:true
@@ -152,13 +200,16 @@ Smoke Tests (tvOS):
152200
PLATFORM: "tvOS Simulator"
153201
DEVICE: "Apple TV"
154202
script:
155-
- ./tools/runner-setup.sh --xcode "$XCODE" --iOS --tvOS --os "$OS" # temporary, waiting for AMI
203+
- ./tools/runner-setup.sh --xcode "$XCODE" --iOS --tvOS --os "$OS" --ssh # temporary, waiting for AMI
156204
- make clean repo-setup ENV=ci
157205
- make spm-build-tvos
158206
- make smoke-test-tvos-all OS="$OS" PLATFORM="$PLATFORM" DEVICE="$DEVICE"
159207

160208
Smoke Tests (visionOS):
161209
stage: smoke-test
210+
rules:
211+
- !reference [.test-pipeline-job, rules]
212+
- !reference [.release-pipeline-job, rules]
162213
tags:
163214
- macos:ventura
164215
- specific:true
@@ -172,6 +223,9 @@ Smoke Tests (visionOS):
172223

173224
Smoke Tests (macOS):
174225
stage: smoke-test
226+
rules:
227+
- !reference [.test-pipeline-job, rules]
228+
- !reference [.release-pipeline-job, rules]
175229
tags:
176230
- macos:ventura
177231
- specific:true
@@ -181,3 +235,149 @@ Smoke Tests (macOS):
181235
- ./tools/runner-setup.sh --xcode "$XCODE" # temporary, waiting for AMI
182236
- make clean repo-setup ENV=ci
183237
- make spm-build-macos
238+
239+
Smoke Tests (watchOS):
240+
stage: smoke-test
241+
rules:
242+
- !reference [.test-pipeline-job, rules]
243+
- !reference [.release-pipeline-job, rules]
244+
tags:
245+
- macos:ventura
246+
- specific:true
247+
variables:
248+
XCODE: "15.2.0"
249+
OS: "10.2"
250+
script:
251+
- ./tools/runner-setup.sh --xcode "$XCODE" --watchOS --os "$OS" # temporary, waiting for AMI
252+
- make clean repo-setup ENV=ci
253+
- make spm-build-watchos
254+
255+
# ┌──────────────────────┐
256+
# │ E2E Test app upload: │
257+
# └──────────────────────┘
258+
259+
E2E Test (upload to s8s):
260+
stage: e2e-test
261+
rules:
262+
- if: '$CI_COMMIT_BRANCH == $DEVELOP_BRANCH'
263+
variables:
264+
XCODE: "15.3.0"
265+
OS: "17.4"
266+
artifacts:
267+
paths:
268+
- artifacts
269+
expire_in: 2 weeks
270+
script:
271+
- ./tools/runner-setup.sh --xcode "$XCODE" --iOS --os "$OS" --datadog-ci # temporary, waiting for AMI
272+
- make clean
273+
- export DRY_RUN=${DRY_RUN:-0} # default to 0 if not specified
274+
- make e2e-build-upload ARTIFACTS_PATH="artifacts/e2e"
275+
276+
# ┌─────────────────┐
277+
# │ SDK dogfooding: │
278+
# └─────────────────┘
279+
280+
Dogfood (Shopist):
281+
stage: dogfood
282+
rules:
283+
- if: '$CI_COMMIT_BRANCH == $DEVELOP_BRANCH'
284+
when: manual
285+
allow_failure: true
286+
script:
287+
- ./tools/runner-setup.sh --ssh # temporary, waiting for AMI
288+
- DRY_RUN=0 make dogfood-shopist
289+
290+
Dogfood (Datadog app):
291+
stage: dogfood
292+
rules:
293+
- if: '$CI_COMMIT_BRANCH == $DEVELOP_BRANCH'
294+
when: manual
295+
allow_failure: true
296+
script:
297+
- ./tools/runner-setup.sh --ssh # temporary, waiting for AMI
298+
- DRY_RUN=0 make dogfood-datadog-app
299+
300+
# ┌──────────────┐
301+
# │ SDK release: │
302+
# └──────────────┘
303+
304+
.release-before-script: &export_MAKE_release_params
305+
- export GIT_TAG=${RELEASE_GIT_TAG:-$CI_COMMIT_TAG} # CI_COMMIT_TAG if set, otherwise default to RELEASE_GIT_TAG
306+
- if [ -z "$GIT_TAG" ]; then echo "GIT_TAG is not set"; exit 1; fi # sanity check
307+
- export ARTIFACTS_PATH="artifacts/$GIT_TAG"
308+
- export DRY_RUN=${CI_COMMIT_TAG:+0} # 0 if CI_COMMIT_TAG is set
309+
- export DRY_RUN=${DRY_RUN:-$RELEASE_DRY_RUN} # otherwise default to RELEASE_DRY_RUN
310+
311+
Build Artifacts:
312+
stage: release-build
313+
rules:
314+
- !reference [.release-pipeline-job, rules]
315+
variables:
316+
XCODE: "15.3.0"
317+
artifacts:
318+
paths:
319+
- artifacts
320+
expire_in: 4 weeks
321+
before_script:
322+
- *export_MAKE_release_params
323+
script:
324+
- ./tools/runner-setup.sh --xcode "$XCODE" --iOS --tvOS --os "17.4" --ssh # temporary, waiting for AMI
325+
- make env-check
326+
- make clean
327+
- make release-build release-validate
328+
329+
Publish GH Asset:
330+
stage: release-publish
331+
rules:
332+
- !reference [.release-pipeline-job, rules]
333+
variables:
334+
XCODE: "15.3.0"
335+
before_script:
336+
- *export_MAKE_release_params
337+
script:
338+
- ./tools/runner-setup.sh --xcode "$XCODE" --iOS --tvOS --os "17.4" # temporary, waiting for AMI
339+
- make env-check
340+
- make clean
341+
- make release-publish-github
342+
343+
Publish CP podspecs (internal):
344+
stage: release-publish
345+
rules:
346+
- !reference [.release-pipeline-job, rules]
347+
variables:
348+
XCODE: "15.3.0"
349+
before_script:
350+
- *export_MAKE_release_params
351+
script:
352+
- ./tools/runner-setup.sh --xcode "$XCODE" --iOS --tvOS --os "17.4" # temporary, waiting for AMI
353+
- make env-check
354+
- make clean
355+
- make release-publish-internal-podspecs
356+
357+
Publish CP podspecs (dependent):
358+
stage: release-publish
359+
rules:
360+
- !reference [.release-pipeline-delayed-job, rules]
361+
variables:
362+
XCODE: "15.3.0"
363+
before_script:
364+
- *export_MAKE_release_params
365+
script:
366+
- ./tools/runner-setup.sh --xcode "$XCODE" --iOS --tvOS --os "17.4" # temporary, waiting for AMI
367+
- make env-check
368+
- make clean
369+
- make release-publish-dependent-podspecs
370+
371+
Publish CP podspecs (legacy):
372+
stage: release-publish
373+
rules:
374+
- !reference [.release-pipeline-delayed-job, rules]
375+
variables:
376+
XCODE: "15.3.0"
377+
before_script:
378+
- *export_MAKE_release_params
379+
script:
380+
- ./tools/runner-setup.sh --xcode "$XCODE" --iOS --tvOS --os "17.4" # temporary, waiting for AMI
381+
- make env-check
382+
- make clean
383+
- make release-publish-legacy-podspecs

0 commit comments

Comments
 (0)