From 59b4bcdce3405385cefb5c3c02f925906d74e6bc Mon Sep 17 00:00:00 2001 From: Struchkov Mark Date: Wed, 26 Apr 2023 13:18:47 +0300 Subject: [PATCH] cicd --- .drone.yml | 150 ++++++++++++++++++++++++++++++++ pom.xml | 250 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 400 insertions(+) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..0f097e6 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,150 @@ +--- +kind: pipeline +type: docker +name: snapshot-publish + +trigger: + branch: + - develop + +volumes: + - name: m2 + host: + path: /drone/volume/m2 + +steps: + + - name: publish + image: maven:3.8.5-openjdk-17 + privileged: true + volumes: + - name: m2 + path: /root/.m2/repository + environment: + MAVEN_SETTINGS: + from_secret: MAVEN_SETTINGS + commands: + - echo "$MAVEN_SETTINGS" >> maven-settings.xml + - mvn --settings maven-settings.xml -U -P snapshot clean deploy + +--- +kind: pipeline +type: docker +name: release-maven-central + +trigger: + ref: + - refs/tags/v.*.*.* + +volumes: + - name: m2 + host: + path: /drone/volume/m2 + +steps: + + - name: publish maven central + image: maven:3.8.5-openjdk-17 + privileged: true + volumes: + - name: m2 + path: /root/.m2/repository + environment: + GPG_PRIVATE_KEY: + from_secret: GPG_PRIVATE_KEY + MAVEN_SETTINGS: + from_secret: MAVEN_SETTINGS + GPG_PASSPHRASE: + from_secret: GPG_PASSPHRASE + commands: + - echo "$GPG_PRIVATE_KEY" >> gpg.key + - echo "$MAVEN_SETTINGS" >> maven-settings.xml + - gpg --pinentry-mode loopback --passphrase $GPG_PASSPHRASE --import gpg.key + - mvn --settings maven-settings.xml -U -P ossrh,release clean deploy + +--- +kind: pipeline +type: docker +name: release-struchkov-nexus + +trigger: + ref: + - refs/tags/v.*.*.* + +volumes: + - name: m2 + host: + path: /drone/volume/m2 + +steps: + + - name: publish struchkov nexus + image: maven:3.8.5-openjdk-17 + privileged: true + volumes: + - name: m2 + path: /root/.m2/repository + environment: + GPG_PRIVATE_KEY: + from_secret: GPG_PRIVATE_KEY + MAVEN_SETTINGS: + from_secret: MAVEN_SETTINGS + GPG_PASSPHRASE: + from_secret: GPG_PASSPHRASE + commands: + - echo "$GPG_PRIVATE_KEY" >> gpg.key + - echo "$MAVEN_SETTINGS" >> maven-settings.xml + - gpg --pinentry-mode loopback --passphrase $GPG_PASSPHRASE --import gpg.key + - mvn --settings maven-settings.xml -U -P ossrh,release-struchkov-nexus clean deploy + +#--- +#kind: pipeline +#type: docker +#name: create-develop-docs-site +# +#trigger: +# branch: +# - develop +# - docs +# +#clone: +# disable: true +# +#steps: +# +# - name: build docs +# image: git.struchkov.dev/upagge/mkdocs-material-insiders:latest +# volumes: +# - name: mkdocs_cache +# path: ${DRONE_WORKSPACE}/documentation/ru/.cache +# environment: +# GIT_SSH: +# from_secret: GIT_SSH +# GIT_SSH_COMMAND: "ssh -i ~/.ssh/id_rsa -p 222" +# commands: +# - eval $(ssh-agent -s) +# - mkdir -p ~/.ssh +# - chmod 700 ~/.ssh +# - echo "$GIT_SSH" >> ~/.ssh/id_rsa +# - chmod 600 ~/.ssh/id_rsa +# - ssh-keyscan -p 222 git.struchkov.dev >> ~/.ssh/known_hosts +# - chmod 644 ~/.ssh/known_hosts +# - git config --global user.name "${DRONE_COMMIT_AUTHOR_NAME}" +# - git config --global user.email "${DRONE_COMMIT_AUTHOR_EMAIL}" +# - git clone ${DRONE_GIT_SSH_URL} . +# - git checkout $DRONE_COMMIT +# - cd documentation/spring/ru +# - mike deploy --prefix godfather-telegram/spring/ru --branch docs-deploy --push --update-aliases develop +# +#image_pull_secrets: +# - DOCKER_AUTH +# +#volumes: +# - name: mkdocs_cache +# host: +# path: /drone/volume/mkdocs_cache/godfather_telegram/spring/ru +--- +kind: signature +hmac: aa3f6e6fd313a4d2c98d21a230fb62ef93392cb69801abfcd9f025287475b1df + +... diff --git a/pom.xml b/pom.xml index b4e71b4..670bfc3 100644 --- a/pom.xml +++ b/pom.xml @@ -15,6 +15,20 @@ yookassa-sdk + YooKassa Java SDK + Allows you to interact with the YooKassa payment service + https://git.struchkov.dev/upagge/yookassa-sdk + + + BSD 3-Clause "New" or "Revised" License + https://git.struchkov.dev/upagge/yookassa-sdk/blob/master/LICENSE + + + + GitHub + https://github.com/upagge/yookassa-sdk/issues + + 17 ${java.version} @@ -23,6 +37,19 @@ UTF-8 1.18.26 + + + 3.10.1 + + 1.6.13 + + 3.2.1 + + 3.5.0 + + 3.0.1 + + 3.0.0-M7 @@ -80,6 +107,229 @@ + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + ${plugin.nexus.staging.ver} + true + + + org.apache.maven.plugins + maven-source-plugin + ${plugin.maven.source.ver} + + + attach-sources + + jar-no-fork + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + ${plugin.maven.javadoc.ver} + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-gpg-plugin + ${plugin.maven.gpg.ver} + + + sign-artifacts + verify + + sign + + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${plugin.maven.compiler.ver} + + ${java.version} + ${java.version} + + + + org.apache.maven.plugins + maven-release-plugin + ${plugin.maven.release.ver} + + clean install + v.@{project.version} + true + false + true + true + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + + org.apache.maven.plugins + maven-javadoc-plugin + + + org.apache.maven.plugins + maven-source-plugin + + + org.apache.maven.plugins + maven-release-plugin + + + + + + + release + + + + org.sonatype.plugins + nexus-staging-maven-plugin + + ossrh + https://s01.oss.sonatype.org/ + true + + + + org.apache.maven.plugins + maven-source-plugin + + + org.apache.maven.plugins + maven-gpg-plugin + + + org.apache.maven.plugins + maven-javadoc-plugin + + + + + + release-struchkov-nexus + + + + org.sonatype.plugins + nexus-staging-maven-plugin + + struchkov-nexus + https://nexus.struchkov.dev/nexus/ + true + true + + + + org.apache.maven.plugins + maven-source-plugin + + + org.apache.maven.plugins + maven-gpg-plugin + + + org.apache.maven.plugins + maven-javadoc-plugin + + + + + + snapshot + + + + org.sonatype.plugins + nexus-staging-maven-plugin + + struchkov-nexus + https://nexus.struchkov.dev/nexus/ + true + + + + org.apache.maven.plugins + maven-source-plugin + + + org.apache.maven.plugins + maven-javadoc-plugin + + + + + + + + + struchkov-nexus-release + https://nexus.struchkov.dev/repository/maven-releases/ + + true + always + fail + + + false + + + + struchkov-nexus-snapshot + https://nexus.struchkov.dev/repository/maven-snapshots/ + + false + + + true + always + warn + + + + + + + struchkov-nexus-release + https://nexus.struchkov.dev/repository/maven-releases/ + + + struchkov-nexus-snapshot + https://nexus.struchkov.dev/repository/maven-snapshots/ + + + + + scm:git:https://git.struchkov.dev/upagge/yookassa-sdk.git + https://git.struchkov.dev/upagge/yookassa-sdk + scm:git:https://git.struchkov.dev/upagge/yookassa-sdk.git + HEAD + + uPagge