diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..85e7c1dfcb7fbb33f932c81024018cd8c10519da --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/.idea/ diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 66f75c2b1ed108eef85612bee2a218900873f4eb..54e4075d4918c0c763a96be6d2f763fd22cabfb5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,11 +9,15 @@ variables: DOCKER_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA # Replace 'path/to/project:agent-name' with your actual agent's path and name KUBE_CONTEXT: "my-group/banguardian-project:my-k3s-agent" + IMAGE_TAG_BRANCH: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME + IMAGE_TAG_SLUG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG + IMAGE_TAG_LATEST: $CI_REGISTRY_IMAGE:latest + # 1. Build React UI build-ui: stage: build-ui - image: node:18-alpine + image: node:25-alpine script: - cd banguardian-ui - npm install @@ -26,7 +30,7 @@ build-ui: # 2. Build Spring Boot (Bundling the UI) build-server: stage: build-server - image: eclipse-temurin:17-jdk-alpine + image: eclipse-temurin:21-jdk-alpine needs: - build-ui script: @@ -42,23 +46,43 @@ build-server: # 3. Build & Push Docker Image build-docker: stage: package - image: docker:24.0.5 + needs: [build-server] +# image: docker:24.0.5 +# services: +# - docker:24.0.5-dind + image: docker:20-dind + variables: + DOCKER_HOST: tcp://docker:2375 + DOCKER_DRIVER: overlay2 + DOCKER_TLS_CERTDIR: "" + # DOCKER_TLS_VERIFY: "" + # DOCKER_TLS: "" services: - - docker:24.0.5-dind + - name: docker:20-dind + alias: docker + command: [ "--tls=false" ] + before_script: - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY + script: - - docker build -t $DOCKER_IMAGE . - - docker push $DOCKER_IMAGE - only: - - main + - hostname + - nslookup gitlab.erpratyush.me + - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY + - docker build -t $IMAGE_TAG_BRANCH -t $IMAGE_TAG_SLUG -t $IMAGE_TAG_LATEST . + - docker image ls + - docker push --all-tags $CI_REGISTRY_IMAGE + + # Deployment Template .deploy_template: + needs: [build-docker] image: name: alpine/k8s:1.28.3 # Includes kubectl and envsubst before_script: - - kubectl config use-context $KUBE_CONTEXT + - kubectl config use-context pratyush/k3deployer:k3dep + - kubectl create namespace $K8S_NAMESPACE --dry-run=client -o yaml | kubectl apply -f - script: # Safely inject the image tag and apply to the specific namespace - envsubst < k3s/deployment.yaml | kubectl apply -n $K8S_NAMESPACE -f - @@ -71,8 +95,6 @@ deploy-dev: K8S_NAMESPACE: banguardian-dev environment: name: development - needs: - - job: build-docker # 5. Deploy to Production (Manual Approval) deploy-prod: diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000000000000000000000000000000000000..7ee9818655d082c0b6c3496f8e07ffc9bb4a45c9 --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/dataSources/data_sources_history.xml b/.idea/dataSources/data_sources_history.xml new file mode 100644 index 0000000000000000000000000000000000000000..09de4bb7528c5065094b30cb3e6835d1b44d0f1a --- /dev/null +++ b/.idea/dataSources/data_sources_history.xml @@ -0,0 +1,119 @@ + + + + + mariadb + true + true + org.mariadb.jdbc.Driver + jdbc:mariadb://192.168.1.206:3306/banguard + banguardianu1 + + $ProjectFileDir$ + + + + + + mariadb + true + true + org.mariadb.jdbc.Driver + jdbc:mariadb://192.168.1.206:3306/banguard + c10_banguard + + $ProjectFileDir$ + + + + + + mariadb + true + true + org.mariadb.jdbc.Driver + jdbc:mariadb://192.168.1.206:3306/c10_banguard + c10_banguard + + $ProjectFileDir$ + + + + + + mariadb + true + true + org.mariadb.jdbc.Driver + jdbc:mariadb://192.168.1.206:3306/c10_banguard + c10_banguard + + $ProjectFileDir$ + + + + + + mariadb + true + true + org.mariadb.jdbc.Driver + jdbc:mariadb://192.168.1.206:3306/c10_banguard + c10_banguard + + $ProjectFileDir$ + + + + + + mariadb + true + true + org.mariadb.jdbc.Driver + jdbc:mariadb://192.168.1.206:3306/c10_banguard + c10_banguard + + $ProjectFileDir$ + + + + + + #@ + ` + + + mariadb + true + org.mariadb.jdbc.Driver + jdbc:mariadb://192.168.1.206:3306/c10_banguard + + + + + + master_key + c10_banguard + + + + + + $ProjectFileDir$ + + + + + + mariadb + true + true + org.mariadb.jdbc.Driver + jdbc:mariadb://192.168.1.206:3306/c10_banguard + c10_banguard + + $ProjectFileDir$ + + + \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 0000000000000000000000000000000000000000..d5f2fbd749450dab249e49f87774ca0581f5339c --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml new file mode 100644 index 0000000000000000000000000000000000000000..712ab9d985c20018a0c97b93d2148ac1ffe588a5 --- /dev/null +++ b/.idea/jarRepositories.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 8a009d397eb9b712e4f42ac3f3a68fc911c6bb06..3d40a0c64cd81db420f0ad3fa19cdfc4f0d78785 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,13 @@ - - + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml index 35eb1ddfbbc029bcab630581847471d7f238ec53..94a25f7f4cb416c083d265558da75d457237d671 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000000000000000000000000000000000000..63417b9f5af420971f593d167bf4fe7bc955020c --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,190 @@ + + + + + + + + + + + + + + + + + { + "lastFilter": { + "state": "OPENED", + "assignee": { + "type": "org.jetbrains.plugins.gitlab.mergerequest.ui.filters.GitLabMergeRequestsFiltersValue.MergeRequestsMemberFilterValue.MergeRequestsAssigneeFilterValue", + "username": "pratyush", + "fullname": "pratyush" + } + } +} + { + "selectedUrlAndAccountId": { + "first": "https://gitlab.erpratyush.me/pratyush/ban-guardian.git", + "second": "db76e022-5ac0-4e45-8fdd-277752c65b15" + } +} + {} + { + "isMigrated": true +} + + + + + + + + { + "associatedIndex": 0, + "fromUser": false +} + + + + + + + + + + + + + + + + + + + + + + + + 1775162724013 + + + + + + + + + + + + + + + + +