cleanup old ci

This commit is contained in:
vitaxa 2022-01-26 15:16:17 +03:00
parent b5351ab18e
commit 4a29a24a7e
6 changed files with 5 additions and 164 deletions

61
Jenkinsfile vendored
View File

@ -1,61 +0,0 @@
#!groovy
// -*- mode: groovy -*-
build('swag-notification', 'docker-host') {
checkoutRepo()
loadBuildUtils('build_utils')
def pipeDefault
def withWsCache
def gitUtils
runStage('load pipeline') {
env.JENKINS_LIB = "build_utils/jenkins_lib"
pipeDefault = load("${env.JENKINS_LIB}/pipeDefault.groovy")
withWsCache = load("${env.JENKINS_LIB}/withWsCache.groovy")
gitUtils = load("${env.JENKINS_LIB}/gitUtils.groovy")
}
pipeDefault() {
runStage('install-deps') {
withWsCache("node_modules") {
sh 'make wc_install'
}
}
runStage('validate-spec') {
sh 'make wc_validate'
}
runStage('bundle') {
sh 'make wc_build'
}
// Java
runStage('build java client & server') {
env.JAVA_HOME = sh(returnStdout: true, script: 'java-config --select-vm openjdk-bin-11 --jdk-home').trim()
withMaven() {
if (env.BRANCH_NAME == 'master' || env.BRANCH_NAME.startsWith('epic/')) {
withGPG() {
sh 'make SETTINGS_XML=${SETTINGS_XML} BRANCH_NAME=${BRANCH_NAME} REPO_PUBLIC=${REPO_PUBLIC} GPG_PASSPHRASE=${GPG_PASSPHRASE} GPG_KEYID=${GPG_KEYID} java.openapi.deploy_client'
sh 'make SETTINGS_XML=${SETTINGS_XML} BRANCH_NAME=${BRANCH_NAME} REPO_PUBLIC=${REPO_PUBLIC} GPG_PASSPHRASE=${GPG_PASSPHRASE} GPG_KEYID=${GPG_KEYID} java.openapi.deploy_server'
}
} else {
sh 'make SETTINGS_XML=${SETTINGS_XML} BRANCH_NAME=${BRANCH_NAME} java.openapi.compile_client'
sh 'make SETTINGS_XML=${SETTINGS_XML} BRANCH_NAME=${BRANCH_NAME} java.openapi.compile_server'
}
}
}
// Release
if (env.BRANCH_NAME == 'master' || env.BRANCH_NAME.startsWith('epic/')) {
runStage('publish release bundle') {
dir("web_deploy") {
gitUtils.push(commitMsg: "Generated from commit: $COMMIT_ID \n\non $BRANCH_NAME in $RBK_REPO_URL\n\nChanges:\n$COMMIT_MSG",
files: "*", branch: "release/$BRANCH_NAME", orphan: true)
}
}
}
}
}

View File

@ -1,98 +0,0 @@
UTILS_PATH := build_utils
TEMPLATES_PATH := .
SERVICE_NAME := swag-notification
BUILD_IMAGE_TAG := 442c2c274c1d8e484e5213089906a4271641d95e
CALL_ANYWHERE := all install validate build java.compile java.deploy
CALL_W_CONTAINER := $(CALL_ANYWHERE)
all: validate
-include $(UTILS_PATH)/make_lib/utils_container.mk
.PHONY: $(CALL_W_CONTAINER)
install:
npm install
validate:
npm run validate
build:
npm run build
# Java
ifdef SETTINGS_XML
DOCKER_RUN_OPTS = -v $(SETTINGS_XML):$(SETTINGS_XML)
DOCKER_RUN_OPTS += -e SETTINGS_XML=$(SETTINGS_XML)
endif
ifdef LOCAL_BUILD
DOCKER_RUN_OPTS += -v $$HOME/.m2:/home/$(UNAME)/.m2:rw
endif
COMMIT_HASH := $(shell git --no-pager log -1 --pretty=format:"%h")
NUMBER_COMMITS := $(shell git rev-list --count HEAD)
JAVA_PKG_VERSION := 1.$(NUMBER_COMMITS)-$(COMMIT_HASH)
ifdef BRANCH_NAME
ifeq "$(findstring epic,$(BRANCH_NAME))" "epic"
JAVA_PKG_VERSION := $(JAVA_PKG_VERSION)-epic
endif
endif
REPO_PROFILE := private
ifdef REPO_PUBLIC
ifeq ($(REPO_PUBLIC), true)
REPO_PROFILE := public
endif
endif
MVN = mvn -s $(SETTINGS_XML) -Dcommit.number="$(NUMBER_COMMITS)"
java.openapi.compile_client: java.settings
$(MVN) clean && \
$(MVN) compile -P="client" -P="$(REPO_PROFILE)"
java.openapi.deploy_client: java.settings
$(MVN) clean && \
$(MVN) versions:set versions:commit -DnewVersion="$(JAVA_PKG_VERSION)-client" && \
$(MVN) deploy --batch-mode -Dgpg.keyname="$(GPG_KEYID)" -Dgpg.passphrase="$(GPG_PASSPHRASE)" -P="client" -P="$(REPO_PROFILE)"
java.openapi.install_client: java.settings
$(MVN) clean && \
$(MVN) versions:set versions:commit -DnewVersion="$(JAVA_PKG_VERSION)-client" && \
$(MVN) install -P="client" -P="$(REPO_PROFILE)"
java.openapi.compile_server: java.settings
$(MVN) clean && \
$(MVN) compile -P="server" -P="$(REPO_PROFILE)"
java.openapi.deploy_server: java.settings
$(MVN) clean && \
$(MVN) versions:set versions:commit -DnewVersion="$(JAVA_PKG_VERSION)-server" && \
$(MVN) deploy --batch-mode -Dgpg.keyname="$(GPG_KEYID)" -Dgpg.passphrase="$(GPG_PASSPHRASE)" -P="server" -P="$(REPO_PROFILE)"
java.openapi.install_server: java.settings
$(MVN) clean && \
$(MVN) versions:set versions:commit -DnewVersion="$(JAVA_PKG_VERSION)-server" && \
$(MVN) install -P="server" -P="$(REPO_PROFILE)"
java.compile: java.settings
$(MVN) compile
java.deploy: java.settings
$(MVN) versions:set versions:commit -DnewVersion="$(JAVA_PKG_VERSION)" && \
$(MVN) deploy
java.install: java.settings
$(MVN) clean && \
$(MVN) versions:set versions:commit -DnewVersion="$(JAVA_PKG_VERSION)" && \
$(MVN) install
java.settings:
$(if $(SETTINGS_XML),, echo "SETTINGS_XML not defined"; exit 1)

View File

@ -1 +1 @@
RBKmoney Notification API
Vality Notification API

View File

@ -1,12 +1,12 @@
openapi: 3.0.0
info:
version: 1.0.0
title: RBKmoney Notification API
title: Vality Notification API
description:
$ref: './docs/api.md'
termsOfService: http://rbk.money/
contact:
name: RBKmoney support team
name: Vality support team
email: support@rbk.money
url: 'https://developer.rbk.money'
license:

View File

@ -19,7 +19,7 @@
</description>
<properties>
<default.package>com.rbkmoney.openapi.notification</default.package>
<default.package>dev.vality.openapi.notification</default.package>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven-plugin-version>1.0.0</maven-plugin-version>
<java.version>11</java.version>

View File

@ -2,7 +2,7 @@
<html>
<head>
<title>RBKmoney Notification API</title>
<title>Vality Notification API</title>
<!-- needed for adaptive design -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/png" href="favicon.png">