-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathazure-pipelines-test.yml
More file actions
67 lines (62 loc) · 3 KB
/
azure-pipelines-test.yml
File metadata and controls
67 lines (62 loc) · 3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
parameters:
- name: stage
displayName: Stage
type: string
values:
- Stage_1
- Stage_2
resources:
pipelines:
- pipeline: Another_project-CI
source: Another_project-CI
project: Another_project
trigger:
stages:
- ${{ parameters.stage }}
stages:
- stage: Build
jobs:
- job: Testing
displayName: Test the checks
workspace:
clean: all
steps:
- task: PowerShell@2
displayName: Test task
inputs:
targetType: 'inline'
script: |
Write-Host "Triggered by BuildTriggeredByDefinitionName - $(Build.TriggeredBy.DefinitionName)"
# - stage: DeployEnv
# condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
# jobs:
# - deployment: DeployEnv
# displayName: Deploy code
# environment:
# name: magento_local
# resourceType: VirtualMachine
# strategy:
# runOnce:
# deploy:
# steps:
# - task: CmdLine@2
# displayName: "Deploy script"
# inputs:
# script: |
# cd /home/vagrant/${{ parameters.branch }}/magento-base
# [[ "${{ parameters.branch }}" == "a11y" ]] && git checkout UserStory-accessibility-epam
# if [[ "${{ parameters.branch }}" == "jp" ]]; then git checkout jp/dev; cd packages/magento2-jp; git checkout dev/magento-2.4.2-compatibility; fi
# git reset --hard
# git pull
# sudo ln -s /home/vagrant/${{ parameters.branch }}/magento-base /var/www/${{ parameters.branch }}
# sudo cp -r /home/vagrant/media/* /var/www/${{ parameters.branch }}/pub/media/
# sudo chown -R magento:www-data /var/www/${{ parameters.branch }}
# cd /var/www/${{ parameters.branch }}
# sudo chown -R magento:www-data .
# sudo su magento -c "composer install --no-interaction"
# sudo su magento -c "php bin/magento setup:install --base-url=http://${{ parameters.branch }}.172.30.1.10.nip.io/ --db-host=localhost:3306 --db-name=${{ parameters.branch }} --db-user=root --db-password=P@ssw0rd --admin-firstname=Magento --admin-lastname=User --admin-email=user@nike.com --admin-user=administrator --admin-password=admin123 --backend-frontname=admin --language=en_US --currency=USD --timezone=America/Los_Angeles --use-rewrites=1 --search-engine=elasticsearch7 --elasticsearch-host=localhost --elasticsearch-port=9200"
# sudo su magento -c "php bin/magento setup:upgrade --no-interaction; php bin/magento weltpixel:cleanup; php bin/magento weltpixel:less:generate"
# sudo su magento -c "php bin/magento setup:di:compile --no-interaction"
# sudo su magento -c "php bin/magento c:c"
# sudo su magento -c "find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} +;"
# sudo su magento -c "find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} +;"