forked from wordpress-mobile/WordPress-FluxC-Android
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request wordpress-mobile#2083 from wordpress-mobile/publis…
…h-to-s3 Publish to s3
- Loading branch information
Showing
11 changed files
with
217 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
common-params: | ||
&publish-android-artifacts-docker-container | ||
docker#v3.8.0: | ||
image: "public.ecr.aws/automattic/android-build-image:v1.1.0" | ||
propagate-environment: true | ||
environment: | ||
# DO NOT MANUALLY SET THESE VALUES! | ||
# They are passed from the Buildkite agent to the Docker container | ||
- "AWS_ACCESS_KEY" | ||
- "AWS_SECRET_KEY" | ||
|
||
steps: | ||
- label: "Publish :fluxc-annotations" | ||
key: "publish-fluxc-annotations" | ||
plugins: | ||
- *publish-android-artifacts-docker-container | ||
command: | | ||
.buildkite/publish-fluxc-annotations.sh | ||
- label: "Publish :fluxc-processor" | ||
key: "publish-fluxc-processor" | ||
depends_on: | ||
- "publish-fluxc-annotations" | ||
plugins: | ||
- *publish-android-artifacts-docker-container | ||
command: | | ||
.buildkite/publish-fluxc-processor.sh | ||
- label: "Publish :fluxc" | ||
key: "publish-fluxc" | ||
depends_on: | ||
- "publish-fluxc-processor" | ||
- "publish-fluxc-annotations" | ||
plugins: | ||
- *publish-android-artifacts-docker-container | ||
command: | | ||
.buildkite/publish-fluxc.sh | ||
- label: "Publish :plugins:woocommerce" | ||
key: "publish-plugins-woocommerce" | ||
depends_on: | ||
- "publish-fluxc-processor" | ||
- "publish-fluxc-annotations" | ||
- "publish-fluxc" | ||
plugins: | ||
- *publish-android-artifacts-docker-container | ||
command: | | ||
.buildkite/publish-plugins-woocommerce.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
./gradlew \ | ||
:fluxc-annotations:prepareToPublishToS3 $(prepare_to_publish_to_s3_params) \ | ||
:fluxc-annotations:publish | ||
|
||
# Add meta-data for the published version so we can use it in subsequent steps | ||
cat ./fluxc-annotations/build/published-version.txt | buildkite-agent meta-data set "PUBLISHED_FLUXC_ANNOTATIONS_VERSION" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
# Retrieve data from previous steps | ||
PUBLISHED_FLUXC_ANNOTATIONS_VERSION=$(buildkite-agent meta-data get "PUBLISHED_FLUXC_ANNOTATIONS_VERSION") | ||
|
||
./gradlew \ | ||
-PfluxcAnnotationsVersion="$PUBLISHED_FLUXC_ANNOTATIONS_VERSION" \ | ||
:fluxc-processor:prepareToPublishToS3 $(prepare_to_publish_to_s3_params) \ | ||
:fluxc-processor:publish | ||
|
||
# Add meta-data for the published version so we can use it in subsequent steps | ||
cat ./fluxc-processor/build/published-version.txt | buildkite-agent meta-data set "PUBLISHED_FLUXC_PROCESSOR_VERSION" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
# Retrieve data from previous steps | ||
PUBLISHED_FLUXC_ANNOTATIONS_VERSION=$(buildkite-agent meta-data get "PUBLISHED_FLUXC_ANNOTATIONS_VERSION") | ||
PUBLISHED_FLUXC_PROCESSOR_VERSION=$(buildkite-agent meta-data get "PUBLISHED_FLUXC_PROCESSOR_VERSION") | ||
|
||
cp gradle.properties-example gradle.properties | ||
./gradlew \ | ||
-PfluxcAnnotationsVersion="$PUBLISHED_FLUXC_ANNOTATIONS_VERSION" \ | ||
-PfluxcProcessorVersion="$PUBLISHED_FLUXC_PROCESSOR_VERSION" \ | ||
:fluxc:prepareToPublishToS3 $(prepare_to_publish_to_s3_params) \ | ||
:fluxc:publish | ||
|
||
# Add meta-data for the published version so we can use it in subsequent steps | ||
cat ./fluxc/build/published-version.txt | buildkite-agent meta-data set "PUBLISHED_FLUXC_VERSION" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
# Retrieve data from previous steps | ||
PUBLISHED_FLUXC_ANNOTATIONS_VERSION=$(buildkite-agent meta-data get "PUBLISHED_FLUXC_ANNOTATIONS_VERSION") | ||
PUBLISHED_FLUXC_PROCESSOR_VERSION=$(buildkite-agent meta-data get "PUBLISHED_FLUXC_PROCESSOR_VERSION") | ||
PUBLISHED_FLUXC_VERSION=$(buildkite-agent meta-data get "PUBLISHED_FLUXC_VERSION") | ||
|
||
cp gradle.properties-example gradle.properties | ||
./gradlew \ | ||
-PfluxcAnnotationsVersion="$PUBLISHED_FLUXC_ANNOTATIONS_VERSION" \ | ||
-PfluxcProcessorVersion="$PUBLISHED_FLUXC_PROCESSOR_VERSION" \ | ||
-PfluxcVersion="$PUBLISHED_FLUXC_VERSION" \ | ||
:plugins:woocommerce:prepareToPublishToS3 $(prepare_to_publish_to_s3_params) \ | ||
:plugins:woocommerce:publish |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,26 @@ | ||
apply plugin: 'maven' | ||
apply plugin: 'java' | ||
plugins { | ||
id "java" | ||
id "com.automattic.android.publish-to-s3" | ||
} | ||
|
||
sourceCompatibility = JavaVersion.VERSION_1_7 | ||
targetCompatibility = JavaVersion.VERSION_1_7 | ||
|
||
project.afterEvaluate { | ||
publishing { | ||
publications { | ||
FluxCAnnotationsPublication(MavenPublication) { | ||
from components.java | ||
|
||
groupId "org.wordpress.fluxc" | ||
artifactId "fluxc-annotations" | ||
// version is set by 'publish-to-s3' plugin | ||
} | ||
} | ||
} | ||
} | ||
|
||
publishToS3Plugin { | ||
mavenPublishGroupId "org.wordpress.fluxc" | ||
mavenPublishArtifactId "fluxc-annotations" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,35 @@ | ||
plugins { | ||
id "java" | ||
id "maven" | ||
id "org.jetbrains.kotlin.jvm" | ||
id "org.jetbrains.kotlin.kapt" | ||
id "com.automattic.android.publish-to-s3" | ||
} | ||
|
||
sourceCompatibility = JavaVersion.VERSION_1_7 | ||
targetCompatibility = JavaVersion.VERSION_1_7 | ||
|
||
dependencies { | ||
implementation project (':fluxc-annotations') | ||
implementation fluxcAnnotationsProjectDependency | ||
implementation 'com.google.auto.service:auto-service:1.0-rc4' | ||
kapt 'com.google.auto.service:auto-service:1.0-rc4' | ||
implementation 'com.squareup:javapoet:1.7.0' | ||
} | ||
|
||
project.afterEvaluate { | ||
publishing { | ||
publications { | ||
FluxCProcessorPublication(MavenPublication) { | ||
from components.java | ||
|
||
groupId "org.wordpress.fluxc" | ||
artifactId "fluxc-processor" | ||
// version is set by 'publish-to-s3' plugin | ||
} | ||
} | ||
} | ||
} | ||
|
||
publishToS3Plugin { | ||
mavenPublishGroupId "org.wordpress.fluxc" | ||
mavenPublishArtifactId "fluxc-processor" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters