Skip to content

Commit 4d1f327

Browse files
authored
Merge pull request #941 from wordpress-mobile/publish-to-s3
Publish to s3
2 parents 3c76c2d + df3a814 commit 4d1f327

File tree

14 files changed

+247
-22
lines changed

14 files changed

+247
-22
lines changed

.buildkite/pipeline.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
common-params:
2+
&publish-android-artifacts-docker-container
3+
docker#v3.8.0:
4+
image: "public.ecr.aws/automattic/android-build-image:v1.1.0"
5+
propagate-environment: true
6+
environment:
7+
# DO NOT MANUALLY SET THESE VALUES!
8+
# They are passed from the Buildkite agent to the Docker container
9+
- "AWS_ACCESS_KEY"
10+
- "AWS_SECRET_KEY"
11+
12+
steps:
13+
- label: "Publish :aztec"
14+
key: "publish-aztec"
15+
plugins:
16+
- *publish-android-artifacts-docker-container
17+
command: |
18+
.buildkite/publish-aztec.sh
19+
20+
- label: "Publish :glide-loader"
21+
key: "publish-glide-loader"
22+
depends_on:
23+
- "publish-aztec"
24+
plugins:
25+
- *publish-android-artifacts-docker-container
26+
command: |
27+
.buildkite/publish-glide-loader.sh
28+
29+
- label: "Publish :picasso-loader"
30+
key: "publish-picasso-loader"
31+
depends_on:
32+
- "publish-aztec"
33+
plugins:
34+
- *publish-android-artifacts-docker-container
35+
command: |
36+
.buildkite/publish-picasso-loader.sh
37+
38+
- label: "Publish :wordpress-shortcodes"
39+
key: "publish-wordpress-shortcodes"
40+
depends_on:
41+
- "publish-aztec"
42+
plugins:
43+
- *publish-android-artifacts-docker-container
44+
command: |
45+
.buildkite/publish-wordpress-shortcodes.sh
46+
47+
- label: "Publish :wordpress-comments"
48+
key: "publish-wordpress-comments"
49+
depends_on:
50+
- "publish-aztec"
51+
plugins:
52+
- *publish-android-artifacts-docker-container
53+
command: |
54+
.buildkite/publish-wordpress-comments.sh

.buildkite/publish-aztec.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail
4+
5+
./gradlew \
6+
:aztec:prepareToPublishToS3 $(prepare_to_publish_to_s3_params) \
7+
:aztec:publish
8+
9+
# Add meta-data for the published version so we can use it in subsequent steps
10+
cat ./aztec/build/published-version.txt | buildkite-agent meta-data set "PUBLISHED_AZTEC_VERSION"

.buildkite/publish-glide-loader.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail
4+
5+
# Retrieve data from previous steps
6+
PUBLISHED_AZTEC_VERSION=$(buildkite-agent meta-data get "PUBLISHED_AZTEC_VERSION")
7+
8+
./gradlew \
9+
-PaztecVersion="$PUBLISHED_AZTEC_VERSION" \
10+
:glide-loader:prepareToPublishToS3 $(prepare_to_publish_to_s3_params) \
11+
:glide-loader:publish

.buildkite/publish-picasso-loader.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail
4+
5+
# Retrieve data from previous steps
6+
PUBLISHED_AZTEC_VERSION=$(buildkite-agent meta-data get "PUBLISHED_AZTEC_VERSION")
7+
8+
./gradlew \
9+
-PaztecVersion="$PUBLISHED_AZTEC_VERSION" \
10+
:picasso-loader:prepareToPublishToS3 $(prepare_to_publish_to_s3_params) \
11+
:picasso-loader:publish
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail
4+
5+
# Retrieve data from previous steps
6+
PUBLISHED_AZTEC_VERSION=$(buildkite-agent meta-data get "PUBLISHED_AZTEC_VERSION")
7+
8+
./gradlew \
9+
-PaztecVersion="$PUBLISHED_AZTEC_VERSION" \
10+
:wordpress-comments:prepareToPublishToS3 $(prepare_to_publish_to_s3_params) \
11+
:wordpress-comments:publish
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail
4+
5+
# Retrieve data from previous steps
6+
PUBLISHED_AZTEC_VERSION=$(buildkite-agent meta-data get "PUBLISHED_AZTEC_VERSION")
7+
8+
./gradlew \
9+
-PaztecVersion="$PUBLISHED_AZTEC_VERSION" \
10+
:wordpress-shortcodes:prepareToPublishToS3 $(prepare_to_publish_to_s3_params) \
11+
:wordpress-shortcodes:publish

