From bd1a2d5747bf5c85dc32111e57275dced1c7f483 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Juan=20Rold=C3=A1n=20Manche=C3=B1o?= Date: Thu, 8 Jan 2026 09:45:31 +0100 Subject: [PATCH 01/17] initial commit GHA --- .github/workflows/test-and-composer.yaml | 61 ++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .github/workflows/test-and-composer.yaml diff --git a/.github/workflows/test-and-composer.yaml b/.github/workflows/test-and-composer.yaml new file mode 100644 index 0000000..0a79afb --- /dev/null +++ b/.github/workflows/test-and-composer.yaml @@ -0,0 +1,61 @@ +name: Test Sonarqube and Composer + +on: + workflow_dispatch: + push: + branches: + - '**' +env: + FOLDER: "dist" + foldersCache: "vendor/" + +jobs: + + test-sonarqube: + name: Test SonarQube Scan + uses: aplazame/.github/.github/workflows/test-reusable-sonarqube.yml@master + secrets: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + + test-composer: + name: Test Composer Install + runs-on: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/pro' || + github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'pro') + && vars.AWS_RG_NAME_PRO || vars.AWS_RG_NAME_NONPRO }} + steps: + - name: Checkout code + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 #v6.0.1 + with: + fetch-depth: 0 + + - name: Set up PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '5.3' + extensions: mbstring, intl, xml, curl, zip, json + tools: composer:v1 + + - name: Get cache + env: + s3Path: s3://aplazameshared-jenkins-cache/Aplazame-Public/magento/v1-dependencies-${{ github.sha }}.tar.gz + run: | + set -e + aws s3 cp --quiet ${s3Path} cache.tar.gz || exit 0 + [ -f cache.tar.gz ] && tar -xf cache.tar.gz + aws s3 cp --quiet s3://aplazameshared-jenkins-cache/Aplazame-Public/magento/v1-dependencies-${{ github.sha }}.tar.gz cache.tar.gz + + - name: Composer Install + run: composer install --prefer-dist + + - name: Make Styleci happy + run: make style + + - name: Cache Composer dependencies + env: + foldersStr: '.' + s3Path: s3://aplazameshared-jenkins-cache/Aplazame-Public/magento/v1-dependencies-${{ github.sha }}.tar.gz + run: | + set -e + MATCHES=$(aws s3 ls ${s3Path} | wc -l) + [ "$MATCHES" = "0" ] && [ ! -f cache.tar.gz ] && tar -czf cache.tar.gz ${foldersStr} && aws s3 cp --quiet cache.tar.gz ${s3Path} + exit 0 \ No newline at end of file From 0f11cdd261b0e8b479d9e67d1fec24d4378f9da0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Juan=20Rold=C3=A1n=20Manche=C3=B1o?= Date: Mon, 12 Jan 2026 13:19:31 +0100 Subject: [PATCH 02/17] test --- .github/workflows/test-and-composer.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-and-composer.yaml b/.github/workflows/test-and-composer.yaml index 0a79afb..a82c4d1 100644 --- a/.github/workflows/test-and-composer.yaml +++ b/.github/workflows/test-and-composer.yaml @@ -58,4 +58,6 @@ jobs: set -e MATCHES=$(aws s3 ls ${s3Path} | wc -l) [ "$MATCHES" = "0" ] && [ ! -f cache.tar.gz ] && tar -czf cache.tar.gz ${foldersStr} && aws s3 cp --quiet cache.tar.gz ${s3Path} - exit 0 \ No newline at end of file + exit 0 + + \ No newline at end of file From e2faa78f3005556b8e0791a71f391bb79e5b2536 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Juan=20Rold=C3=A1n=20Manche=C3=B1o?= Date: Tue, 13 Jan 2026 12:22:59 +0100 Subject: [PATCH 03/17] test2 --- .github/workflows/test-and-composer.yaml | 2 +- .github/workflows/test-reusable-sonarqube.yml | 26 +++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/test-reusable-sonarqube.yml diff --git a/.github/workflows/test-and-composer.yaml b/.github/workflows/test-and-composer.yaml index a82c4d1..ec700c1 100644 --- a/.github/workflows/test-and-composer.yaml +++ b/.github/workflows/test-and-composer.yaml @@ -13,7 +13,7 @@ jobs: test-sonarqube: name: Test SonarQube Scan - uses: aplazame/.github/.github/workflows/test-reusable-sonarqube.yml@master + uses: aplazame/magento/.github/workflows/test-reusable-sonarqube.yml@master secrets: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/.github/workflows/test-reusable-sonarqube.yml b/.github/workflows/test-reusable-sonarqube.yml new file mode 100644 index 0000000..dc1c5a1 --- /dev/null +++ b/.github/workflows/test-reusable-sonarqube.yml @@ -0,0 +1,26 @@ +name: Test SonarQube Scan +on: + workflow_call: + secrets: + SONAR_TOKEN: + description: "Token for SonarQube" + required: true + + +jobs: + test-sonarqube: + name: Test SonarQube Scan + runs-on: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/pro' || + github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'pro') + && vars.AWS_RG_NAME_PRO || vars.AWS_RG_NAME_NONPRO }} + steps: + - name: Checkout code + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 #v6.0.1 + with: + fetch-depth: 0 + + - name: SonarQube Scan + uses: SonarSource/sonarqube-scan-action@a31c9398be7ace6bbfaf30c0bd5d415f843d45e9 #v7.0.0 + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + #SONAR_HOST_URL: ${{ vars.SONAR_HOST_URL }} \ No newline at end of file From acf5666aaf43bf4d3819017f7c591098c2064899 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Juan=20Rold=C3=A1n=20Manche=C3=B1o?= Date: Tue, 13 Jan 2026 12:25:54 +0100 Subject: [PATCH 04/17] test3 --- .github/workflows/test-and-composer.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-and-composer.yaml b/.github/workflows/test-and-composer.yaml index ec700c1..987e9bc 100644 --- a/.github/workflows/test-and-composer.yaml +++ b/.github/workflows/test-and-composer.yaml @@ -13,7 +13,7 @@ jobs: test-sonarqube: name: Test SonarQube Scan - uses: aplazame/magento/.github/workflows/test-reusable-sonarqube.yml@master + uses: ./.github/workflows/test-reusable-sonarqube.yml secrets: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} From 9134e46747a958d7fe4833389fcc23863d5e04cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Juan=20Rold=C3=A1n=20Manche=C3=B1o?= Date: Tue, 13 Jan 2026 17:29:40 +0100 Subject: [PATCH 05/17] test --- .github/workflows/test-and-composer.yaml | 4 ++-- .github/workflows/test-reusable-sonarqube.yml | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test-and-composer.yaml b/.github/workflows/test-and-composer.yaml index 987e9bc..74dbdcb 100644 --- a/.github/workflows/test-and-composer.yaml +++ b/.github/workflows/test-and-composer.yaml @@ -20,8 +20,8 @@ jobs: test-composer: name: Test Composer Install runs-on: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/pro' || - github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'pro') - && vars.AWS_RG_NAME_PRO || vars.AWS_RG_NAME_NONPRO }} + github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'pro') + && vars.AWS_RG_NAME_PRO || vars.AWS_RG_NAME_NONPRO }} steps: - name: Checkout code uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 #v6.0.1 diff --git a/.github/workflows/test-reusable-sonarqube.yml b/.github/workflows/test-reusable-sonarqube.yml index dc1c5a1..4101a41 100644 --- a/.github/workflows/test-reusable-sonarqube.yml +++ b/.github/workflows/test-reusable-sonarqube.yml @@ -11,8 +11,8 @@ jobs: test-sonarqube: name: Test SonarQube Scan runs-on: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/pro' || - github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'pro') - && vars.AWS_RG_NAME_PRO || vars.AWS_RG_NAME_NONPRO }} + github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'pro') + && vars.AWS_RG_NAME_PRO || vars.AWS_RG_NAME_NONPRO }} steps: - name: Checkout code uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 #v6.0.1 @@ -23,4 +23,6 @@ jobs: uses: SonarSource/sonarqube-scan-action@a31c9398be7ace6bbfaf30c0bd5d415f843d45e9 #v7.0.0 env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - #SONAR_HOST_URL: ${{ vars.SONAR_HOST_URL }} \ No newline at end of file + #SONAR_HOST_URL: ${{ vars.SONAR_HOST_URL }} + +#prueba \ No newline at end of file From b4e9a7c932188383f062c88b2431ff8a264d89e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Juan=20Rold=C3=A1n=20Manche=C3=B1o?= Date: Wed, 14 Jan 2026 11:35:31 +0100 Subject: [PATCH 06/17] php upgrade --- .github/workflows/test-and-composer.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-and-composer.yaml b/.github/workflows/test-and-composer.yaml index 74dbdcb..c9cf6a7 100644 --- a/.github/workflows/test-and-composer.yaml +++ b/.github/workflows/test-and-composer.yaml @@ -31,7 +31,7 @@ jobs: - name: Set up PHP uses: shivammathur/setup-php@v2 with: - php-version: '5.3' + php-version: '5.6' extensions: mbstring, intl, xml, curl, zip, json tools: composer:v1 From 139bb783ce0b81c1e033f6ef2192c002c819b131 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Juan=20Rold=C3=A1n=20Manche=C3=B1o?= Date: Wed, 14 Jan 2026 11:55:16 +0100 Subject: [PATCH 07/17] fix 0.1 --- .github/workflows/test-and-composer.yaml | 10 +++++++--- .github/workflows/test-reusable-sonarqube.yml | 4 +--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test-and-composer.yaml b/.github/workflows/test-and-composer.yaml index c9cf6a7..0a3275d 100644 --- a/.github/workflows/test-and-composer.yaml +++ b/.github/workflows/test-and-composer.yaml @@ -9,19 +9,23 @@ env: FOLDER: "dist" foldersCache: "vendor/" +permissions: + contents: read + id-token: write + jobs: test-sonarqube: name: Test SonarQube Scan uses: ./.github/workflows/test-reusable-sonarqube.yml secrets: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_TOKEN: ${{ secrets.WZ_SONAR_TOKEN }} test-composer: name: Test Composer Install runs-on: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/pro' || - github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'pro') - && vars.AWS_RG_NAME_PRO || vars.AWS_RG_NAME_NONPRO }} + github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'pro') + && vars.AWS_RG_NAME_PRO || vars.AWS_RG_NAME_NONPRO }} steps: - name: Checkout code uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 #v6.0.1 diff --git a/.github/workflows/test-reusable-sonarqube.yml b/.github/workflows/test-reusable-sonarqube.yml index 4101a41..3662507 100644 --- a/.github/workflows/test-reusable-sonarqube.yml +++ b/.github/workflows/test-reusable-sonarqube.yml @@ -23,6 +23,4 @@ jobs: uses: SonarSource/sonarqube-scan-action@a31c9398be7ace6bbfaf30c0bd5d415f843d45e9 #v7.0.0 env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - #SONAR_HOST_URL: ${{ vars.SONAR_HOST_URL }} - -#prueba \ No newline at end of file + #SONAR_HOST_URL: ${{ vars.SONAR_HOST_URL }} \ No newline at end of file From c68eef1954fc6c2652b831dd3f170d938bd072c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Juan=20Rold=C3=A1n=20Manche=C3=B1o?= Date: Wed, 14 Jan 2026 12:07:16 +0100 Subject: [PATCH 08/17] upgrade composer v2 --- .github/workflows/test-and-composer.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-and-composer.yaml b/.github/workflows/test-and-composer.yaml index 0a3275d..8d7883e 100644 --- a/.github/workflows/test-and-composer.yaml +++ b/.github/workflows/test-and-composer.yaml @@ -37,7 +37,7 @@ jobs: with: php-version: '5.6' extensions: mbstring, intl, xml, curl, zip, json - tools: composer:v1 + tools: composer:v2 - name: Get cache env: From 08e6008407a5a3a486e969877b3a56469172286d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Juan=20Rold=C3=A1n=20Manche=C3=B1o?= Date: Wed, 14 Jan 2026 12:13:36 +0100 Subject: [PATCH 09/17] final test --- .github/workflows/test-and-composer.yaml | 1 + sonar-scanner.properties => sonar-project.properties | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) rename sonar-scanner.properties => sonar-project.properties (94%) diff --git a/.github/workflows/test-and-composer.yaml b/.github/workflows/test-and-composer.yaml index 8d7883e..c02e11f 100644 --- a/.github/workflows/test-and-composer.yaml +++ b/.github/workflows/test-and-composer.yaml @@ -23,6 +23,7 @@ jobs: test-composer: name: Test Composer Install + needs: test-sonarqube runs-on: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/pro' || github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'pro') && vars.AWS_RG_NAME_PRO || vars.AWS_RG_NAME_NONPRO }} diff --git a/sonar-scanner.properties b/sonar-project.properties similarity index 94% rename from sonar-scanner.properties rename to sonar-project.properties index ba101f5..c11d093 100644 --- a/sonar-scanner.properties +++ b/sonar-project.properties @@ -4,7 +4,7 @@ sonar.projectVersion=1.0 sonar.projectBaseDir=/usr/src sonar.python.coverage.reportPaths=/src/coverage.xml sonar.host.url=https://sonarqube.aplazame.org/ -sonar.password= +#sonar.password= sonar.ws.timeout=600 sonar.log.level=DEBUG ActiveQualityGate=false From d6a8472eea4e5c93748ad5a1dd800b60bae37b0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Juan=20Rold=C3=A1n=20Manche=C3=B1o?= Date: Wed, 14 Jan 2026 12:42:01 +0100 Subject: [PATCH 10/17] add AWS CLI --- .github/workflows/test-and-composer.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/test-and-composer.yaml b/.github/workflows/test-and-composer.yaml index c02e11f..2dd1b34 100644 --- a/.github/workflows/test-and-composer.yaml +++ b/.github/workflows/test-and-composer.yaml @@ -8,6 +8,8 @@ on: env: FOLDER: "dist" foldersCache: "vendor/" + AWS_REGION: 'eu-central-1' + AWS_ACCOUNT: '666356151544' permissions: contents: read @@ -39,7 +41,29 @@ jobs: php-version: '5.6' extensions: mbstring, intl, xml, curl, zip, json tools: composer:v2 + + - name: Install AWS CLI + run: | + sudo apt-get install unzip curl -y + curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" + unzip awscliv2.zip + sudo ./aws/install --update + aws --version + - name: Configure aws credentials + uses: aws-actions/configure-aws-credentials@61815dcd50bd041e203e49132bacad1fd04d2708 #v5.1.1 + with: + role-to-assume: ${{ env.ROLE_OIDC }} + role-session-name: ${{ github.run_id }} + aws-region: ${{ vars.WZ_OIDC_AWS_REGION }} + + - name: Login to Amazon ECR + id: ecrlogin + uses: aws-actions/amazon-ecr-login@062b18b96a7aff071d4dc91bc00c4c1a7945b076 #V2 + with: + registries: ${{ env.AWS_ACCOUNT }} + + - name: Get cache env: s3Path: s3://aplazameshared-jenkins-cache/Aplazame-Public/magento/v1-dependencies-${{ github.sha }}.tar.gz From e602e2e49f64cf5940af6b35a7dbd98713247c9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Juan=20Rold=C3=A1n=20Manche=C3=B1o?= Date: Wed, 14 Jan 2026 17:26:57 +0100 Subject: [PATCH 11/17] change pro by master --- .github/workflows/test-and-composer.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-and-composer.yaml b/.github/workflows/test-and-composer.yaml index 2dd1b34..ce0a5c5 100644 --- a/.github/workflows/test-and-composer.yaml +++ b/.github/workflows/test-and-composer.yaml @@ -26,8 +26,8 @@ jobs: test-composer: name: Test Composer Install needs: test-sonarqube - runs-on: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/pro' || - github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'pro') + runs-on: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/master' || + github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'master') && vars.AWS_RG_NAME_PRO || vars.AWS_RG_NAME_NONPRO }} steps: - name: Checkout code From 98e9c1af3a3ff7067e68be8f0b66958f4feabeb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Juan=20Rold=C3=A1n=20Manche=C3=B1o?= Date: Thu, 15 Jan 2026 08:47:15 +0100 Subject: [PATCH 12/17] change pro by master --- .github/workflows/test-reusable-sonarqube.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-reusable-sonarqube.yml b/.github/workflows/test-reusable-sonarqube.yml index 3662507..26614ba 100644 --- a/.github/workflows/test-reusable-sonarqube.yml +++ b/.github/workflows/test-reusable-sonarqube.yml @@ -10,8 +10,8 @@ on: jobs: test-sonarqube: name: Test SonarQube Scan - runs-on: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/pro' || - github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'pro') + runs-on: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/master' || + github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'master') && vars.AWS_RG_NAME_PRO || vars.AWS_RG_NAME_NONPRO }} steps: - name: Checkout code From c9ae07f12697ca16c4033a2704c09b5a1486fd5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Juan=20Rold=C3=A1n=20Manche=C3=B1o?= Date: Thu, 15 Jan 2026 12:34:00 +0100 Subject: [PATCH 13/17] rm Jenkinsfile and manifests --- Jenkinsfile | 79 -------------------------------------- jenkins/jenkins-sonar.yaml | 20 ---------- jenkins/php.yaml | 24 ------------ 3 files changed, 123 deletions(-) delete mode 100644 Jenkinsfile delete mode 100644 jenkins/jenkins-sonar.yaml delete mode 100644 jenkins/php.yaml diff --git a/Jenkinsfile b/Jenkinsfile deleted file mode 100644 index 86c3732..0000000 --- a/Jenkinsfile +++ /dev/null @@ -1,79 +0,0 @@ -library "aplazame-shared-library" - -pipeline { - agent { - kubernetes { - yamlFile "/jenkins/php.yaml" - } - } - environment { - FOLDER = "dist" - foldersCache = '"vendor/"' - } - options { - disableConcurrentBuilds() - ansiColor('xterm') - } - stages { - stage('Test Sonarqube') { - when { - not { - tag "*" - } - beforeAgent true - } - agent { - kubernetes { - yamlFile "/jenkins/jenkins-sonar.yaml" - } - } - environment { - SONAR_TEST = credentials('SONAR_TEST') - CODE_SOURCE_DEFAULT = "extension" - } - steps { - scmSkip() - container('sonar') { - sonarScan(SONAR_TEST,CODE_SOURCE_DEFAULT) - } - } - } - stage("Get cache") { - steps { - script { - HASH = sh(script: 'md5sum composer.json | awk \'{print \$1}\'', returnStdout: true).trim() - CACHE_KEY = 'v1-dependencies-' + HASH - - container('php') { - loadCache(CACHE_KEY) - } - } - } - } - stage("Composer Install") { - steps { - container('php') { - sh """ - composer install -n --prefer-dist - """ - } - } - } - stage("Upload Cache") { - steps { - container('php') { - saveCache(CACHE_KEY,["${foldersCache}"]) - } - } - } - stage("CS Style") { - steps { - container('php') { - sh """ - make style - """ - } - } - } - } -} \ No newline at end of file diff --git a/jenkins/jenkins-sonar.yaml b/jenkins/jenkins-sonar.yaml deleted file mode 100644 index f1ca81e..0000000 --- a/jenkins/jenkins-sonar.yaml +++ /dev/null @@ -1,20 +0,0 @@ ---- -apiVersion: v1 -kind: Pod -metadata: - name: apptest -spec: - serviceAccountName: aplazame-appdeployer - serviceAccount: aplazame-appdeployer - securityContext: - fsGroup: 1000 - containers: - - name: sonar - image: 666356151544.dkr.ecr.eu-central-1.amazonaws.com/tools/sonar-scanner:4.6.2.2472_2 - imagePullPolicy: Always - tty: true - resources: - limits: - cpu: 1 - memory: 3Gi - restartPolicy: Never \ No newline at end of file diff --git a/jenkins/php.yaml b/jenkins/php.yaml deleted file mode 100644 index d639d78..0000000 --- a/jenkins/php.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: -spec: - serviceAccountName: aplazame-appdeployer - serviceAccount: aplazame-appdeployer - securityContext: - fsGroup: 1000 - containers: - - name: php - image: 666356151544.dkr.ecr.eu-central-1.amazonaws.com/thirdparty/php:7.3.9_v5 - imagePullPolicy: Always - command: - - cat - tty: true - resources: - requests: - #memory: 200Mi - memory: 2Gi - cpu: 200m - limits: - #memory: 450Mi - memory: 4Gi - cpu: 500m \ No newline at end of file From 5130821773347fe770fea9342257d26d61e539a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Juan=20Rold=C3=A1n=20Manche=C3=B1o?= Date: Mon, 19 Jan 2026 09:00:11 +0100 Subject: [PATCH 14/17] change Get Cache --- .github/workflows/test-and-composer.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-and-composer.yaml b/.github/workflows/test-and-composer.yaml index ce0a5c5..3008282 100644 --- a/.github/workflows/test-and-composer.yaml +++ b/.github/workflows/test-and-composer.yaml @@ -84,9 +84,9 @@ jobs: foldersStr: '.' s3Path: s3://aplazameshared-jenkins-cache/Aplazame-Public/magento/v1-dependencies-${{ github.sha }}.tar.gz run: | - set -e - MATCHES=$(aws s3 ls ${s3Path} | wc -l) - [ "$MATCHES" = "0" ] && [ ! -f cache.tar.gz ] && tar -czf cache.tar.gz ${foldersStr} && aws s3 cp --quiet cache.tar.gz ${s3Path} - exit 0 + set -e + aws s3 cp --quiet ${s3Path} cache.tar.gz --profile AplazameSharedServices || exit 0 + [ -f cache.tar.gz ] && tar -xf cache.tar.gz + aws s3 cp --quiet ${s3Path} cache.tar.gz --profile AplazameSharedServices \ No newline at end of file From 7953d00b06a9f9e72d8267137f60109cf9a75c30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Juan=20Rold=C3=A1n=20Manche=C3=B1o?= Date: Mon, 19 Jan 2026 09:06:02 +0100 Subject: [PATCH 15/17] fix role for get cahe --- .github/workflows/test-and-composer.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test-and-composer.yaml b/.github/workflows/test-and-composer.yaml index 3008282..9ccfc7d 100644 --- a/.github/workflows/test-and-composer.yaml +++ b/.github/workflows/test-and-composer.yaml @@ -53,7 +53,7 @@ jobs: - name: Configure aws credentials uses: aws-actions/configure-aws-credentials@61815dcd50bd041e203e49132bacad1fd04d2708 #v5.1.1 with: - role-to-assume: ${{ env.ROLE_OIDC }} + role-to-assume: ${{ vars.AWS_OIDC_ROLE_TF_PRO }} role-session-name: ${{ github.run_id }} aws-region: ${{ vars.WZ_OIDC_AWS_REGION }} @@ -84,9 +84,9 @@ jobs: foldersStr: '.' s3Path: s3://aplazameshared-jenkins-cache/Aplazame-Public/magento/v1-dependencies-${{ github.sha }}.tar.gz run: | - set -e - aws s3 cp --quiet ${s3Path} cache.tar.gz --profile AplazameSharedServices || exit 0 - [ -f cache.tar.gz ] && tar -xf cache.tar.gz - aws s3 cp --quiet ${s3Path} cache.tar.gz --profile AplazameSharedServices + set -e + MATCHES=$(aws s3 ls ${s3Path} | wc -l) + [ "$MATCHES" = "0" ] && [ ! -f cache.tar.gz ] && tar -czf cache.tar.gz ${foldersStr} && aws s3 cp --quiet cache.tar.gz ${s3Path} + exit 0 \ No newline at end of file From 48bfeef7e63bbcf84795e529228b3d137380c87a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Juan=20Rold=C3=A1n=20Manche=C3=B1o?= Date: Mon, 19 Jan 2026 09:35:13 +0100 Subject: [PATCH 16/17] fix role and steps --- .github/workflows/test-and-composer.yaml | 103 ++++++++++------------- 1 file changed, 46 insertions(+), 57 deletions(-) diff --git a/.github/workflows/test-and-composer.yaml b/.github/workflows/test-and-composer.yaml index 9ccfc7d..d97b30e 100644 --- a/.github/workflows/test-and-composer.yaml +++ b/.github/workflows/test-and-composer.yaml @@ -16,7 +16,6 @@ permissions: id-token: write jobs: - test-sonarqube: name: Test SonarQube Scan uses: ./.github/workflows/test-reusable-sonarqube.yml @@ -26,67 +25,57 @@ jobs: test-composer: name: Test Composer Install needs: test-sonarqube - runs-on: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/master' || - github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'master') - && vars.AWS_RG_NAME_PRO || vars.AWS_RG_NAME_NONPRO }} + runs-on: ${{ vars.AWS_RG_NAME_PRO }} steps: - - name: Checkout code - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 #v6.0.1 - with: - fetch-depth: 0 - - - name: Set up PHP - uses: shivammathur/setup-php@v2 - with: - php-version: '5.6' - extensions: mbstring, intl, xml, curl, zip, json - tools: composer:v2 + - name: Checkout code + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 #v6.0.1 + with: + fetch-depth: 0 - - name: Install AWS CLI - run: | - sudo apt-get install unzip curl -y - curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" - unzip awscliv2.zip - sudo ./aws/install --update - aws --version + - name: Set up PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '5.6' + extensions: mbstring, intl, xml, curl, zip, json + tools: composer:v2 - - name: Configure aws credentials - uses: aws-actions/configure-aws-credentials@61815dcd50bd041e203e49132bacad1fd04d2708 #v5.1.1 - with: - role-to-assume: ${{ vars.AWS_OIDC_ROLE_TF_PRO }} - role-session-name: ${{ github.run_id }} - aws-region: ${{ vars.WZ_OIDC_AWS_REGION }} - - - name: Login to Amazon ECR - id: ecrlogin - uses: aws-actions/amazon-ecr-login@062b18b96a7aff071d4dc91bc00c4c1a7945b076 #V2 - with: - registries: ${{ env.AWS_ACCOUNT }} - + - name: Install AWS CLI + run: | + sudo apt-get install unzip zip curl -y + curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" + unzip awscliv2.zip + sudo ./aws/install --update + aws --version + + - name: Configure aws credentials + uses: aws-actions/configure-aws-credentials@61815dcd50bd041e203e49132bacad1fd04d2708 #v5.1.1 + with: + role-to-assume: ${{ vars.AWS_OIDC_ROLE_TF_PRO }} + role-session-name: ${{ github.run_id }} + aws-region: ${{ vars.WZ_OIDC_AWS_REGION }} - - name: Get cache - env: - s3Path: s3://aplazameshared-jenkins-cache/Aplazame-Public/magento/v1-dependencies-${{ github.sha }}.tar.gz - run: | - set -e - aws s3 cp --quiet ${s3Path} cache.tar.gz || exit 0 - [ -f cache.tar.gz ] && tar -xf cache.tar.gz - aws s3 cp --quiet s3://aplazameshared-jenkins-cache/Aplazame-Public/magento/v1-dependencies-${{ github.sha }}.tar.gz cache.tar.gz + - name: Get cache + env: + s3Path: s3://aplazameshared-jenkins-cache/Aplazame-Public/magento/v1-dependencies-${{ github.sha }}.tar.gz + run: | + set -e + aws s3 cp --quiet ${s3Path} cache.tar.gz --profile AplazameSharedServices || exit 0 + [ -f cache.tar.gz ] && tar -xf cache.tar.gz + aws s3 cp --quiet ${s3Path} cache.tar.gz --profile AplazameSharedServices - - name: Composer Install - run: composer install --prefer-dist + - name: Composer Install + run: composer install --prefer-dist - - name: Make Styleci happy - run: make style + - name: Make Styleci happy + run: make style - - name: Cache Composer dependencies - env: - foldersStr: '.' - s3Path: s3://aplazameshared-jenkins-cache/Aplazame-Public/magento/v1-dependencies-${{ github.sha }}.tar.gz - run: | - set -e - MATCHES=$(aws s3 ls ${s3Path} | wc -l) - [ "$MATCHES" = "0" ] && [ ! -f cache.tar.gz ] && tar -czf cache.tar.gz ${foldersStr} && aws s3 cp --quiet cache.tar.gz ${s3Path} - exit 0 + - name: Cache Composer dependencies + env: + s3Path: s3://aplazameshared-jenkins-cache/Aplazame-Public/magento/v1-dependencies-${{ github.sha }}.tar.gz + run: | + set -e + MATCHES=$(aws s3 ls ${s3Path} --profile AplazameSharedServices| wc -l) + [ "$MATCHES" = "0" ] && [ ! -f cache.tar.gz ] && tar -czf cache.tar.gz ${foldersCache} && aws s3 cp --quiet cache.tar.gz ${s3Path} --profile AplazameSharedServices + exit 0 - \ No newline at end of file + \ No newline at end of file From f7d2599898631f7e05a194472b01ec2e2ad35f18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Juan=20Rold=C3=A1n=20Manche=C3=B1o?= Date: Tue, 20 Jan 2026 16:09:04 +0100 Subject: [PATCH 17/17] reorganize workflow --- .github/workflows/test-and-composer.yaml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test-and-composer.yaml b/.github/workflows/test-and-composer.yaml index d97b30e..acfddb2 100644 --- a/.github/workflows/test-and-composer.yaml +++ b/.github/workflows/test-and-composer.yaml @@ -66,10 +66,7 @@ jobs: - name: Composer Install run: composer install --prefer-dist - - name: Make Styleci happy - run: make style - - - name: Cache Composer dependencies + - name: Upload Cache env: s3Path: s3://aplazameshared-jenkins-cache/Aplazame-Public/magento/v1-dependencies-${{ github.sha }}.tar.gz run: | @@ -78,4 +75,5 @@ jobs: [ "$MATCHES" = "0" ] && [ ! -f cache.tar.gz ] && tar -czf cache.tar.gz ${foldersCache} && aws s3 cp --quiet cache.tar.gz ${s3Path} --profile AplazameSharedServices exit 0 - \ No newline at end of file + - name: Make Styleci happy + run: make style \ No newline at end of file