This repository has been archived by the owner on Feb 25, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
91 lines (79 loc) · 3.34 KB
/
.travis.yml
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
language: php
php:
- 5.6
- 7.2
sudo: false
services:
- mysql
env:
matrix:
- SHOPWARE_VERSION="5.2"
global:
- PLUGIN_NAME=FroshOptimusMediaOptimizer
- SHOPWARE_DIRECTORY="${HOME}/shopware"
- PLUGIN_DIRECTORY="${SHOPWARE_DIRECTORY}/custom/plugins"
cache:
directories:
- ${HOME}/.composer/cache/files
install:
- composer install
before_script:
- mysql -e 'CREATE DATABASE shopware;'
- if [[ "$(php --version | grep -cim1 xdebug)" -ge 1 ]]; then phpenv config-rm xdebug.ini; fi
- git clone https://github.com/shopware/shopware.git ${SHOPWARE_DIRECTORY} --branch ${SHOPWARE_VERSION}
- ant -f ${SHOPWARE_DIRECTORY}/build/build.xml -Dapp.host=localhost -Ddb.user=travis -Ddb.host=127.0.0.1 -Ddb.name=shopware build-unit
- mv ${TRAVIS_BUILD_DIR} ${PLUGIN_DIRECTORY}/${PLUGIN_NAME}
- php ${HOME}/shopware/bin/console sw:plugin:refresh
- php ${HOME}/shopware/bin/console sw:plugin:install ${PLUGIN_NAME}
- php ${HOME}/shopware/bin/console sw:plugin:activate ${PLUGIN_NAME}
- cd ${PLUGIN_DIRECTORY}/${PLUGIN_NAME}
script:
-
after_success:
- chmod +x ./build.sh
- ./build.sh $TRAVIS_TAG
stages:
- test
- name: Store-Check
if: tag IS blank AND env(PLUGIN_ID) IS present AND type != pull_request
- name: Store-Sync
if: branch = master AND env(PLUGIN_ID) IS present AND type != pull_request
- name: Store-Deploy
if: tag IS present
jobs:
include:
- stage: Store-Check
php: 7.3
before_script: skip
install:
- chmod +x ./build.sh
- ./build.sh "master"
- wget 'https://github.com/FriendsOfShopware/FroshPluginUploader/releases/download/0.1.0/frosh-plugin-upload.phar' -O frosh-plugin-upload.phar
script:
- php frosh-plugin-upload.phar plugin:validate ${TRAVIS_BUILD_DIR}/${PLUGIN_NAME}*.zip
- stage: Store-Sync
before_script: skip
php: 7.3
install:
- wget 'https://github.com/FriendsOfShopware/FroshPluginUploader/releases/download/0.1.0/frosh-plugin-upload.phar' -O frosh-plugin-upload.phar
script:
- php frosh-plugin-upload.phar plugin:update ${TRAVIS_BUILD_DIR}/Resources/store
- stage: Store-Deploy
before_script: skip
php: 7.3
install:
- wget 'https://github.com/FriendsOfShopware/FroshPluginUploader/releases/download/0.1.0/frosh-plugin-upload.phar' -O frosh-plugin-upload.phar
script:
- chmod +x ./build.sh
- ./build.sh
- php frosh-plugin-upload.phar plugin:upload ${TRAVIS_BUILD_DIR}/${PLUGIN_NAME}*.zip
deploy:
provider: releases
api_key:
secure: 44wjV0H2zlJt4UXKnyv2YjyLGxLA2YMszSf2E79MgvfnSVCSnchfK4/ETZtWy4UEca4YiqF/RBdsO6dc1hiAQejhbdTVU6Ez69c8GYraRbhGb4N/NT7y0wbgT3JrNjzrUluVZwHcXq/OTYs/6/OtpfYfVeBFz0LS6mr3EeOgC0Oly90AdeIdtGR88IQ+BvZCrVA/rcXLwu2Er2EZJDArrD3jUgzsTKu0M5dvQIl0WhR04XJ7HnZ1BNsqobeSenhZEfuaVDWT/bj0aiTeekMlH1MGifTfQUJhpA/2WkL4z6uKNbJzAeAKfUANx4civQWTDJcJnf4LAzmlfTy2nawx+8RihP+QGk+0pdSl1VIQF19lSZer0xJk1ts2pZExNo2adHtYnHnNHy2640uCGhX6wp3wRX77V/Igu8HHzxZf84xLYeUHtea5yscSKsm8iid1sDV7PAKmBeiCJQN06rxN+OI0FVFr+SyHW69UhOf/0nvvgOkM9tpgY9JAkoSs7FksyyU56m/j5PqoQkU4Ko/Ns58KrjsKNAKRCVRnxV3lRWYDjncgZd24MhOgq9Hnm7UXuacd5yAsswdMXgnrZhHZASddAke2gipxQWi4fO/i4ayQ5PHUx3k1EulxZaAGXa9DerVIsPlygDdzwlR2k84utgIPQNyQlrW2rTUArSKWcrQ=
file_glob: true
file: $PLUGIN_NAME*.zip
skip_cleanup: true
on:
repo: FriendsOfShopware/FroshOptimusMediaOptimizer
tags: true