Skip to content

Commit 8e0a4f7

Browse files
authored
Merge pull request #2749 from DataDog/nogorodnikov/merge-feature-sync-into-v3
Merge feature sync branch into SDK v3 branch
2 parents ab7d8b8 + 86915db commit 8e0a4f7

File tree

210 files changed

+9749
-5463
lines changed

Some content is hidden

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

210 files changed

+9749
-5463
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

.gitlab-ci.yml

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

build.gradle.kts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,3 +224,21 @@ tasks.register("printSdkDebugRuntimeClasspath") {
224224
File("sdk_classpath").writeText(result.joinToString(File.pathSeparator) { it.absolutePath })
225225
}
226226
}
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+
}

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)