Skip to content
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

mrt-core2 support CodeArtifact #48

Merged
merged 27 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ target
.project
.classpath
*/.gitignore
reflect/pom.xml.releaseBackup
pom.xml.releaseBackup
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"java.configuration.updateBuildConfiguration": "automatic"
}
24 changes: 24 additions & 0 deletions buildspec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
version: 0.2

# Pre-requisites
# - Create CodeBuild project
# - Provide minimal github credentials to access public repo

phases:
pre_build:
on-failure: ABORT
commands:
- cp settings.xml ~/.m2/
- export CODEARTIFACT_AUTH_TOKEN=`aws codeartifact get-authorization-token --domain cdlib-uc3-mrt --domain-owner $AWS_ACCOUNT_ID --region $AWS_REGION --query authorizationToken --output text`
- aws ecr get-login-password --region $AWS_REGION | docker login --username AWS --password-stdin ${ECR_REGISTRY}

build:
on-failure: ABORT
commands:
- mvn -ntp -Pparent clean deploy
- mvn clean deploy -f reflect/pom.xml
- mvn -ntp clean install
- mvn deploy:deploy-file -Durl=${CODEARTIFACT_URL} -DrepositoryId=cdlib-uc3-mrt-uc3-mrt-java -Dfile=$(ls core/target/mrt-core-*.jar)
post_build:
commands:
#- aws s3 rm s3://${S3CFBUCKET}/api --recursive
12 changes: 0 additions & 12 deletions core-util-init/build.properties

This file was deleted.

15 changes: 0 additions & 15 deletions core-util-init/build.xml

This file was deleted.

35 changes: 0 additions & 35 deletions core-util-init/pom.xml

This file was deleted.

64 changes: 58 additions & 6 deletions core/pom.xml
Original file line number Diff line number Diff line change
@@ -1,19 +1,29 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.cdlib.mrt</groupId>
<artifactId>mrt-core</artifactId>
<packaging>jar</packaging>
<version>2.0-SNAPSHOT</version>
<version>3.0-SNAPSHOT</version>
<name>UC3-mrtcore</name>
<url>http://uc3.cdlib.org</url>

<properties>
<merritt-bom.version>3.0-SNAPSHOT</merritt-bom.version>
</properties>

<distributionManagement>
<repository>
<id>cdlib-uc3-mrt-uc3-mrt-java</id>
<name>cdlib-uc3-mrt-uc3-mrt-java</name>
<url>https://cdlib-uc3-mrt-${env.AWS_ACCOUNT_ID}.d.codeartifact.us-west-2.amazonaws.com/maven/uc3-mrt-java/</url>
</repository>
</distributionManagement>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.cdlib.mrt</groupId>
<artifactId>mrt-reflectoring-bom</artifactId>
<version>1.0.0</version>
<version>${merritt-bom.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand All @@ -23,10 +33,10 @@
<parent>
<groupId>org.cdlib.mrt</groupId>
<artifactId>mrt-parent-properties</artifactId>
<version>1.0.0</version>
<!--This version cannot be set as a property-->
<version>PAR-3.0-SNAPSHOT</version>
</parent>


<build>
<plugins>
<plugin>
Expand Down Expand Up @@ -133,6 +143,48 @@
<artifactId>xml-apis</artifactId>
<scope>runtime</scope>
</dependency>

<dependency>
<groupId>co.elastic.logging</groupId>
<artifactId>ecs-logging-core</artifactId>
<scope>runtime</scope>
</dependency>

<dependency>
<groupId>co.elastic.logging</groupId>
<artifactId>log4j2-ecs-layout</artifactId>
<scope>runtime</scope>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>

<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
</dependency>

<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
</dependency>

<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-ssm</artifactId>
</dependency>

<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
</dependency>

<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</dependency>
</dependencies>

</project>
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import org.junit.Test;

import java.util.Enumeration;
import java.util.TimeZone;
import java.io.File;
import java.io.FileInputStream;
import static org.junit.Assert.*;
Expand Down Expand Up @@ -64,6 +65,7 @@ public ManifestRowBatchTest() {

@BeforeClass
public static void setUpClass() throws Exception {
TimeZone.setDefault(TimeZone.getTimeZone("America/Los_Angeles"));
}

@AfterClass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import org.junit.Test;

import java.util.Enumeration;
import java.util.TimeZone;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
Expand Down Expand Up @@ -96,6 +97,7 @@ public ManifestRowSemanticTest() {

@BeforeClass
public static void setUpClass() throws Exception {
TimeZone.setDefault(TimeZone.getTimeZone("America/Los_Angeles"));
}

@AfterClass
Expand Down
Loading