diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..1d20556 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,29 @@ +name: Build Artifact + +on: + pull_request: + branches: + - '*' + +jobs: + build: + runs-on: ubuntu-20.04 + steps: + - name: Install thrift + uses: valitydev/action-setup-thrift@v0.0.1 + - name: Checkout Repo + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Set up Maven + uses: actions/setup-java@v2 + with: + java-version: '15' + distribution: 'adopt' + - name: Retrieve commit info + run: | + echo "::set-output name=COMMIT_NUMBER::$(git rev-list HEAD --count)" + echo "::set-output name=SHA_7::${GITHUB_SHA::7}" + id: commit_info + - name: Build package + run: mvn --batch-mode -Dcommit.number=${{ steps.commit_info.outputs.COMMIT_NUMBER }} -Drevision="1.${{ steps.commit_info.outputs.COMMIT_NUMBER }}-${{ steps.commit_info.outputs.SHA_7 }}" clean compile -f pom.xml \ No newline at end of file diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..b4e16f1 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,31 @@ +name: Deploy Artifact + +on: + push: + branches: + - 'master' + - 'main' + +jobs: + deploy: + runs-on: ubuntu-20.04 + steps: + - name: Install thrift + uses: valitydev/action-setup-thrift@v0.0.1 + - name: Checkout Repo + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Retrieve commit info + run: | + echo "::set-output name=COMMIT_NUMBER::$(git rev-list HEAD --count)" + echo "::set-output name=SHA_7::${GITHUB_SHA::7}" + id: commit_info + - name: Deploy package + uses: valitydev/action-deploy-jdk-package@v1.0.9 + with: + server-username: ${{ secrets.OSSRH_USERNAME }} + server-password: ${{ secrets.OSSRH_TOKEN }} + deploy-secret-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }} + deploy-secret-key-password: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} + maven-args: '-Dcommit.number=${{ steps.commit_info.outputs.COMMIT_NUMBER }} -Drevision="1.${{ steps.commit_info.outputs.COMMIT_NUMBER }}-${{ steps.commit_info.outputs.SHA_7 }}"' diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index ca5a761..0000000 --- a/.gitmodules +++ /dev/null @@ -1,4 +0,0 @@ -[submodule "build_utils"] - path = build_utils - url = git@github.com:rbkmoney/build_utils.git - branch = master diff --git a/Jenkinsfile b/Jenkinsfile deleted file mode 100644 index 1bff2e5..0000000 --- a/Jenkinsfile +++ /dev/null @@ -1,26 +0,0 @@ -#!groovy -// -*- mode: groovy -*- - -build('cds-proto', 'docker-host') { - checkoutRepo() - loadBuildUtils() - - def pipeDefault - def gitUtils - runStage('load pipeline') { - env.JENKINS_LIB = "build_utils/jenkins_lib" - pipeDefault = load("${env.JENKINS_LIB}/pipeDefault.groovy") - pipeJavaProto = load("${env.JENKINS_LIB}/pipeJavaProto.groovy") - gitUtils = load("${env.JENKINS_LIB}/gitUtils.groovy") - } - - pipeDefault() { - - runStage('compile') { - sh "make wc_compile" - } - - env.skipSonar = 'true' - pipeJavaProto() - } -} diff --git a/Makefile b/Makefile deleted file mode 100644 index 38ca53a..0000000 --- a/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -THRIFT = $(or $(shell which thrift), $(error "`thrift' executable missing")) -REBAR = $(shell which rebar3 2>/dev/null || which ./rebar3) -SUBMODULES = build_utils -SUBTARGETS = $(patsubst %,%/.git,$(SUBMODULES)) - -UTILS_PATH := build_utils -TEMPLATES_PATH := . - -# Name of the service -SERVICE_NAME := cds_proto - -# Build image tag to be used -BUILD_IMAGE_TAG := b04c5291d101132e53e578d96e1628d2e6dab0c0 -CALL_ANYWHERE := \ - all submodules compile clean distclean - -CALL_W_CONTAINER := $(CALL_ANYWHERE) - -all: compile - --include $(UTILS_PATH)/make_lib/utils_container.mk - -.PHONY: $(CALL_W_CONTAINER) - -# CALL_ANYWHERE -$(SUBTARGETS): %/.git: % - git submodule update --init $< - touch $@ - -submodules: $(SUBTARGETS) - -compile: - $(REBAR) compile - -clean: - $(REBAR) clean - -distclean: - $(REBAR) clean -a - rm -rfv _build - -include $(UTILS_PATH)/make_lib/java_proto.mk diff --git a/build_utils b/build_utils deleted file mode 160000 index 5cb25f0..0000000 --- a/build_utils +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 5cb25f049c719a608276a99fc4fbe852187019ca diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 7e4d6e8..0000000 --- a/package-lock.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "cds-proto", - "version": "1.0.0", - "lockfileVersion": 1 -} diff --git a/package.json b/package.json deleted file mode 100644 index 9ede054..0000000 --- a/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "cds-proto", - "version": "1.0.0", - "description": "CDS service thrift protocol.", - "author": "rbk.money", - "private": true, - "license": "UNLICENSED", - "homepage": "https://github.com/rbkmoney/cds-proto#readme" -} diff --git a/pom.xml b/pom.xml index e140539..7b2b788 100644 --- a/pom.xml +++ b/pom.xml @@ -5,44 +5,36 @@ 4.0.0 - com.rbkmoney - parent - 1.0.5 + dev.vality + library-parent-pom + 1.0.0 - com.rbkmoney cds-proto - SNAPSHOT + ${revision} jar CDS Generates jar artifact containing compiled thrift classes based on generated thrift IDL files - https://github.com/rbkmoney/cds-proto.git - - - - RBK.money - https://rbk.money - - - - - scm:git:git://github.com/rbkmoney/cds-proto.git - scm:git:ssh://github.com/rbkmoney/cds-proto.git - https://github.com/rbkmoney/cds-proto/tree/master - + https://github.com/valitydev/cds-proto.git UTF-8 + SNAPSHOT - com.rbkmoney.woody + dev.vality.woody woody-thrift - [1.1.21,) + 1.0.0 provided + + javax.annotation + javax.annotation-api + 1.3.2 + @@ -71,7 +63,7 @@ org.apache.maven.plugins maven-shade-plugin - 3.0.0 + 3.2.4 package @@ -81,8 +73,8 @@ - com.rbkmoney.damsel - com.rbkmoney.damsel.v${commit.number} + dev.vality.damsel + dev.vality.damsel.v${commit.number} true diff --git a/proto/base.thrift b/proto/base.thrift index bb9b81f..b7219de 100644 --- a/proto/base.thrift +++ b/proto/base.thrift @@ -1,5 +1,5 @@ -namespace java com.rbkmoney.cds.base +namespace java dev.vality.cds.base namespace erlang cds typedef string Token diff --git a/proto/keyring.thrift b/proto/keyring.thrift index 241ed7d..834f441 100644 --- a/proto/keyring.thrift +++ b/proto/keyring.thrift @@ -1,4 +1,4 @@ -namespace java com.rbkmoney.cds.keyring +namespace java dev.vality.cds.keyring namespace erlang cds typedef string ShareholderId; diff --git a/proto/storage.thrift b/proto/storage.thrift index 2725fbb..0bf937b 100644 --- a/proto/storage.thrift +++ b/proto/storage.thrift @@ -1,6 +1,6 @@ include "base.thrift" -namespace java com.rbkmoney.cds.storage +namespace java dev.vality.cds.storage namespace erlang cds /** Дата экспирации */ diff --git a/rebar.config b/rebar.config index 561e215..b86c24a 100644 --- a/rebar.config +++ b/rebar.config @@ -52,7 +52,7 @@ {plugins, [ {rebar3_thrift_compiler, - {git, "https://github.com/rbkmoney/rebar3_thrift_compiler.git", {tag, "0.3.0"}}} + {git, "https://github.com/valitydev/rebar3_thrift_compiler.git", {tag, "0.3.0"}}} ]}. {provider_hooks, [