From 6fd714059e3b4cd6cd80b43c4800d698d942a29a Mon Sep 17 00:00:00 2001 From: subochev Date: Mon, 27 Jul 2026 11:44:05 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20=D0=BD=D0=BE=D0=B2=D1=8B=D0=B9=20=D1=80=D0=B0=D0=B1?= =?UTF-8?q?=D0=BE=D1=87=D0=B8=D0=B9=20=D0=BF=D0=BE=D1=82=D0=BE=D0=BA=20?= =?UTF-8?q?=D0=B4=D0=BB=D1=8F=20=D0=B0=D0=B2=D1=82=D0=BE=D0=BC=D0=B0=D1=82?= =?UTF-8?q?=D0=B8=D1=87=D0=B5=D1=81=D0=BA=D0=BE=D0=B3=D0=BE=20=D1=82=D0=B5?= =?UTF-8?q?=D1=81=D1=82=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D1=8F=20?= =?UTF-8?q?=D1=81=20=D0=BF=D0=B0=D1=80=D0=B0=D0=BC=D0=B5=D1=82=D1=80=D0=B0?= =?UTF-8?q?=D0=BC=D0=B8=20=D0=BE=D0=BA=D1=80=D1=83=D0=B6=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D1=8F=20=D0=B8=20=D0=BD=D0=B0=D1=81=D1=82=D1=80=D0=BE=D0=B9?= =?UTF-8?q?=D0=BA=D0=B0=D0=BC=D0=B8=20=D1=81=D0=B1=D0=BE=D1=80=D0=BA=D0=B8?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/autotest.yaml | 120 +++++++++++++++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 .gitea/workflows/autotest.yaml diff --git a/.gitea/workflows/autotest.yaml b/.gitea/workflows/autotest.yaml new file mode 100644 index 0000000..1e2facd --- /dev/null +++ b/.gitea/workflows/autotest.yaml @@ -0,0 +1,120 @@ +name: 'Build Agent' +run-name: '${{ inputs.branch }} :: ${{ gitea.run_number }}' +on: + workflow_dispatch: + inputs: + test_env: + description: 'активное окружение' + required: true + type: string + default: 'test' + api_url: + description: 'базовый URL DevSpace API' + required: true + type: string + ui_url: + description: 'базовый URL DevSpace UI' + required: true + type: string + backend_url: + description: 'backend URL для части API-проверок' + required: true + type: string + db_url: + description: 'JDBC URL PostgreSQL' + required: true + type: string + db_user: + description: 'пользователь БД' + required: true + type: string + default: postgres + db_password: + description: 'пароль БД' + required: true + type: string + default: postgres + auth_url: + description: 'URL получения токена' + required: true + type: string + auth_clientId: + description: 'client id' + required: true + type: string + auth_grantType: + description: 'grant type' + required: true + type: string + auth_username: + description: 'пользователь для авторизации' + required: true + type: string + auth_password: + description: 'пароль пользователя' + required: true + type: string + generator_url: + description: 'URL генератора, нужен для тестов OpenAPI-файлов' + required: true + type: string +jobs: + deploy-dev: + name: 'Deploy to dev' + runs-on: ubuntu-latest + steps: + - name: 'Print Info' + run: | + echo "Cloning ${{ github.event.inputs.repo_path }}" + echo "From branch ${{ github.event.inputs.branch }}" + - name: Cloning + uses: https://git.binom.pw/otp/devops/clone@main + with: + ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} + repository: 'devspc/devspace-autotests' + branch: ${{ github.event.inputs.branch }} + - name: 'Конфигурирование интеграции gradle' + uses: https://git.binom.pw/otp/devops/config-gradle@main + - name: 'Конфигурирование gradle wrapper' + uses: https://git.binom.pw/otp/devops/setup-gradle@main + - name: Setup Jvm + uses: actions/setup-java@v4 + with: + java-version: 21 + distribution: "adopt" + - name: Building + run: | + ./gradlew test --no-daemon -x cyclonedxBom \ + -Dtest.env=${{ input.test_env }} \ + -Dapi.url=${{ input.api_url }} \ + -Dui.url=${{ input.ui_url }} \ + -Dbackend.url=${{ input.backend_url }} \ + -Ddb.url=${{ input.db_url }} \ + -Ddb.user=${{ input.db_user }} \ + -Ddb.password=${{ input.db_password }} \ + -Dauth.url=${{ input.auth_url }} \ + -Dauth.clientId=${{ input.auth_clientId }} \ + -Dauth.grantType=${{ input.auth_grantType }} \ + -Dauth.username=${{ input.auth_username }} \ + -Dauth.password=${{ input.auth_password }} \ + -Dgenerator.url=${{ input.generator_url }} + - name: Build and push Docker Image + uses: https://git.binom.pw/subochev/devops/build-docker@main + with: + image_name: "otp/agent" + tags: latest ${{ gitea.run_number }} + - name: Publishing Helm + uses: https://git.binom.pw/subochev/devops/helm-publish@main + with: + chart_directory: "helm" + helm_version: "${{ gitea.run_number }}" + helm_version_placeholder: '0.1.0' + + - name: 'Cleanup' + if: always() + shell: bash + run: | + echo 'Cleaning...' + rm -rf ~/.gradle/init.gradle.kts + rm -rf ~/.ssh/config + rm -rf ~/.ssh/my_key \ No newline at end of file