From dd6cc754b9a008206576ed4c9d98b04218f33d4d Mon Sep 17 00:00:00 2001 From: anaithani-pso <77467666+anaithani-pso@users.noreply.github.com> Date: Fri, 22 Jan 2021 13:58:52 -0800 Subject: [PATCH 1/3] Updated pom with GAR Config Note: Current GAR repo(ox-releases/ox-snapshots) is for demo purpose only Added property for GAR URL Added initial version of CB file --- cloudbuild.yaml | 12 ++++ pom.xml | 160 ++++++++++++++++++++++++++---------------------- 2 files changed, 99 insertions(+), 73 deletions(-) create mode 100644 cloudbuild.yaml diff --git a/cloudbuild.yaml b/cloudbuild.yaml new file mode 100644 index 0000000..8e75ce5 --- /dev/null +++ b/cloudbuild.yaml @@ -0,0 +1,12 @@ +steps: + - name: maven:3-jdk-8 + id: package + entrypoint: mvn + args: ['package','-Dmaven.test.skip=true'] + + - name: maven:3-jdk-8 + id: deploy + entrypoint: mvn + args: ['deploy', '-Dmaven.test.skip=true'] + waitFor: + - package diff --git a/pom.xml b/pom.xml index 9aa03e6..09eb374 100644 --- a/pom.xml +++ b/pom.xml @@ -1,78 +1,92 @@ - - 4.0.0 - org.openx.market.ssrtb - pricecrypter - PriceCrypter - 0.0.4 - Can encrypt and decrypt price macros. + + 4.0.0 + org.openx.market.ssrtb + pricecrypter + PriceCrypter + 0.0.4 + Can encrypt and decrypt price macros. - - - artifactory-releases - artifactory-release - https://artifactory.prod.gcp.openx.org/artifactory/libs-release-local - - - artifactory-snapshots - artifactory-snapshots - https://artifactory.prod.gcp.openx.org/artifactory/libs-snapshot-local - - + + scm:git:https://github.com/openx/SSRTBPriceCrypter.git + scm:git:https://github.com/openx/SSRTBPriceCrypter.git + https://github.com/openx/SSRTBPriceCrypter.git + - - scm:git:https://github.com/openx/SSRTBPriceCrypter.git - scm:git:https://github.com/openx/SSRTBPriceCrypter.git - https://github.com/openx/SSRTBPriceCrypter.git - + + artifactregistry://us-central1-maven.pkg.dev/ox-shared-infrastructure-devin + - - - junit - junit - 4.5 - test - - - commons-codec - commons-codec - 1.3 - - + + + junit + junit + 4.5 + test + + + commons-codec + commons-codec + 1.3 + + + + + + + + com.google.cloud.artifactregistry + artifactregistry-maven-wagon + 2.1.0 + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.0.2 + + 1.6 + 1.6 + + + + org.apache.maven.plugins + maven-assembly-plugin + + + jar-with-dependencies + + + + org.openx.market.ssrtb.crypter.Main + + + + + + simple-command + package + + attached + + + + + + + + + + artifact-registry + ${ox.gar.maven.host}/ox-releases + + + artifact-registry + ${ox.gar.maven.host}/ox-snapshots + + - - - - org.apache.maven.plugins - maven-compiler-plugin - 2.0.2 - - 1.5 - 1.5 - - - - org.apache.maven.plugins - maven-assembly-plugin - - - jar-with-dependencies - - - - org.openx.market.ssrtb.crypter.Main - - - - - - simple-command - package - - attached - - - - - - From 19469bb747df96f13cd1c715750da5456dc53ba0 Mon Sep 17 00:00:00 2001 From: anaithani-pso <77467666+anaithani-pso@users.noreply.github.com> Date: Fri, 2 Apr 2021 18:00:40 -0700 Subject: [PATCH 2/3] Update cloudbuild with correct base image Add Makefile. --- .ci/cloudbuild.yaml | 10 ++++++++++ Makefile | 38 ++++++++++++++++++++++++++++++++++++++ cloudbuild.yaml | 12 ------------ 3 files changed, 48 insertions(+), 12 deletions(-) create mode 100644 .ci/cloudbuild.yaml create mode 100644 Makefile delete mode 100644 cloudbuild.yaml diff --git a/.ci/cloudbuild.yaml b/.ci/cloudbuild.yaml new file mode 100644 index 0000000..28e53a6 --- /dev/null +++ b/.ci/cloudbuild.yaml @@ -0,0 +1,10 @@ +--- +timeout: 6000s +steps: + - id: publish + name: us-central1-docker.pkg.dev/ox-registry-devint/container-registry-devint/java-base:latest + args: + - make + - ci_publish + waitFor: + - "-" \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..ede3402 --- /dev/null +++ b/Makefile @@ -0,0 +1,38 @@ +JAR_VERSION := $(shell echo 'cat /*[local-name()="project"]/*[local-name()="version"]/text()' | xmllint --shell pom.xml | grep -v '/') + +.PHONY: compile build test clean release package version + +usage: + @echo "USAGE:" + @echo " make command [options]" + @echo + @echo "COMMANDS:" + @fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed 's/^/ /' | sed -e 's/\\$$/AA/' | sed -e 's/#//g' | column -t -s ":" | sort -k1 + +compile: + mvn compile + +package: + mvn package + +test: + mvn verify + +clean: + mvn clean + +release: + mvn -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true deploy + +version: + @echo $(JAR_VERSION) + +format: ## Format code + mvn com.coveo:fmt-maven-plugin:format + +show-outdated-deps: ## Display which maven dependencies and plugins has newer stable versions + mvn versions:display-dependency-updates + mvn versions:display-plugin-updates + +ci_publish: + mvn deploy \ No newline at end of file diff --git a/cloudbuild.yaml b/cloudbuild.yaml deleted file mode 100644 index 8e75ce5..0000000 --- a/cloudbuild.yaml +++ /dev/null @@ -1,12 +0,0 @@ -steps: - - name: maven:3-jdk-8 - id: package - entrypoint: mvn - args: ['package','-Dmaven.test.skip=true'] - - - name: maven:3-jdk-8 - id: deploy - entrypoint: mvn - args: ['deploy', '-Dmaven.test.skip=true'] - waitFor: - - package From 43ba324f171012a0b9bfb248878152d7897f6054 Mon Sep 17 00:00:00 2001 From: anaithani-pso <77467666+anaithani-pso@users.noreply.github.com> Date: Sun, 4 Apr 2021 21:26:45 -0700 Subject: [PATCH 3/3] update gar location --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 09eb374..2346d24 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ - artifactregistry://us-central1-maven.pkg.dev/ox-shared-infrastructure-devin + artifactregistry://us-central1-maven.pkg.dev/ox-registry-devint