Skip to content

chore: add codebuild release #232

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 34 commits into from
Jun 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
38001cb
chore: Upgrade MPL
lavaleri Jun 8, 2023
2a6fe1a
Merge branch 'main' of github.com:aws/aws-database-encryption-sdk-dyn…
lavaleri Jun 8, 2023
9a3418a
update
lavaleri Jun 8, 2023
761f410
nit
lavaleri Jun 8, 2023
86b78ba
update cfn
josecorella Jun 6, 2023
d1e1487
fix typo
josecorella Jun 6, 2023
c284d8c
chore: update mpl dependency
josecorella Jun 7, 2023
3fe0980
add pre-build commands
josecorella Jun 7, 2023
00a6fc6
cb submodules must be https
josecorella Jun 7, 2023
c8620cd
test
josecorella Jun 7, 2023
e9dbc59
update build
josecorella Jun 7, 2023
d45591d
test
josecorella Jun 7, 2023
0d18f25
cd into right directory
josecorella Jun 7, 2023
07c20df
cd into right directory
josecorella Jun 8, 2023
c860ca7
update submodule
josecorella Jun 8, 2023
cabdaa2
work
josecorella Jun 8, 2023
d4da50b
build tv
josecorella Jun 8, 2023
6297867
deploy tv and dbesdk locally
josecorella Jun 8, 2023
c40eae4
deploy to CA
josecorella Jun 8, 2023
2e243e1
validate staging
josecorella Jun 8, 2023
8e14437
run just validation
josecorella Jun 8, 2023
db5031f
add release prod
josecorella Jun 8, 2023
597f1b6
update gha
josecorella Jun 8, 2023
6f2f107
update cb
josecorella Jun 8, 2023
e447ec3
comment out
josecorella Jun 8, 2023
4cecd40
add docker
josecorella Jun 8, 2023
5d51140
start docker daemon
josecorella Jun 8, 2023
64668d2
update cfn
josecorella Jun 8, 2023
36921af
more test
josecorella Jun 8, 2023
9bf5236
update
josecorella Jun 9, 2023
838a798
update release staging
josecorella Jun 9, 2023
704d2ed
fix
josecorella Jun 9, 2023
07d8128
uncomment
josecorella Jun 9, 2023
895bb94
address pr feedback
josecorella Jun 9, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 2 additions & 13 deletions .github/workflows/ci_examples_java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ jobs:
macos-latest
]
runs-on: ${{ matrix.os }}
environment: "MPL CI"
permissions:
id-token: write
contents: read
Expand All @@ -51,18 +50,8 @@ jobs:
role-session-name: DDBEC-Dafny-Java-Tests

- uses: actions/checkout@v3

- name: Init Submodules
env:
# This secret is in the configured environment
# Token created on # 05/12/2023
# expires in ~30 days 05/22/2023
MPL_PAT: ${{ secrets.MPL_PAT }}
run: |
AUTH="$(echo -n "pat:${MPL_PAT}" | base64 | tr -d '\n')"
git config --global http.https://github.com/.extraheader "AUTHORIZATION: basic $AUTH"
git config --global --add url.https://github.com/.insteadOf [email protected]:
git submodule update --init --recursive submodules/MaterialProviders
with:
submodules: recursive

- name: Setup Java ${{ matrix.java-version }}
uses: actions/setup-java@v3
Expand Down
19 changes: 6 additions & 13 deletions .github/workflows/ci_test_java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ jobs:
macos-latest
]
runs-on: ${{ matrix.os }}
environment: "MPL CI"
permissions:
id-token: write
contents: read
Expand All @@ -53,18 +52,8 @@ jobs:
role-session-name: DDBEC-Dafny-Java-Tests

- uses: actions/checkout@v3

- name: Init Submodules
env:
# This secret is in the configured environment
# Token created on # 05/12/2023
# expires in ~30 days 05/22/2023
MPL_PAT: ${{ secrets.MPL_PAT }}
run: |
AUTH="$(echo -n "pat:${MPL_PAT}" | base64 | tr -d '\n')"
git config --global http.https://github.com/.extraheader "AUTHORIZATION: basic $AUTH"
git config --global --add url.https://github.com/.insteadOf [email protected]:
git submodule update --init --recursive submodules/MaterialProviders
with:
submodules: recursive

