Repository navigation
DTT-GHA #100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
DTT-GHA #100
Changes from 63 commits
Commits
Show all changes
64 commits
Select commit
Hold shift + click to select a range
b74ec33
initial commit gha
ARoldan-wz da890c6
test1
ARoldan-wz fa90936
fix 1.0
ARoldan-wz b661ac9
remove load-config
ARoldan-wz 0c5d4f7
change pro by master
ARoldan-wz 76782b8
fix gha
ARoldan-wz f756279
coment AWS_PROFILE
ARoldan-wz 5bf49b8
remove comments
ARoldan-wz bb2649b
change folder deploy
ARoldan-wz 3cd2049
fix gha
ARoldan-wz 274df58
fix Create bundle
ARoldan-wz 7ffb9a9
fix folderCache
ARoldan-wz 161a0b8
fix gha
ARoldan-wz ac7a469
add image php for load-config
ARoldan-wz 11a5a23
steps
ARoldan-wz 422afd9
steps 2
ARoldan-wz f284f5e
refactor 1.0
ARoldan-wz f27cb3a
refactor 1.1
ARoldan-wz 24a63ae
add container php image
ARoldan-wz 30b1c26
fix add container php image
ARoldan-wz efec60b
fix add image container php
ARoldan-wz 78d6649
add imagen to job
ARoldan-wz 13431d9
test2
ARoldan-wz bddd434
add OICD
ARoldan-wz 265e3a3
only pro
ARoldan-wz 32ebcf6
Update sonar-and-test-S3.yaml
adrianmartin23 f1ccdf6
Update sonar-and-test-S3.yaml
adrianmartin23 5793d75
Update sonar-and-test-S3.yaml
adrianmartin23 1ecb618
Update sonar-and-test-S3.yaml
adrianmartin23 e6cf161
Update test-reusable-sonarqube.yml
adrianmartin23 6d91594
Update sonar-and-test-S3.yaml
adrianmartin23 13d78a8
Update sonar-and-test-S3.yaml
adrianmartin23 5bef3b7
Update sonar-and-test-S3.yaml
adrianmartin23 d0e3e76
Update sonar-and-test-S3.yaml
adrianmartin23 487ac3b
Update sonar-and-test-S3.yaml
adrianmartin23 3a63857
Update sonar-and-test-S3.yaml
adrianmartin23 fe79143
Update sonar-and-test-S3.yaml
adrianmartin23 e832d89
Update sonar-and-test-S3.yaml
adrianmartin23 6165b9b
Update sonar-and-test-S3.yaml
adrianmartin23 a8aa1f1
Update sonar-and-test-S3.yaml
adrianmartin23 0841eb2
install zip
ARoldan-wz 72fe116
rm Jenkinfile and manifests
ARoldan-wz 66f3288
clean env var
ARoldan-wz fbb20bb
add Create Github Release
ARoldan-wz 2c484dc
fix
ARoldan-wz 971c034
install gh
ARoldan-wz 9cd7f83
gh login
ARoldan-wz c722db2
fix
ARoldan-wz 43e70b3
fix2
ARoldan-wz c4fdbf6
change login gh
ARoldan-wz f8b51e2
fix3
ARoldan-wz 5768450
fix GH_TOKEN
ARoldan-wz eb5e8b0
catch version makefile
ARoldan-wz 3a693b5
fix gh --notes
ARoldan-wz 4550177
manual approve added
ARoldan-wz 6194d79
add 'environment'
ARoldan-wz 4468739
issue
ARoldan-wz dc82544
remove environment
ARoldan-wz f3bfce6
remove action
ARoldan-wz c448c06
added changes
ARoldan-wz 8531738
remove comment sonar
ARoldan-wz cdabd22
fix
ARoldan-wz 1be62a2
cambios implementados
ARoldan-wz 8107cec
remove branch workflow
ARoldan-wz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,129 @@ | ||
| name: Test Sonarqube Composer and S3 | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| push: | ||
| branches: | ||
| - '**' | ||
| env: | ||
| FOLDER: "dist" | ||
| foldersCache: "vendor/" | ||
| CODE_SOURCE_DEFAULT: "aplazame" | ||
| AWS_REGION: 'eu-central-1' | ||
| AWS_ACCOUNT: '666356151544' | ||
|
|
||
|
|
||
| permissions: | ||
| contents: read | ||
| id-token: write | ||
| issues: write | ||
|
|
||
| jobs: | ||
| test-sonarqube: | ||
| name: Test SonarQube Scan | ||
| uses: ./.github/workflows/test-reusable-sonarqube.yml | ||
| secrets: | ||
| SONAR_TOKEN: ${{ secrets.WZ_SONAR_TOKEN }} | ||
|
|
||
| test-composer: | ||
| name: Test Composer Install | ||
| needs: test-sonarqube | ||
| 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: 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-Backend/prestashop/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 | ||
|
|
||
| - name: Composer Install | ||
| run: composer install --prefer-dist | ||
|
|
||
| - name: Upload cache | ||
| env: | ||
| s3Path: s3://aplazameshared-jenkins-cache/Aplazame-Backend/prestashop/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 | ||
|
|
||
| - name: Check syntax | ||
| run: make syntax.checker | ||
|
|
||
| - name: CS Style | ||
| if: github.ref == 'refs/heads/master' | ||
| run: make style | ||
|
|
||
| - name: Create Bundle | ||
|
adrianmartin23 marked this conversation as resolved.
|
||
| if: github.ref == 'refs/heads/master' | ||
| run: | | ||
| sudo apt update && sudo apt install zip -y | ||
| make zip | ||
|
|
||
| - name: Await Manual Approval | ||
| if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | ||
| uses: trstringer/manual-approval@v1 | ||
| with: | ||
| secret: ${{ github.token }} | ||
| minimum-approvals: 1 | ||
| approvers: 'alexhernandezord' | ||
| timeout-minutes: 10 | ||
| issue-title: "Manual Approval Required for Release" | ||
| issue-body: "Please approve or deny the deploy." | ||
|
|
||
| - name: Deploy to S3 | ||
|
adrianmartin23 marked this conversation as resolved.
|
||
| if: github.ref == 'refs/heads/master' | ||
| run: | | ||
|
adrianmartin23 marked this conversation as resolved.
|
||
| aws s3 cp --acl public-read aplazame.latest.zip s3://aplazame/modules/prestashop/ --profile Aplazame | ||
|
|
||
| - name: Await Manual Approval | ||
| if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | ||
| uses: trstringer/manual-approval@v1 | ||
| with: | ||
| secret: ${{ github.token }} | ||
| minimum-approvals: 1 | ||
| approvers: 'alexhernandezord' | ||
| timeout-minutes: 10 | ||
| issue-title: "Manual Approval Required for Github Release" | ||
| issue-body: "Please approve or deny the deploy." | ||
|
|
||
| - name: Create GitHub Release | ||
|
adrianmartin23 marked this conversation as resolved.
|
||
| if: github.ref == 'refs/heads/master' | ||
| env: | ||
| GH_TOKEN: ${{ secrets.AP_GH_RELEASE_TOKEN_OLD }} | ||
| run: | | ||
| sudo apt-get install gh -y | ||
| echo "***************Create Release***************" | ||
| APP_VERSION=$(grep "^version" Makefile | awk -F= '{print $2}' | xargs) | ||
| echo "$APP_VERSION" | ||
| gh release create "$APP_VERSION" --notes "Release created by GitHub Actions" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| 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: ${{ vars.AWS_RG_NAME_PRO }} | ||
| 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 }} | ||
|
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No está bien