forked from aws/s2n-tls
-
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.
attempt at rust util; ended up doing bash
- Loading branch information
Showing
3 changed files
with
61 additions
and
0 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,11 @@ | ||
[package] | ||
name = "utils" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
[dependencies] | ||
aws-config = "1.5.16" | ||
aws-sdk-codebuild = "1.75.0" | ||
aws-sdk-dynamodb = "1.65.0" | ||
rust-analyzer = "0.0.1" | ||
tokio = { version = "1", features = ["full"] } |
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,22 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# | ||
|
||
set -eu | ||
BUILDS=( | ||
"AddressSanitizer" | ||
"S2nIntegrationV2SmallBatch" | ||
"Valgrind" | ||
"s2nFuzzBatch" | ||
"s2nGeneralBatch" | ||
"kTLS" | ||
"Openssl3fipsWIP" | ||
) | ||
buildspec() { | ||
aws codebuild batch-get-projects --name $1 | jq '.projects[].source.buildspec' | ||
} | ||
|
||
for each in ${BUILDS[@]}; do | ||
echo -e "$each\t" | ||
buildspec $each | ||
done; |
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,28 @@ | ||
use aws_config::meta::region::RegionProviderChain; | ||
use aws_config::BehaviorVersion; | ||
use aws_sdk_codebuild::{Client, Error}; | ||
use tokio::{io::AsyncWriteExt, net::TcpStream}; | ||
|
||
#[tokio::main] | ||
async fn main() -> Result<(), Error> { | ||
let region_provider = RegionProviderChain::default_provider().or_else("us-west-2"); | ||
let config = aws_config::defaults(BehaviorVersion::latest()) | ||
.region(region_provider) | ||
.load() | ||
.await; | ||
let client = Client::new(&config); | ||
|
||
let resp = client.batch_get_projects().set_names("s2nGeneralBatch").send().await?; | ||
println!("Buildspecs:"); | ||
|
||
let names = resp.projects(); | ||
|
||
for name in names { | ||
println!(" {:?}", name.source()); | ||
} | ||
|
||
println!(); | ||
println!("Found {} tables", names.len()); | ||
|
||
Ok(()) | ||
} |