From e8dc94192e5467e716a54acb1f3178399e6b6b0b Mon Sep 17 00:00:00 2001 From: code parce Date: Fri, 20 Feb 2026 17:30:39 -0500 Subject: [PATCH 01/17] DEVOPS : NEW : implementacion de functions en GCP --- .github/workflows/azure-arquitecture.yml | 49 ------------------------ .github/workflows/azure-web-app.yml | 44 --------------------- .github/workflows/build-code.yml | 21 ++++++++++ .github/workflows/functions-gcp.yml | 19 +++++++++ .github/workflows/node-build.yml | 37 ------------------ .github/workflows/node-init.yml | 26 ------------- 6 files changed, 40 insertions(+), 156 deletions(-) delete mode 100644 .github/workflows/azure-arquitecture.yml delete mode 100644 .github/workflows/azure-web-app.yml create mode 100644 .github/workflows/build-code.yml create mode 100644 .github/workflows/functions-gcp.yml delete mode 100644 .github/workflows/node-build.yml delete mode 100644 .github/workflows/node-init.yml diff --git a/.github/workflows/azure-arquitecture.yml b/.github/workflows/azure-arquitecture.yml deleted file mode 100644 index 811a304..0000000 --- a/.github/workflows/azure-arquitecture.yml +++ /dev/null @@ -1,49 +0,0 @@ -# .github/workflows/node-build.yml -name: Deploy to Azure Arquitecture - - -on: - workflow_call: - - -jobs: - deploy-azure-arquitecture: - name: Arquitecture - runs-on: ubuntu-latest - env: - ARM_CLIENT_ID: ${{ secrets.ARM_CLIENT_ID }} - ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }} - ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }} - ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }} - GITHUB_REPOSITORY_NAME: ${{ github.event.repository.name }} - - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Clone terraform scripts repository - uses: actions/checkout@v4 - with: - repository: codeparce/azure-terraform - ref: azure - token: ${{ secrets.PERSONAL_ACCES_TOKEN }} - path: azure-terraform - - - name: Setup Terraform - uses: hashicorp/setup-terraform@v3 - with: - terraform_version: 1.6.6 - - - name: Deploy Azure infrastructure - run: | - cd azure-terraform/2-static-web-app - bash main.sh - - - name: Upload Static Web App secrets artifact - uses: actions/upload-artifact@v4 - with: - name: static-web-app-json - path: azure-terraform/2-static-web-app/secret - retention-days: 1 diff --git a/.github/workflows/azure-web-app.yml b/.github/workflows/azure-web-app.yml deleted file mode 100644 index b543f2c..0000000 --- a/.github/workflows/azure-web-app.yml +++ /dev/null @@ -1,44 +0,0 @@ -# .github/workflows/node-build.yml -name: Deploy to Azure Arquitecture - - -on: - workflow_call: - -jobs: - deploy-azure-static-web-app: - runs-on: ubuntu-latest - name: Static Web App - - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: 20 - - - name: Download build artifact - uses: actions/download-artifact@v4 - with: - name: web-build - path: dist - - - name: Download json artifact - uses: actions/download-artifact@v4 - with: - name: static-web-app-json - path: secret - - - name: Install SWA CLI - run: npm install -g @azure/static-web-apps-cli - - - name: Deploy Static Web App - run: | - ENV_NAME=$([ "$GITHUB_REF_NAME" = "main" ] && echo "production" || echo "$GITHUB_REF_NAME") - FILE_JSON="secret/static-web-app-json.json" - API_KEY=$(jq -r '.properties.apiKey' $FILE_JSON) - swa deploy ./dist --deployment-token $API_KEY --env $ENV_NAME diff --git a/.github/workflows/build-code.yml b/.github/workflows/build-code.yml new file mode 100644 index 0000000..13af6a3 --- /dev/null +++ b/.github/workflows/build-code.yml @@ -0,0 +1,21 @@ +# .github/workflows/build-code.yml +name: Build code + + +on: + workflow_call: + + +jobs: + zip-code: + name: Zip Code + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Deploy Azure infrastructure + run: | + ls \ No newline at end of file diff --git a/.github/workflows/functions-gcp.yml b/.github/workflows/functions-gcp.yml new file mode 100644 index 0000000..745d255 --- /dev/null +++ b/.github/workflows/functions-gcp.yml @@ -0,0 +1,19 @@ +# .github/workflows/functions-gcp.yml +permissions: + contents: read + +on: + workflow_call: + + +jobs: + functions: + name: Build code + uses: ./.github/workflows/build-code-gcp.yml + secrets: inherit + +# gcp-terraform: +# name: GCP +# uses: ./.github/workflows/gcp-arquitecture.yml +# secrets: inherit +# needs: [functions] diff --git a/.github/workflows/node-build.yml b/.github/workflows/node-build.yml deleted file mode 100644 index ed5e8ff..0000000 --- a/.github/workflows/node-build.yml +++ /dev/null @@ -1,37 +0,0 @@ -# .github/workflows/node-build.yml -name: Build node project - - -on: - workflow_call: - inputs: - node-version: - required: true - type: string - -jobs: - build: - runs-on: ubuntu-latest - name: Node Build - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - uses: actions/setup-node@v4 - with: - node-version: ${{ inputs.node-version }} - - - name: Install dependencies - run: npm i - - - name: Build Project - run: npm run build - - - name: Upload build artifact - uses: actions/upload-artifact@v4 - with: - name: web-build - path: dist - retention-days: 1 - \ No newline at end of file diff --git a/.github/workflows/node-init.yml b/.github/workflows/node-init.yml deleted file mode 100644 index 12100e7..0000000 --- a/.github/workflows/node-init.yml +++ /dev/null @@ -1,26 +0,0 @@ -# .github/workflows/node-build.yml -permissions: - contents: read - -on: - workflow_call: - inputs: - node-version: - required: true - type: string - -jobs: - node: - uses: ./.github/workflows/node-build.yml - with: - node-version: ${{ inputs.node-version }} - - azure-terraform: - name: Azure - uses: ./.github/workflows/azure-arquitecture.yml - secrets: inherit - - azure-deploy: - name: Azure - uses: ./.github/workflows/azure-web-app.yml - needs: [azure-terraform, node] From 14f29a2a26a5f2a409fe4cf42f81105f22b7b0d7 Mon Sep 17 00:00:00 2001 From: code parce Date: Fri, 20 Feb 2026 17:33:26 -0500 Subject: [PATCH 02/17] DEVOPS : NEW : implementacion de functions en GCP --- .github/workflows/functions-gcp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/functions-gcp.yml b/.github/workflows/functions-gcp.yml index 745d255..48be958 100644 --- a/.github/workflows/functions-gcp.yml +++ b/.github/workflows/functions-gcp.yml @@ -9,7 +9,7 @@ on: jobs: functions: name: Build code - uses: ./.github/workflows/build-code-gcp.yml + uses: ./.github/workflows/build-code.yml secrets: inherit # gcp-terraform: From 104b38e3fa69a4ead1876dda84c9a9631bb3f415 Mon Sep 17 00:00:00 2001 From: code parce Date: Sat, 21 Feb 2026 01:27:56 -0500 Subject: [PATCH 03/17] DEVOPS : UPDATE : zipear solo codigo necesario --- .github/workflows/build-code.yml | 50 +++++++++++++++++------------ .github/workflows/functions-gcp.yml | 38 +++++++++++----------- LICENSE | 42 ++++++++++++------------ 3 files changed, 69 insertions(+), 61 deletions(-) diff --git a/.github/workflows/build-code.yml b/.github/workflows/build-code.yml index 13af6a3..a0e5297 100644 --- a/.github/workflows/build-code.yml +++ b/.github/workflows/build-code.yml @@ -1,21 +1,29 @@ -# .github/workflows/build-code.yml -name: Build code - - -on: - workflow_call: - - -jobs: - zip-code: - name: Zip Code - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Deploy Azure infrastructure - run: | - ls \ No newline at end of file +# .github/workflows/build-code.yml +name: Build code + + +on: + workflow_call: + + +jobs: + zip-code: + name: Zip Code + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: zip code + run: | + ls && cd function/ && zip -r functions.zip . -x "*test*" + + - name: Upload zip artifact + uses: actions/upload-artifact@v4 + with: + name: zip + path: function/functions.zip + retention-days: 1 + \ No newline at end of file diff --git a/.github/workflows/functions-gcp.yml b/.github/workflows/functions-gcp.yml index 48be958..66e270e 100644 --- a/.github/workflows/functions-gcp.yml +++ b/.github/workflows/functions-gcp.yml @@ -1,19 +1,19 @@ -# .github/workflows/functions-gcp.yml -permissions: - contents: read - -on: - workflow_call: - - -jobs: - functions: - name: Build code - uses: ./.github/workflows/build-code.yml - secrets: inherit - -# gcp-terraform: -# name: GCP -# uses: ./.github/workflows/gcp-arquitecture.yml -# secrets: inherit -# needs: [functions] +# .github/workflows/functions-gcp.yml +permissions: + contents: read + +on: + workflow_call: + + +jobs: + functions: + name: Build code + uses: ./.github/workflows/build-code.yml + secrets: inherit + +# gcp-terraform: +# name: GCP +# uses: ./.github/workflows/gcp-arquitecture.yml +# secrets: inherit +# needs: [functions] diff --git a/LICENSE b/LICENSE index e8d0849..ccfcaf5 100644 --- a/LICENSE +++ b/LICENSE @@ -1,21 +1,21 @@ -MIT License - -Copyright (c) 2026 Code Parce - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +MIT License + +Copyright (c) 2026 Code Parce + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. From 6c38721a3214fc96227bff6cae8f20ec2f7c571d Mon Sep 17 00:00:00 2001 From: code parce Date: Sat, 21 Feb 2026 01:30:33 -0500 Subject: [PATCH 04/17] DEVOPS : UPDATE : zipear solo codigo necesario --- .github/workflows/build-code.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-code.yml b/.github/workflows/build-code.yml index a0e5297..9123e44 100644 --- a/.github/workflows/build-code.yml +++ b/.github/workflows/build-code.yml @@ -23,7 +23,7 @@ jobs: - name: Upload zip artifact uses: actions/upload-artifact@v4 with: - name: zip + name: file.zip path: function/functions.zip retention-days: 1 \ No newline at end of file From f4bd07c241cf950a7e9c641c5f53ef012fe04c47 Mon Sep 17 00:00:00 2001 From: code parce Date: Sat, 21 Feb 2026 09:16:20 -0500 Subject: [PATCH 05/17] DEVOPS: UDPATE : modificaciones del push code job --- .github/workflows/build-code.yml | 44 +++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-code.yml b/.github/workflows/build-code.yml index 9123e44..54f8396 100644 --- a/.github/workflows/build-code.yml +++ b/.github/workflows/build-code.yml @@ -26,4 +26,46 @@ jobs: name: file.zip path: function/functions.zip retention-days: 1 - \ No newline at end of file + + push-code: + name: Push Code + runs-on: ubuntu-latest + env: + VAULT_USER: ${{ secrets.VAULT_USER }} + VAULT_PASS: ${{ secrets.VAULT_PASS }} + VAULT_ADDR: ${{ secrets.VAULT_ADDR }} + VAULT_NAMESPACE: ${{ secrets.VAULT_NAMESPACE }} + GITHUB_REPOSITORY_NAME: ${{ github.event.repository.name }} + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Download zip artifact + uses: actions/download-artifact@v4 + with: + name: file.zip + path: function + + - name: validate + run: | + ls function + + - name: Setup gcloud + uses: google-github-actions/setup-gcloud@v2 + + - name: Get secrets from Vault + uses: hashicorp/vault-action@v2 + + - name: Clone terraform scripts repository + uses: actions/checkout@v4 + with: + repository: codeparce/terraform-cloud + ref: gcp + token: ${{ secrets.PERSONAL_ACCES_TOKEN }} + path: terraform-cloud + + - name: Push zip to bucket + run: | + bash terraform-cloud/3-functions/upload_zip.sh \ No newline at end of file From 580f56716d4e1d89ed248d523db8a024e45c4db8 Mon Sep 17 00:00:00 2001 From: code parce Date: Sat, 21 Feb 2026 09:18:02 -0500 Subject: [PATCH 06/17] DEVOPS: UDPATE : modificaciones del push code job --- .github/workflows/build-code.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-code.yml b/.github/workflows/build-code.yml index 54f8396..a4a4846 100644 --- a/.github/workflows/build-code.yml +++ b/.github/workflows/build-code.yml @@ -30,6 +30,7 @@ jobs: push-code: name: Push Code runs-on: ubuntu-latest + needs: [zip-code] env: VAULT_USER: ${{ secrets.VAULT_USER }} VAULT_PASS: ${{ secrets.VAULT_PASS }} From 71b5fd6a1df89b2107d8f6928407ff0e9073c263 Mon Sep 17 00:00:00 2001 From: code parce Date: Sat, 21 Feb 2026 09:31:30 -0500 Subject: [PATCH 07/17] DEVOPS: UDPATE : modificaciones del push code job --- .github/workflows/build-code.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-code.yml b/.github/workflows/build-code.yml index a4a4846..9983bcd 100644 --- a/.github/workflows/build-code.yml +++ b/.github/workflows/build-code.yml @@ -56,8 +56,8 @@ jobs: - name: Setup gcloud uses: google-github-actions/setup-gcloud@v2 - - name: Get secrets from Vault - uses: hashicorp/vault-action@v2 + - name: Setup Vault + uses: hashicorp/setup-vault@v2 - name: Clone terraform scripts repository uses: actions/checkout@v4 From 98d0451d988a45b2a3f0a317c2bbd7491421c6d7 Mon Sep 17 00:00:00 2001 From: code parce Date: Sat, 21 Feb 2026 09:36:23 -0500 Subject: [PATCH 08/17] DEVOPS: UDPATE : modificaciones del push code job --- .github/workflows/build-code.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-code.yml b/.github/workflows/build-code.yml index 9983bcd..03cdbf4 100644 --- a/.github/workflows/build-code.yml +++ b/.github/workflows/build-code.yml @@ -57,8 +57,13 @@ jobs: uses: google-github-actions/setup-gcloud@v2 - name: Setup Vault - uses: hashicorp/setup-vault@v2 - + uses: hashicorp/vault-action@v2 + with: + url: ${{ secrets.VAULT_ADDR }} + method: userpass + username: ${{ secrets.VAULT_USERNAME }} + password: ${{ secrets.VAULT_PASS }} + - name: Clone terraform scripts repository uses: actions/checkout@v4 with: From 12b745d4c90d20276e9c5b3745cd6b1bfad82f79 Mon Sep 17 00:00:00 2001 From: code parce Date: Sat, 21 Feb 2026 09:48:29 -0500 Subject: [PATCH 09/17] DEVOPS: UDPATE : modificaciones del push code job --- .github/workflows/build-code.yml | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-code.yml b/.github/workflows/build-code.yml index 03cdbf4..bd3181d 100644 --- a/.github/workflows/build-code.yml +++ b/.github/workflows/build-code.yml @@ -49,13 +49,6 @@ jobs: name: file.zip path: function - - name: validate - run: | - ls function - - - name: Setup gcloud - uses: google-github-actions/setup-gcloud@v2 - - name: Setup Vault uses: hashicorp/vault-action@v2 with: @@ -63,7 +56,16 @@ jobs: method: userpass username: ${{ secrets.VAULT_USERNAME }} password: ${{ secrets.VAULT_PASS }} - + secrets: secret/service-account-terraform-gcp + exportEnv: false + outputToken: false + + - name: validate + run: ls && echo $service-account-terraform-gcp + + - name: Setup gcloud + uses: google-github-actions/setup-gcloud@v2 + - name: Clone terraform scripts repository uses: actions/checkout@v4 with: @@ -72,6 +74,6 @@ jobs: token: ${{ secrets.PERSONAL_ACCES_TOKEN }} path: terraform-cloud - - name: Push zip to bucket - run: | - bash terraform-cloud/3-functions/upload_zip.sh \ No newline at end of file + # - name: Push zip to bucket + # run: | + # bash terraform-cloud/3-functions/upload_zip.sh \ No newline at end of file From 5f517ece40a8e5c082b0461430c72a4299af1f00 Mon Sep 17 00:00:00 2001 From: code parce Date: Sat, 21 Feb 2026 09:55:59 -0500 Subject: [PATCH 10/17] DEVOPS: UDPATE : modificaciones del push code job --- .github/workflows/build-code.yml | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build-code.yml b/.github/workflows/build-code.yml index bd3181d..9812c6f 100644 --- a/.github/workflows/build-code.yml +++ b/.github/workflows/build-code.yml @@ -49,22 +49,10 @@ jobs: name: file.zip path: function - - name: Setup Vault - uses: hashicorp/vault-action@v2 + - name: Set up Cloud SDK + uses: google-github-actions/setup-gcloud@v3 with: - url: ${{ secrets.VAULT_ADDR }} - method: userpass - username: ${{ secrets.VAULT_USERNAME }} - password: ${{ secrets.VAULT_PASS }} - secrets: secret/service-account-terraform-gcp - exportEnv: false - outputToken: false - - - name: validate - run: ls && echo $service-account-terraform-gcp - - - name: Setup gcloud - uses: google-github-actions/setup-gcloud@v2 + version: '>= 363.0.0' - name: Clone terraform scripts repository uses: actions/checkout@v4 @@ -74,6 +62,6 @@ jobs: token: ${{ secrets.PERSONAL_ACCES_TOKEN }} path: terraform-cloud - # - name: Push zip to bucket - # run: | - # bash terraform-cloud/3-functions/upload_zip.sh \ No newline at end of file + - name: Push zip to bucket + run: | + bash terraform-cloud/3-functions/upload_zip.sh From 57e5c9cb63259ce2e21c7eade694eec9a8541ca1 Mon Sep 17 00:00:00 2001 From: code parce Date: Sat, 21 Feb 2026 10:33:00 -0500 Subject: [PATCH 11/17] DEVOPS: UDPATE : modificaciones del push code job --- .github/workflows/build-code.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-code.yml b/.github/workflows/build-code.yml index 9812c6f..bd53506 100644 --- a/.github/workflows/build-code.yml +++ b/.github/workflows/build-code.yml @@ -49,19 +49,19 @@ jobs: name: file.zip path: function - - name: Set up Cloud SDK - uses: google-github-actions/setup-gcloud@v3 - with: - version: '>= 363.0.0' - - name: Clone terraform scripts repository uses: actions/checkout@v4 with: - repository: codeparce/terraform-cloud + repository: codeparceorg/terraform-cloud ref: gcp token: ${{ secrets.PERSONAL_ACCES_TOKEN }} path: terraform-cloud + - name: Set up Cloud SDK + uses: google-github-actions/setup-gcloud@v3 + with: + version: '>= 363.0.0' + - name: Push zip to bucket run: | bash terraform-cloud/3-functions/upload_zip.sh From 99c5d33111ce2b0b0d98aeff895ab2fe51ed10c1 Mon Sep 17 00:00:00 2001 From: code parce Date: Sat, 21 Feb 2026 10:47:52 -0500 Subject: [PATCH 12/17] DEVOPS: UDPATE : modificaciones del push code job --- .github/workflows/build-code.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-code.yml b/.github/workflows/build-code.yml index bd53506..09aa162 100644 --- a/.github/workflows/build-code.yml +++ b/.github/workflows/build-code.yml @@ -64,4 +64,4 @@ jobs: - name: Push zip to bucket run: | - bash terraform-cloud/3-functions/upload_zip.sh + cd terraform-cloud/3-functions && bash upload_zip.sh From 0fa697237e44b8160b05d7dc81c84255eb9c75cf Mon Sep 17 00:00:00 2001 From: code parce Date: Sat, 21 Feb 2026 11:33:09 -0500 Subject: [PATCH 13/17] DEVOPS: UDPATE : modificaciones del push code job --- .github/workflows/build-code.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-code.yml b/.github/workflows/build-code.yml index 09aa162..97092f7 100644 --- a/.github/workflows/build-code.yml +++ b/.github/workflows/build-code.yml @@ -64,4 +64,4 @@ jobs: - name: Push zip to bucket run: | - cd terraform-cloud/3-functions && bash upload_zip.sh + mv function/functions.zip terraform-cloud/3-functions && cd terraform-cloud/3-functions && bash upload_zip.sh From 8cd64e445e066d514541511d4d7e5ad887a00b65 Mon Sep 17 00:00:00 2001 From: code parce Date: Sat, 21 Feb 2026 13:02:23 -0500 Subject: [PATCH 14/17] DEVOPS: UDPATE : modificaciones del push code job --- .github/workflows/build-code.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-code.yml b/.github/workflows/build-code.yml index 97092f7..71d3670 100644 --- a/.github/workflows/build-code.yml +++ b/.github/workflows/build-code.yml @@ -64,4 +64,4 @@ jobs: - name: Push zip to bucket run: | - mv function/functions.zip terraform-cloud/3-functions && cd terraform-cloud/3-functions && bash upload_zip.sh + mv function/functions.zip terraform-cloud/3-functions && cd terraform-cloud/3-functions && bash main.sh From 17d8fddf6285ef2bf826ede10fb18670cbd1be8e Mon Sep 17 00:00:00 2001 From: code parce Date: Sat, 21 Feb 2026 13:07:43 -0500 Subject: [PATCH 15/17] DEVOPS: UDPATE : modificaciones del push code job --- .github/workflows/build-code.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/build-code.yml b/.github/workflows/build-code.yml index 71d3670..144ed1d 100644 --- a/.github/workflows/build-code.yml +++ b/.github/workflows/build-code.yml @@ -56,6 +56,11 @@ jobs: ref: gcp token: ${{ secrets.PERSONAL_ACCES_TOKEN }} path: terraform-cloud + + - name: Setup Terraform + uses: hashicorp/setup-terraform@v3 + with: + terraform_version: 1.6.6 - name: Set up Cloud SDK uses: google-github-actions/setup-gcloud@v3 From 12556bdf94cbfe49bf12571fa1b5b681602e54f7 Mon Sep 17 00:00:00 2001 From: code parce Date: Sat, 21 Feb 2026 22:29:20 -0500 Subject: [PATCH 16/17] DEVOPS : NEW : Implementacion de imagenes personalziadas --- .github/workflows/build-code.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-code.yml b/.github/workflows/build-code.yml index 144ed1d..cb14dba 100644 --- a/.github/workflows/build-code.yml +++ b/.github/workflows/build-code.yml @@ -30,6 +30,8 @@ jobs: push-code: name: Push Code runs-on: ubuntu-latest + container: + image: codeparce/ci-tools-gcloud:latest needs: [zip-code] env: VAULT_USER: ${{ secrets.VAULT_USER }} @@ -57,15 +59,15 @@ jobs: token: ${{ secrets.PERSONAL_ACCES_TOKEN }} path: terraform-cloud - - name: Setup Terraform - uses: hashicorp/setup-terraform@v3 - with: - terraform_version: 1.6.6 + # - name: Setup Terraform + # uses: hashicorp/setup-terraform@v3 + # with: + # terraform_version: 1.6.6 - - name: Set up Cloud SDK - uses: google-github-actions/setup-gcloud@v3 - with: - version: '>= 363.0.0' + # - name: Set up Cloud SDK + # uses: google-github-actions/setup-gcloud@v3 + # with: + # version: '>= 363.0.0' - name: Push zip to bucket run: | From 5eed4b0e9b4f0e5c5421bbd492d8f20dfb28dd74 Mon Sep 17 00:00:00 2001 From: code parce Date: Sun, 22 Feb 2026 18:13:05 -0500 Subject: [PATCH 17/17] DEVOPS : FIX : Correcion de nombres y archivos --- .github/workflows/build-functions.yml | 27 +++++ .../{build-code.yml => deploy-functions.yml} | 113 ++++++------------ .github/workflows/functions-gcp.yml | 19 --- .github/workflows/init-gcp.yml | 19 +++ 4 files changed, 85 insertions(+), 93 deletions(-) create mode 100644 .github/workflows/build-functions.yml rename .github/workflows/{build-code.yml => deploy-functions.yml} (50%) delete mode 100644 .github/workflows/functions-gcp.yml create mode 100644 .github/workflows/init-gcp.yml diff --git a/.github/workflows/build-functions.yml b/.github/workflows/build-functions.yml new file mode 100644 index 0000000..cc46863 --- /dev/null +++ b/.github/workflows/build-functions.yml @@ -0,0 +1,27 @@ +# .github/workflows/build-functions.yml + +on: + workflow_call: + + +jobs: + zip-code: + name: Zip Code + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: zip code + run: | + ls && cd function/ && zip -r functions.zip . -x "*test*" + + - name: Upload zip artifact + uses: actions/upload-artifact@v4 + with: + name: file.zip + path: function/functions.zip + retention-days: 1 + \ No newline at end of file diff --git a/.github/workflows/build-code.yml b/.github/workflows/deploy-functions.yml similarity index 50% rename from .github/workflows/build-code.yml rename to .github/workflows/deploy-functions.yml index cb14dba..589fea3 100644 --- a/.github/workflows/build-code.yml +++ b/.github/workflows/deploy-functions.yml @@ -1,74 +1,39 @@ -# .github/workflows/build-code.yml -name: Build code - - -on: - workflow_call: - - -jobs: - zip-code: - name: Zip Code - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: zip code - run: | - ls && cd function/ && zip -r functions.zip . -x "*test*" - - - name: Upload zip artifact - uses: actions/upload-artifact@v4 - with: - name: file.zip - path: function/functions.zip - retention-days: 1 - - push-code: - name: Push Code - runs-on: ubuntu-latest - container: - image: codeparce/ci-tools-gcloud:latest - needs: [zip-code] - env: - VAULT_USER: ${{ secrets.VAULT_USER }} - VAULT_PASS: ${{ secrets.VAULT_PASS }} - VAULT_ADDR: ${{ secrets.VAULT_ADDR }} - VAULT_NAMESPACE: ${{ secrets.VAULT_NAMESPACE }} - GITHUB_REPOSITORY_NAME: ${{ github.event.repository.name }} - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Download zip artifact - uses: actions/download-artifact@v4 - with: - name: file.zip - path: function - - - name: Clone terraform scripts repository - uses: actions/checkout@v4 - with: - repository: codeparceorg/terraform-cloud - ref: gcp - token: ${{ secrets.PERSONAL_ACCES_TOKEN }} - path: terraform-cloud - - # - name: Setup Terraform - # uses: hashicorp/setup-terraform@v3 - # with: - # terraform_version: 1.6.6 - - # - name: Set up Cloud SDK - # uses: google-github-actions/setup-gcloud@v3 - # with: - # version: '>= 363.0.0' - - - name: Push zip to bucket - run: | - mv function/functions.zip terraform-cloud/3-functions && cd terraform-cloud/3-functions && bash main.sh +# .github/workflows/deploy-functions.yml +on: + workflow_call: + +jobs: + tf-deploy: + name: Deploy GCP + runs-on: ubuntu-latest + container: + image: codeparce/ci-tools-gcloud:latest + env: + VAULT_USER: ${{ secrets.VAULT_USER }} + VAULT_PASS: ${{ secrets.VAULT_PASS }} + VAULT_ADDR: ${{ secrets.VAULT_ADDR }} + VAULT_NAMESPACE: ${{ secrets.VAULT_NAMESPACE }} + GITHUB_REPOSITORY_NAME: ${{ github.event.repository.name }} + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Download zip artifact + uses: actions/download-artifact@v4 + with: + name: file.zip + path: function + + - name: Clone terraform scripts repository + uses: actions/checkout@v4 + with: + repository: codeparceorg/terraform-cloud + ref: gcp + token: ${{ secrets.PERSONAL_ACCES_TOKEN }} + path: terraform-cloud + + - name: Push zip to bucket + run: | + mv function/functions.zip terraform-cloud/3-functions && cd terraform-cloud/3-functions && bash main.sh \ No newline at end of file diff --git a/.github/workflows/functions-gcp.yml b/.github/workflows/functions-gcp.yml deleted file mode 100644 index 66e270e..0000000 --- a/.github/workflows/functions-gcp.yml +++ /dev/null @@ -1,19 +0,0 @@ -# .github/workflows/functions-gcp.yml -permissions: - contents: read - -on: - workflow_call: - - -jobs: - functions: - name: Build code - uses: ./.github/workflows/build-code.yml - secrets: inherit - -# gcp-terraform: -# name: GCP -# uses: ./.github/workflows/gcp-arquitecture.yml -# secrets: inherit -# needs: [functions] diff --git a/.github/workflows/init-gcp.yml b/.github/workflows/init-gcp.yml new file mode 100644 index 0000000..1aa74d6 --- /dev/null +++ b/.github/workflows/init-gcp.yml @@ -0,0 +1,19 @@ +# .github/workflows/functions-gcp.yml +permissions: + contents: read + +on: + workflow_call: + + +jobs: + build: + name: Build + uses: ./.github/workflows/build-functions.yml + secrets: inherit + + gcp-terraform: + name: GCP + uses: ./.github/workflows/deploy-functions.yml + secrets: inherit + needs: [build]