- name: Setup Dafny
uses: dafny-lang/[email protected]
Expand All @@ -89,4 +78,8 @@ jobs:
- name: Test ${{ matrix.library }}
working-directory: ./${{ matrix.library }}
run: |
# Clear MPL from cache
# We have to do this because MakeFile does not do this yet. The MakeFile automatically builds and deploys dependencies
# instead it should be picking it up from Maven.
rm -rf ~/.m2/repository/software/amazon/cryptography/aws-cryptographic-material-providers
make test_java
15 changes: 2 additions & 13 deletions .github/workflows/ci_test_net.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ jobs:
macos-latest,
]
runs-on: ${{ matrix.os }}
environment: "MPL CI"
permissions:
id-token: write
contents: read
Expand All @@ -49,18 +48,8 @@ jobs:
DOTNET_NOLOGO: 1
steps:
- uses: actions/checkout@v3

- name: Init Submodules
env:
# This secret is in the configured environment
# Token created on # 05/12/2023
# expires in ~30 days 05/22/2023
MPL_PAT: ${{ secrets.MPL_PAT }}
run: |
AUTH="$(echo -n "pat:${MPL_PAT}" | base64 | tr -d '\n')"
git config --global http.https://github.com/.extraheader "AUTHORIZATION: basic $AUTH"
git config --global --add url.https://github.com/.insteadOf [email protected]:
git submodule update --init --recursive submodules/MaterialProviders
with:
submodules: recursive

- name: Setup .NET Core SDK ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@v3
Expand Down
18 changes: 6 additions & 12 deletions .github/workflows/ci_test_vector_java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
ubuntu-latest
]
runs-on: ${{ matrix.os }}
environment: "MPL CI"
permissions:
id-token: write
contents: read
Expand All @@ -36,17 +35,8 @@ jobs:
role-session-name: DDBEC-Dafny-Java-Tests

- uses: actions/checkout@v3

- name: Init Submodules
env:
# This secret is in the configured environment,
# and set to expire every 30 days
MPL_PAT: ${{ secrets.MPL_PAT }}
run: |
AUTH="$(echo -n "pat:${MPL_PAT}" | base64 | tr -d '\n')"
git config --global http.https://github.com/.extraheader "AUTHORIZATION: basic $AUTH"
git config --global --add url.https://github.com/.insteadOf [email protected]:
git submodule update --init --recursive submodules/MaterialProviders
with:
submodules: recursive

- name: Setup Dafny
uses: dafny-lang/[email protected]
Expand All @@ -70,4 +60,8 @@ jobs:
- name: Test TestVectors
working-directory: ./TestVectors
run: |
# Clear MPL from cache
# We have to do this because MakeFile does not do this yet. The MakeFile automatically builds and deploys dependencies
# instead it should be picking it up from Maven.
rm -rf ~/.m2/repository/software/amazon/cryptography/aws-cryptographic-material-providers
make test_java
15 changes: 2 additions & 13 deletions .github/workflows/ci_verification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,11 @@ jobs:
macos-latest,
]
runs-on: ${{ matrix.os }}
environment: "MPL CI"
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Init Submodules
env:
# This secret is in the configured environment
# Token created on # 05/12/2023
# expires in ~30 days 05/22/2023
MPL_PAT: ${{ secrets.MPL_PAT }}
run: |
AUTH="$(echo -n "pat:${MPL_PAT}" | base64 | tr -d '\n')"
git config --global http.https://github.com/.extraheader "AUTHORIZATION: basic $AUTH"
git config --global --add url.https://github.com/.insteadOf [email protected]:
git submodule update --init --recursive submodules/MaterialProviders

- name: Setup Dafny
uses: dafny-lang/[email protected]
with:
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
url = https://github.com/aws/aws-cryptographic-material-providers-library-java.git
[submodule "submodules/smithy-dafny"]
path = submodules/smithy-dafny
url = git@github.com:awslabs/smithy-dafny.git
url = https://github.com/awslabs/smithy-dafny.git
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changelog

## 3.0.0-preview-1 2023-06-08

### Features
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### Features
### Developer Preview

