-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
2,206 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
@Library(['jenkins-lib-core', 'jenkins-lib-oscript']) _ | ||
opmPipeline() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Определение переменной VERSION с помощью выполнения команды oscript -version | ||
VERSION := $(shell oscript -version) | ||
|
||
# Переменная параметров сборки пакета модуля с учетом версии oscript | ||
ifeq ($(VERSION), 1.0.19.105) | ||
BUILD_PARAMS := build -mf ./packagedef -out . | ||
else | ||
BUILD_PARAMS := build -m ./packagedef -o . | ||
endif | ||
|
||
# Переменная параметров установки модуля из пакета *.ospx | ||
INSTALL_PARAMS := install -f *.ospx | ||
|
||
# Переменная для максимальной длины строки сообщения | ||
MAX_LENGTH := 90 | ||
|
||
# Команда build | ||
build: | ||
@$(call print_message, "Собираем пакет модуля edt-ripper") | ||
@$(call print_message, "Используемые параметры: $(BUILD_PARAMS)") | ||
@opm $(BUILD_PARAMS) | ||
@$(call print_message, "Пакет edt-ripper успешно построен!") | ||
|
||
# Команда install | ||
install: | ||
@$(call print_message, "Важно! Для корректной установки нужны права администратора") | ||
@$(call print_message, "Устанавливаем пакет edt-ripper") | ||
@opm $(INSTALL_PARAMS) | ||
|
||
# Функция, которая выводит сообщение в рамке из символов | ||
# Аргумент: $(1) - сообщение | ||
define print_message | ||
$(eval MSG_TRUNCATED := $(shell echo "$(1)" )) | ||
$(eval MSG_LEN := $(shell echo '$(MSG_TRUNCATED)' | wc -m)) | ||
$(eval MSG_SPACES := $(shell expr "$(MAX_LENGTH)" - "$(MSG_LEN)")) | ||
$(info ┌$(shell printf "─%.0s" $$(seq 1 $(MAX_LENGTH)))┐) | ||
$(info │ $(MSG_TRUNCATED)$(shell printf '%-$(MSG_SPACES)s')|) | ||
$(info └$(shell printf "─%.0s" $$(seq 1 $(MAX_LENGTH)))┘) | ||
endef |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"sonarqube" : true, | ||
"test" : false, | ||
"coverage" : false, | ||
"build" : true, | ||
"publish" : { | ||
"enable" : true, | ||
"stableBranch" : "release/.*", | ||
"develop" : true | ||
} | ||
} | ||
|
Oops, something went wrong.