Skip to content

Commit d664898

Browse files
authored
Merge pull request #2747 from DataDog/nogorodnikov/merge-develop-into-feature-sync-200625
Merge `develop` branch into feature sync branch
2 parents 1379c79 + 9d6946a commit d664898

File tree

78 files changed

+3027
-1827
lines changed

Some content is hidden

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

78 files changed

+3027
-1827
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
issuer: https://gitlab.ddbuild.io
2+
3+
subject_pattern: "project_path:DataDog/dd-sdk-android:ref_type:branch:ref:.*"
4+
5+
permissions:
6+
contents: read

.github/workflows/changelog-to-confluence.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ jobs:
2323
- name: Publish Markdown to Confluence
2424
uses: markdown-confluence/publish-action@7767a0a7f438bb1497ee7ffd7d3d685b81dfe700 # v5
2525
with:
26-
confluenceBaseUrl: ${{ secrets.CONFLUENCE_BASE_URL }}
26+
confluenceBaseUrl: ${{ secrets.DATADOG_CONFLUENCE_BASE_URL }}
2727
confluenceParentId: ${{ secrets.CONFLUENCE_PARENT_ID }}
28-
atlassianUserName: ${{ secrets.ATLASSIAN_USERNAME }}
29-
atlassianApiToken: ${{ secrets.ATLASSIAN_API_TOKEN }}
28+
atlassianUserName: ${{ secrets.CONFLUENCE_ROBOT_RUM_EMAIL }}
29+
atlassianApiToken: ${{ secrets.CONFLUENCE_ROBOT_RUM_API_KEY }}
3030
contentRoot: '.'
3131
folderToPublish: 'publish_folder'

.gitlab-ci.yml

Lines changed: 8 additions & 1030 deletions
Large diffs are not rendered by default.

build.gradle.kts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ tasks.register("assembleSampleRelease") {
9595
":sample:kotlin:assembleUs1Release",
9696
":sample:wear:assembleUs1Release",
9797
":sample:vendor-lib:assembleRelease",
98+
":sample:automotive:assembleRelease",
9899
":sample:tv:assembleRelease"
99100
)
100101
}
@@ -223,3 +224,21 @@ tasks.register("printSdkDebugRuntimeClasspath") {
223224
File("sdk_classpath").writeText(result.joinToString(File.pathSeparator) { it.absolutePath })
224225
}
225226
}
227+
228+
tasks.register("listAllPublishedArtifactIds") {
229+
doLast {
230+
val artifactIds = rootProject.subprojects.flatMap { subproject ->
231+
val publishing = subproject.extensions.findByType<PublishingExtension>()
232+
publishing?.publications?.mapNotNull { publication ->
233+
if (publication is MavenPublication) {
234+
publication.artifactId
235+
} else {
236+
null
237+
}
238+
}.orEmpty()
239+
}
240+
artifactIds.forEach {
241+
println(it)
242+
}
243+
}
244+
}

buildSrc/src/main/kotlin/com/datadog/gradle/config/AndroidConfig.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ object AndroidConfig {
1818
const val TARGET_SDK = 36
1919
const val MIN_SDK = 21
2020
const val MIN_SDK_FOR_WEAR_AND_TV = 23
21+
const val MIN_SDK_FOR_AUTO = 29
2122
const val BUILD_TOOLS_VERSION = "36.0.0"
2223

2324
val VERSION = Version(2, 23, 0, Version.Type.Snapshot)

buildSrc/src/main/kotlin/com/datadog/gradle/config/FlavorBuildConfig.kt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,3 +122,20 @@ fun ApplicationDefaultConfig.configureFlavorForTvApp(
122122
"\"${config.token}\""
123123
)
124124
}
125+
126+
@Suppress("UnstableApiUsage")
127+
fun ApplicationDefaultConfig.configureFlavorForAutoApp(
128+
rootDir: File
129+
) {
130+
val config = sampleAppConfig("${rootDir.absolutePath}/config/auto.json")
131+
buildConfigField(
132+
"String",
133+
"DD_RUM_APPLICATION_ID",
134+
"\"${config.rumApplicationId}\""
135+
)
136+
buildConfigField(
137+
"String",
138+
"DD_CLIENT_TOKEN",
139+
"\"${config.token}\""
140+
)
141+
}

Dockerfile.gitlab renamed to ci/Dockerfile.gitlab

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ RUN apt update && apt install -y python3
4040

4141
# Install pip for aws
4242
RUN set -x \
43-
&& curl -OL https://bootstrap.pypa.io/get-pip.py \
43+
&& curl -OL https://bootstrap.pypa.io/pip/3.8/get-pip.py \
4444
&& python3 get-pip.py \
4545
&& rm get-pip.py
4646

@@ -106,3 +106,5 @@ RUN npm install -g @datadog/datadog-ci
106106
ENV DD_TRACER_FOLDER $PWD/dd-java-agent
107107
RUN mkdir -p $DD_TRACER_FOLDER
108108
RUN wget -O $DD_TRACER_FOLDER/dd-java-agent.jar https://repo1.maven.org/maven2/com/datadoghq/dd-java-agent/$DD_TRACER_VERSION/dd-java-agent-$DD_TRACER_VERSION.jar
109+
110+
COPY --from=registry.ddbuild.io/dd-octo-sts:v1.8.2 /usr/local/bin/dd-octo-sts /usr/local/bin/dd-octo-sts
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
include:
2+
- "ci/pipelines/common-snippets.yml"
3+
- 'https://gitlab-templates.ddbuild.io/slack-notifier/v1/template.yml'
4+
5+
stages:
6+
- check-release
7+
- notify
8+
9+
check-release:is-published:
10+
tags: [ "arch:amd64" ]
11+
image: $CI_IMAGE_DOCKER
12+
stage: check-release
13+
id_tokens:
14+
DDOCTOSTS_ID_TOKEN:
15+
aud: dd-octo-sts
16+
script:
17+
- export GITHUB_TOKEN=$(dd-octo-sts token --scope DataDog/dd-sdk-android --policy self.gitlab.read)
18+
- bash ./ci/scripts/check_latest_release_is_published.sh
19+
20+
notify:report-failure-to-slack:
21+
extends: .slack-notifier-base
22+
stage: notify
23+
when: on_failure
24+
script:
25+
- BUILD_URL="$CI_PROJECT_URL/pipelines/$CI_PIPELINE_ID"
26+
- 'MESSAGE_TEXT=":status_alert: Some release artifacts were not published to maven. $BUILD_URL"'
27+
- postmessage "#mobile-sdk-ops" "$MESSAGE_TEXT"

ci/pipelines/common-snippets.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.common-snippets:
2+
set-github-installation-token:
3+
- export GITHUB_APP_CLIENT_ID=$(aws ssm get-parameter --region us-east-1 --name ci.dd-sdk-android.gh_app_client_id --with-decryption --query "Parameter.Value" --out text)
4+
- export GITHUB_APP_INSTALLATION_ID=$(aws ssm get-parameter --region us-east-1 --name ci.dd-sdk-android.gh_app_installation_id --with-decryption --query "Parameter.Value" --out text)
5+
- export GITHUB_TOKEN=$(aws ssm get-parameter --region us-east-1 --name ci.dd-sdk-android.gh_app_private_key --with-decryption --query "Parameter.Value" --out text | bash ./ci/scripts/create_github_installation_token.sh "$GITHUB_APP_CLIENT_ID" "$GITHUB_APP_INSTALLATION_ID")

0 commit comments

Comments
 (0)