- Initial release of the AWS Database Encryption SDK.
This release is considered a [developer preview](https://docs.aws.amazon.com/sdkref/latest/guide/maint-policy.html#version-life-cycle)
and is not intended for production use cases.
84 changes: 81 additions & 3 deletions DynamoDbEncryption/runtimes/java/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ plugins {
`java`
`java-library`
`maven-publish`
`signing`
id("io.github.gradle-nexus.publish-plugin") version "1.3.0"
}

group = "software.amazon.cryptography"
version = "1.0-SNAPSHOT"
version = "3.0.0-preview-1"
description = "Aws Database Encryption Sdk for DynamoDb Java"

java {
Expand Down Expand Up @@ -68,7 +70,7 @@ val dynamodb by configurations.creating
dependencies {
implementation("org.dafny:DafnyRuntime:4.1.0")
implementation("software.amazon.smithy.dafny:conversion:0.1")
implementation("software.amazon.cryptography:AwsCryptographicMaterialProviders:1.0-SNAPSHOT")
implementation("software.amazon.cryptography:aws-cryptographic-material-providers:1.0.0-preview-1")

implementation(platform("software.amazon.awssdk:bom:2.19.1"))
implementation("software.amazon.awssdk:dynamodb")
Expand Down Expand Up @@ -107,12 +109,55 @@ dependencies {
}

publishing {
publications.create<MavenPublication>("mavenLocal") {
groupId = "software.amazon.cryptography"
artifactId = "aws-database-encryption-sdk-dynamodb"
from(components["java"])
}

publications.create<MavenPublication>("maven") {
groupId = "software.amazon.cryptography"
artifactId = "aws-database-encryption-sdk-dynamodb"
from(components["java"])

// Include extra information in the POMs.
afterEvaluate {
pom {
name.set("AWS Database Encryption SDK for DynamoDB")
description.set("AWS Database Encryption SDK for DynamoDB in Java")
url.set("https://github.com/aws/aws-database-encryption-sdk-dynamodb-java")
licenses {
license {
name.set("Apache License 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
distribution.set("repo")
}
}
developers {
developer {
id.set("amazonwebservices")
organization.set("Amazon Web Services")
organizationUrl.set("https://aws.amazon.com")
roles.add("developer")
}
}
scm {
url.set("https://github.com/aws/aws-database-encryption-sdk-dynamodb-java.git")
}
}
}
}
repositories {
mavenLocal()
maven {
name = "StagingCodeArtifact"
url = URI.create("https://crypto-tools-internal-587316601012.d.codeartifact.us-east-1.amazonaws.com/maven/java-dbesdk-ddb-staging/")
credentials {
username = "aws"
password = System.getenv("CODEARTIFACT_TOKEN")
}
}
}
repositories { mavenLocal() }
}

tasks.withType<JavaCompile>() {
Expand Down Expand Up @@ -185,3 +230,36 @@ tasks.javadoc {
}
exclude("src/main/dafny-generated")
}

nexusPublishing {
// We are using the nexusPublishing plugin since it is recommended by Sonatype Gradle Project configurations
// and it is easy to supply the creds we need to deploy
// https://github.com/gradle-nexus/publish-plugin/
repositories {
sonatype {
nexusUrl.set(uri("https://aws.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://aws.oss.sonatype.org/content/repositories/snapshots/"))
username.set(System.getenv("SONA_USERNAME"))
password.set(System.getenv("SONA_PASSWORD"))
}
}
}

signing {
useGpgCmd()

// Dynamically set these properties
project.ext.set("signing.gnupg.executable", "gpg")
project.ext.set("signing.gnupg.useLegacyGpg" , "true")
project.ext.set("signing.gnupg.homeDir", System.getenv("HOME") + "/.gnupg/")
project.ext.set("signing.gnupg.optionsFile", System.getenv("HOME") + "/.gnupg/gpg.conf")
project.ext.set("signing.gnupg.keyName", System.getenv("GPG_KEY"))
project.ext.set("signing.gnupg.passphrase", System.getenv("GPG_PASS"))

// Signing is required if building a release version and if we're going to publish it.
// Otherwise if doing a maven publication we will sign
setRequired({
gradle.getTaskGraph().hasTask("publish")
})
sign(publishing.publications["maven"])
}
8 changes: 4 additions & 4 deletions Examples/runtimes/java/DynamoDbEncryption/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ java {

var caUrl: URI? = null
@Nullable
val caUrlStr: String? = System.getenv("CODEARTIFACT_URL_JAVA_CONVERSION")
val caUrlStr: String? = System.getenv("CODEARTIFACT_REPO_URL")
if (!caUrlStr.isNullOrBlank()) {
caUrl = URI.create(caUrlStr)
}

var caPassword: String? = null
@Nullable
val caPasswordString: String? = System.getenv("CODEARTIFACT_AUTH_TOKEN")
val caPasswordString: String? = System.getenv("CODEARTIFACT_TOKEN")
if (!caPasswordString.isNullOrBlank()) {
caPassword = caPasswordString
}
Expand All @@ -56,8 +56,8 @@ repositories {
}

dependencies {
implementation("software.amazon.cryptography:aws-database-encryption-sdk-dynamodb:1.0-SNAPSHOT")
implementation("software.amazon.cryptography:AwsCryptographicMaterialProviders:1.0-SNAPSHOT")
implementation("software.amazon.cryptography:aws-database-encryption-sdk-dynamodb:3.0.0-preview-1")
implementation("software.amazon.cryptography:aws-cryptographic-material-providers:1.0.0-preview-1")

implementation(platform("software.amazon.awssdk:bom:2.19.1"))
implementation("software.amazon.awssdk:arns")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ java {

var caUrl: URI? = null
@Nullable
val caUrlStr: String? = System.getenv("CODEARTIFACT_URL_JAVA_CONVERSION")
val caUrlStr: String? = System.getenv("CODEARTIFACT_REPO_URL")
if (!caUrlStr.isNullOrBlank()) {
caUrl = URI.create(caUrlStr)
}

var caPassword: String? = null
@Nullable
val caPasswordString: String? = System.getenv("CODEARTIFACT_AUTH_TOKEN")
val caPasswordString: String? = System.getenv("CODEARTIFACT_TOKEN")
if (!caPasswordString.isNullOrBlank()) {
caPassword = caPasswordString
}
Expand All @@ -56,8 +56,8 @@ repositories {
}

dependencies {
implementation("software.amazon.cryptography:aws-database-encryption-sdk-dynamodb:1.0-SNAPSHOT")
implementation("software.amazon.cryptography:AwsCryptographicMaterialProviders:1.0-SNAPSHOT")
implementation("software.amazon.cryptography:aws-database-encryption-sdk-dynamodb:3.0.0-preview-1")
implementation("software.amazon.cryptography:aws-cryptographic-material-providers:1.0.0-preview-1")

implementation(platform("software.amazon.awssdk:bom:2.19.1"))
implementation("software.amazon.awssdk:dynamodb")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ java {

var caUrl: URI? = null
@Nullable
val caUrlStr: String? = System.getenv("CODEARTIFACT_URL_JAVA_CONVERSION")
val caUrlStr: String? = System.getenv("CODEARTIFACT_REPO_URL")
if (!caUrlStr.isNullOrBlank()) {
caUrl = URI.create(caUrlStr)
}

var caPassword: String? = null
@Nullable
val caPasswordString: String? = System.getenv("CODEARTIFACT_AUTH_TOKEN")
val caPasswordString: String? = System.getenv("CODEARTIFACT_TOKEN")
if (!caPasswordString.isNullOrBlank()) {
caPassword = caPasswordString
}
Expand All @@ -56,8 +56,8 @@ repositories {
}

dependencies {
implementation("software.amazon.cryptography:aws-database-encryption-sdk-dynamodb:1.0-SNAPSHOT")
implementation("software.amazon.cryptography:AwsCryptographicMaterialProviders:1.0-SNAPSHOT")
implementation("software.amazon.cryptography:aws-database-encryption-sdk-dynamodb:3.0.0-preview-1")
implementation("software.amazon.cryptography:aws-cryptographic-material-providers:1.0.0-preview-1")

implementation(platform("software.amazon.awssdk:bom:2.19.1"))
implementation("software.amazon.awssdk:dynamodb")
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# AWS Database Encryption SDK for DynamoDB in Java

Note: The AWS Cryptographic Material Providers Library is released as a
[developer preview](https://docs.aws.amazon.com/sdkref/latest/guide/maint-policy.html#version-life-cycle)
and is subject to change.
The current release is not intended to be used in production environments.

The AWS Database Encryption SDK (DB-ESDK) for DynamoDB in Java is a client-side encryption
library that allows you to perform attribute-level encryption, enabling you to encrypt specific
attribute values within items before storing them in your DynamoDB table. All encryption and
Expand Down
6 changes: 3 additions & 3 deletions SUPPORT_POLICY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ This table describes the current support status of each major version of the AWS
- Current status
- Next status
- Next status date
* - 3.x
- General Availability
* - 3.0.0-preview-1
- Developer Preview
-
-

.. _AWS SDKs and Tools Maintenance Policy: https://docs.aws.amazon.com/sdkref/latest/guide/maint-policy.html#version-life-cycle
.. _AWS SDKs and Tools Maintenance Policy: https://docs.aws.amazon.com/sdkref/latest/guide/maint-policy.html#version-life-cycle
Loading