add actions

This commit is contained in:
ggmaleva 2021-12-30 13:06:28 +03:00
parent c07fa329d9
commit ac47daf2d2
6 changed files with 74 additions and 22 deletions

26
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,26 @@
name: Build Artifact
on:
pull_request:
branches:
- '*'
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Checkout GitHub Action Repo
uses: actions/checkout@v2
with:
repository: valitydev/action-jdk-build
ref: v1.0.17
path: .github/actions/action-jdk-build
- name: Run Build Java
uses: ./.github/actions/action-jdk-build
with:
github-pat: '${{ secrets.GH_PACKAGES_RO_PAT }}'
github-user: 'strug'

46
.github/workflows/deploy.yml vendored Normal file
View File

@ -0,0 +1,46 @@
name: Deploy Docker Image
on:
push:
branches:
- 'master'
- 'main'
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-deploy:
runs-on: ubuntu-20.04
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Checkout GitHub Action JDK Build Repo
uses: actions/checkout@v2
with:
repository: valitydev/action-jdk-build
ref: v1.0.17
path: .github/actions/action-jdk-build
- name: Checkout GitHub Action Deploy Docker Repo
uses: actions/checkout@v2
with:
repository: valitydev/action-deploy-docker
ref: v1.0.13
path: .github/actions/action-deploy-docker
- name: Run Build Java
uses: ./.github/actions/action-jdk-build
with:
github-pat: '${{ secrets.GH_PACKAGES_RO_PAT }}'
github-user: 'strug'
- name: Deploy image
uses: ./.github/actions/action-deploy-docker
with:
registry-username: ${{ github.actor }}
registry-access-token: ${{ secrets.GITHUB_TOKEN }}
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}

4
.gitmodules vendored
View File

@ -1,4 +0,0 @@
[submodule "build_utils"]
path = build_utils
url = git@github.com:rbkmoney/build_utils.git
branch = master

15
Jenkinsfile vendored
View File

@ -1,15 +0,0 @@
#!groovy
build('fraudbusters-management', 'java-maven') {
checkoutRepo()
loadBuildUtils()
def javaServicePipeline
runStage('load JavaService pipeline') {
javaServicePipeline = load("build_utils/jenkins_lib/pipeJavaServiceInsideDocker.groovy")
}
def serviceName = env.REPO_NAME
def mvnArgs = '-DjvmArgs="-Xmx256m"'
javaServicePipeline(serviceName, mvnArgs)
}

@ -1 +0,0 @@
Subproject commit be44d69fc87b22a0bb82d98d6eae7658d1647f98

View File

@ -4,9 +4,9 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.rbkmoney</groupId>
<groupId>dev.vality</groupId>
<artifactId>service-parent-pom</artifactId>
<version>2.0.9</version>
<version>1.0.0</version>
</parent>
<artifactId>fraudbusters-management</artifactId>