aztec/build.gradle

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
plugins {
22
id "com.android.library"
33
id "org.jetbrains.kotlin.android"
4+
id "com.automattic.android.publish-to-s3"
45
}
56

67
android {
@@ -73,3 +74,22 @@ dependencies {
7374

7475
implementation 'org.apache.commons:commons-lang3:3.8.1'
7576
}
77+
78+
project.afterEvaluate {
79+
publishing {
80+
publications {
81+
AztecPublication(MavenPublication) {
82+
from components.release
83+
84+
groupId "org.wordpress"
85+
artifactId "aztec"
86+
// version is set by 'publish-to-s3' plugin
87+
}
88+
}
89+
}
90+
}
91+
92+
publishToS3Plugin {
93+
mavenPublishGroupId "org.wordpress"
94+
mavenPublishArtifactId "aztec"
95+
}

build.gradle

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,17 @@
1-
buildscript {
2-
ext {
3-
gradlePluginVersion = '3.3.1'
4-
kotlinCoroutinesVersion = '1.1.0'
5-
supportLibVersion = '27.1.1'
6-
tagSoupVersion = '1.2.1'
7-
glideVersion = '4.10.0'
8-
picassoVersion = '2.5.2'
9-
robolectricVersion = '4.4'
10-
jUnitVersion = '4.12'
11-
jSoupVersion = '1.11.3'
12-
wordpressUtilsVersion = '1.21'
13-
espressoVersion = '3.0.1'
14-
commonTargetSdkVersion = 30
15-
}
1+
plugins {
2+
id "com.android.application" apply false
3+
id "org.jetbrains.kotlin.android" apply false
164
}
175

186
allprojects {
197
repositories {
8+
maven {
9+
url "https://a8c-libs.s3.amazonaws.com/android"
10+
content {
11+
includeGroup "org.wordpress"
12+
includeGroup "org.wordpress.aztec"
13+
}
14+
}
2015
google()
2116
jcenter()
2217
}
@@ -47,3 +42,20 @@ subprojects {
4742
args "-F", "src/**/*.kt"
4843
}
4944
}
45+
46+
ext {
47+
gradlePluginVersion = '3.3.1'
48+
kotlinCoroutinesVersion = '1.1.0'
49+
supportLibVersion = '27.1.1'
50+
tagSoupVersion = '1.2.1'
51+
glideVersion = '4.10.0'
52+
picassoVersion = '2.5.2'
53+
robolectricVersion = '4.4'
54+
jUnitVersion = '4.12'
55+
jSoupVersion = '1.11.3'
56+
wordpressUtilsVersion = '1.21'
57+
espressoVersion = '3.0.1'
58+
commonTargetSdkVersion = 30
59+
60+
aztecProjectDependency = project.hasProperty("aztecVersion") ? "org.wordpress:aztec:${project.getProperty("aztecVersion")}" : project(":aztec")
61+
}

glide-loader/build.gradle

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
plugins {
22
id "com.android.library"
33
id "org.jetbrains.kotlin.android"
4+
id "com.automattic.android.publish-to-s3"
45
}
56

67
android {
@@ -25,6 +26,25 @@ android {
2526
dependencies {
2627
implementation "org.jetbrains.kotlin:kotlin-stdlib:$gradle.ext.kotlinVersion"
2728

28-
implementation project(':aztec')
29+
implementation aztecProjectDependency
2930
implementation "com.github.bumptech.glide:glide:$glideVersion"
3031
}
32+
33+
project.afterEvaluate {
34+
publishing {
35+
publications {
36+
GlideLoaderPublication(MavenPublication) {
37+
from components.release
38+
39+
groupId "org.wordpress.aztec"
40+
artifactId "glide-loader"
41+
// version is set by 'publish-to-s3' plugin
42+
}
43+
}
44+
}
45+
}
46+
47+
publishToS3Plugin {
48+
mavenPublishGroupId "org.wordpress.aztec"
49+
mavenPublishArtifactId "glide-loader"
50+
}

jitpack.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)