mirror of
https://github.com/valitydev/bouncer-proto.git
synced 2024-11-06 02:45:23 +00:00
TD-222: Update for valitydev/thrift compiler @ 0.14.2.3 (#18)
* With valitydev/rebar3_thrift_compiler @ 0.4 * Reuse common Erlang / Java workflows
This commit is contained in:
parent
633ba73e37
commit
de15d375ee
29
.github/workflows/build.yml
vendored
29
.github/workflows/build.yml
vendored
@ -1,29 +0,0 @@
|
||||
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.5
|
||||
- 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
|
31
.github/workflows/deploy.yml
vendored
31
.github/workflows/deploy.yml
vendored
@ -1,31 +0,0 @@
|
||||
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.5
|
||||
- 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.13
|
||||
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 }}"'
|
47
.github/workflows/erlang-pr.yml
vendored
47
.github/workflows/erlang-pr.yml
vendored
@ -1,34 +1,21 @@
|
||||
name: Erlang
|
||||
name: Erlang CI Checks
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: ['*']
|
||||
push:
|
||||
branches: [master]
|
||||
branches:
|
||||
- 'master'
|
||||
- 'epic/**'
|
||||
pull_request:
|
||||
branches: ['**']
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build and verify
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- uses: valitydev/action-setup-thrift@v0.0.5
|
||||
|
||||
- uses: erlef/setup-beam@v1.10
|
||||
id: beam
|
||||
with:
|
||||
otp-version: '24'
|
||||
rebar3-version: '3.18'
|
||||
|
||||
- name: Restore PLT cache
|
||||
uses: actions/cache@v2
|
||||
id: plt-cache
|
||||
with:
|
||||
key: |
|
||||
${{ runner.os }}-${{ steps.beam.outputs.otp-version }}-plt
|
||||
path: |
|
||||
_build/default/rebar3_*_plt
|
||||
- run: rebar3 compile
|
||||
- run: rebar3 xref
|
||||
- run: rebar3 dialyzer
|
||||
run:
|
||||
name: Run checks
|
||||
uses: valitydev/erlang-workflows/.github/workflows/erlang-simple-build.yml@v1
|
||||
with:
|
||||
otp-version: 24
|
||||
rebar-version: 3.18
|
||||
thrift-version: 0.14.2.3
|
||||
use-thrift: true
|
||||
run-eunit: false
|
||||
run-common-test: false
|
||||
|
17
.github/workflows/java-deploy.yml
vendored
Normal file
17
.github/workflows/java-deploy.yml
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
name: Java deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "master"
|
||||
- "main"
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
uses: valitydev/java-workflow/.github/workflows/maven-thrift-deploy.yml@v1
|
||||
secrets:
|
||||
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 }}
|
||||
mm-webhook-url: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
|
10
.github/workflows/java-pr.yml
vendored
Normal file
10
.github/workflows/java-pr.yml
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
name: Java build
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- "*"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
uses: valitydev/java-workflow/.github/workflows/maven-thrift-build.yml@v1
|
@ -1,5 +1,5 @@
|
||||
namespace java dev.vality.bouncer.base
|
||||
namespace erlang bouncer_base
|
||||
namespace erlang bouncer.base
|
||||
|
||||
typedef i32 Version
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
namespace java dev.vality.bouncer.ctx
|
||||
namespace erlang bctx
|
||||
namespace erlang bouncer.ctx
|
||||
|
||||
enum ContextFragmentType {
|
||||
/**
|
||||
|
@ -3,7 +3,7 @@
|
||||
*/
|
||||
|
||||
namespace java dev.vality.bouncer.context.v1
|
||||
namespace erlang bctx_v1
|
||||
namespace erlang bouncer.ctx.v1
|
||||
|
||||
include "base.thrift"
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
namespace java dev.vality.bouncer.decisions
|
||||
namespace erlang bdcs
|
||||
namespace erlang bouncer.decision
|
||||
|
||||
include "context.thrift"
|
||||
include "restriction.thrift"
|
||||
|
@ -1,5 +1,5 @@
|
||||
namespace java dev.vality.bouncer.rstn
|
||||
namespace erlang brstn
|
||||
namespace erlang bouncer.rstn
|
||||
|
||||
include "base.thrift"
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
%% Common project erlang options.
|
||||
{erl_opts, [
|
||||
|
||||
% mandatory
|
||||
debug_info,
|
||||
warnings_as_errors,
|
||||
@ -49,17 +48,17 @@
|
||||
|
||||
{plugins, [
|
||||
{rebar3_thrift_compiler,
|
||||
{git, "https://github.com/valitydev/rebar3_thrift_compiler.git", {branch, "master"}}}
|
||||
{git, "https://github.com/valitydev/rebar3_thrift_compiler.git", {tag, "0.4"}}}
|
||||
]}.
|
||||
|
||||
{provider_hooks, [
|
||||
{pre, [
|
||||
{compile, {thrift, compile}},
|
||||
{clean , {thrift, clean }}
|
||||
{clean, {thrift, clean}}
|
||||
]}
|
||||
]}.
|
||||
|
||||
{thrift_compiler_opts, [
|
||||
{in_dir, "proto"},
|
||||
{gen, "erlang:scoped_typenames,app_prefix=bouncer"}
|
||||
{gen, "erlang:app_namespaces"}
|
||||
]}.
|
||||
|
Loading…
Reference in New Issue
Block a user