From 5e231aa6eaede5012fa2c9f48e017b5cbfb65855 Mon Sep 17 00:00:00 2001 From: Kolman-Freecss Date: Sun, 6 Oct 2024 03:52:53 +0200 Subject: [PATCH] Enhance code --- .github/workflows/test-devops.yml | 4 +- .gitignore | 5 +- .run/Execute_build.run.xml | 12 +- .run/Execute_init_jenkins.run.xml | 10 +- README.md | 2 +- TODO.md | 3 +- src/local/Dockerfile | 24 ++- src/local/docker-compose.yml | 9 +- src/local/init-scripts/init.sh | 2 +- src/local/jenkins_plugins/plugins.yaml | 8 + src/local/main/build.py | 54 ++++++ src/local/main/config.py | 43 +++++ .../{python/sh => main/helpers}/gen_ssh.bat | 0 .../{python/sh => main/helpers}/gen_ssh.sh | 0 .../helpers}/start_jenkins_agent.sh | 0 src/local/main/init_jenkins.py | 107 +++++++++++ src/local/{python => main}/requirements.txt | 0 src/local/main/services.py | 169 ++++++++++++++++++ src/local/python/build.py | 100 ----------- src/local/python/init_jenkins.py | 156 ---------------- 20 files changed, 419 insertions(+), 289 deletions(-) create mode 100644 src/local/jenkins_plugins/plugins.yaml create mode 100644 src/local/main/build.py create mode 100644 src/local/main/config.py rename src/local/{python/sh => main/helpers}/gen_ssh.bat (100%) rename src/local/{python/sh => main/helpers}/gen_ssh.sh (100%) rename src/local/{python => main/helpers}/start_jenkins_agent.sh (100%) create mode 100644 src/local/main/init_jenkins.py rename src/local/{python => main}/requirements.txt (100%) create mode 100644 src/local/main/services.py delete mode 100644 src/local/python/build.py delete mode 100644 src/local/python/init_jenkins.py diff --git a/.github/workflows/test-devops.yml b/.github/workflows/test-devops.yml index 3d4d213..be66d46 100644 --- a/.github/workflows/test-devops.yml +++ b/.github/workflows/test-devops.yml @@ -35,7 +35,7 @@ jobs: run: sudo apt-get update && sudo apt-get install docker-compose -y - name: Run Docker Compose - working-directory: src/local + working-directory: src/env.local run: docker-compose up -d - name: Wait for services to be ready @@ -48,5 +48,5 @@ jobs: - name: Tear down Docker Compose if: always() - working-directory: src/local + working-directory: src/env.local run: docker-compose down \ No newline at end of file diff --git a/.gitignore b/.gitignore index b6555f4..fcff114 100644 --- a/.gitignore +++ b/.gitignore @@ -11,9 +11,10 @@ # Ignore jenkins_plugins folder except .gitkeep **/jenkins_plugins/* !**/jenkins_plugins/.gitkeep +!**/jenkins_plugins/plugins.yaml -# Ignore .env/local.env files -.env/local.env +# Ignore .env/env.local.env files +.env/env.local # Ignore RSA temp files *_rsa* \ No newline at end of file diff --git a/.run/Execute_build.run.xml b/.run/Execute_build.run.xml index 85a41f4..1e8a9d0 100644 --- a/.run/Execute_build.run.xml +++ b/.run/Execute_build.run.xml @@ -6,22 +6,16 @@