From 47c9021235a295d53f481261353793517575cc68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=99=93=E4=BC=9F?= Date: Mon, 26 Feb 2024 09:43:08 +0800 Subject: [PATCH] :construction_worker: add .gitlab-ci.yml --- .gitlab-ci.yml | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..08adc17 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,42 @@ +stages: + - build + +build: + stage: build + image: maven:3.6.3-jdk-8 + variables: + MAVEN_OPTS: >- + -Dhttps.protocols=TLSv1.2 + -Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository + -Dorg.slf4j.simpleLogger.showDateTime=true + -Djava.awt.headless=true + MAVEN_CLI_OPTS: >- + --batch-mode + --errors + --fail-at-end + --show-version + --no-transfer-progress + -DinstallAtEnd=true + -DdeployAtEnd=true + script: + - GPG_FILE=`find / -name xuxiaowei_0x30F97859_SECRET` + - echo $GPG_FILE + - gpg --import $GPG_FILE + #- SETTINGS_FILE=`find / -name settings.xml` + #- echo $SETTINGS_FILE + - SETTINGS_FILE=/usr/share/maven/conf/settings.xml + - sed -i "s##ossrh$ossrh_user$ossrh_pass&#" $SETTINGS_FILE + - mvn clean package source:jar javadoc:jar deploy -Pgpg -DskipTests=false + artifacts: + name: boot-sentinel + paths: + - target/*.jar + cache: + key: "${CI_JOB_NAME}" + paths: + - .m2/repository + rules: + - changes: + - src/**/** + - .gitlab-ci.yml + - pom.xml