From 8d5cfc77cae0eca43a776a9840a1fb8be6d6914d Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Wed, 10 Apr 2019 13:29:35 +0200 Subject: [PATCH] Update drone.yml to be compatible with drone 1.0.0 Signed-off-by: Morris Jobke --- .drone.yml | 367 ++++++++++++-------- Makefile | 9 +- tests/features/bootstrap/FeatureContext.php | 60 ---- tests/features/stable12.feature | 29 -- tests/features/stable13.feature | 61 ---- 5 files changed, 230 insertions(+), 296 deletions(-) delete mode 100644 tests/features/stable12.feature delete mode 100644 tests/features/stable13.feature diff --git a/.drone.yml b/.drone.yml index 28ca24a..9ea15c0 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,145 +1,232 @@ -clone: - git: - image: plugins/git - depth: 1 +kind: pipeline +name: check-same-code-base -pipeline: - check-same-code-base: +steps: + - name: check-same-code-base image: nextcloudci/php7.0:php7.0-19 commands: - make check-same-code-base - when: - matrix: - TESTS: check-same-code-base - php56-cli: - image: nextcloudci/php5.6:php5.6-7 - commands: - - make test-cli - when: - matrix: - TESTS: php56-cli - php70-cli: - image: nextcloudci/php7.0:php7.0-19 - commands: - - make test-cli - when: - matrix: - TESTS: php70-cli - php71-cli: - image: nextcloudci/php7.1:php7.1-16 - commands: - - make test-cli - when: - matrix: - TESTS: php71-cli - php72-cli: - image: nextcloudci/php7.2:php7.2-12 - commands: - - make test-cli - when: - matrix: - TESTS: php72-cli - php56-stable12: - image: nextcloudci/php5.6:php5.6-7 - commands: - - make test-stable12 - when: - matrix: - TESTS: php56-stable12 - php70-stable12: - image: nextcloudci/php7.0:php7.0-19 - commands: - - make test-stable12 - when: - matrix: - TESTS: php70-stable12 - php71-stable12: - image: nextcloudci/php7.1:php7.1-16 - commands: - - make test-stable12 - when: - matrix: - TESTS: php71-stable12 - php56-stable13: - image: nextcloudci/php5.6:php5.6-7 - commands: - - make test-stable13 - when: - matrix: - TESTS: php56-stable13 - php70-stable13: - image: nextcloudci/php7.0:php7.0-19 - commands: - - make test-stable13 - when: - matrix: - TESTS: php70-stable13 - php71-stable13: - image: nextcloudci/php7.1:php7.1-16 - commands: - - make test-stable13 - when: - matrix: - TESTS: php71-stable13 - php72-stable13: - image: nextcloudci/php7.2:php7.2-12 - commands: - - make test-stable13 - when: - matrix: - TESTS: php72-stable13 - php70-stable14: - image: nextcloudci/php7.0:php7.0-19 - commands: - - make test-stable14 - when: - matrix: - TESTS: php70-stable14 - php71-stable14: - image: nextcloudci/php7.1:php7.1-16 - commands: - - make test-stable14 - when: - matrix: - TESTS: php71-stable14 - php72-stable14: - image: nextcloudci/php7.2:php7.2-12 - commands: - - make test-stable14 - when: - matrix: - TESTS: php72-stable14 - php71-master: - image: nextcloudci/php7.1:php7.1-16 - commands: - - make test-master - when: - matrix: - TESTS: php71-master - php72-master: - image: nextcloudci/php7.2:php7.2-12 - commands: - - make test-master - when: - matrix: - TESTS: php72-master -matrix: - include: - - TESTS: php56-cli - - TESTS: php70-cli - - TESTS: php71-cli - - TESTS: php56-stable12 - - TESTS: php70-stable12 - - TESTS: php71-stable12 - - TESTS: php56-stable13 - - TESTS: php70-stable13 - - TESTS: php71-stable13 - - TESTS: php72-stable13 - - TESTS: php70-stable14 - - TESTS: php71-stable14 - - TESTS: php72-stable14 - - TESTS: php71-master - - TESTS: php72-master - - TESTS: check-same-code-base -branches: [ master, stable* ] +trigger: + branch: + - master + - stable* + event: + - pull_request + - push + +--- +kind: pipeline +name: php70-cli + +steps: + - name: php70-cli + image: nextcloudci/php7.0:php7.0-19 + commands: + - make test-cli + +trigger: + branch: + - master + - stable* + event: + - pull_request + - push + +--- +kind: pipeline +name: php71-cli + +steps: + - name: php71-cli + image: nextcloudci/php7.1:php7.1-16 + commands: + - make test-cli + +trigger: + branch: + - master + - stable* + event: + - pull_request + - push + +#--- +#kind: pipeline +#name: php72-cli +# +#steps: +# - name: php72-cli +# image: nextcloudci/php7.2:php7.2-12 +# commands: +# - make test-cli +# +#trigger: +# branch: +# - master +# - stable* +# event: +# - pull_request +# - push +# +--- +kind: pipeline +name: php70-stable14 + +steps: + - name: php70-stable14 + image: nextcloudci/php7.0:php7.0-19 + commands: + - make test-stable14 + +trigger: + branch: + - master + - stable* + event: + - pull_request + - push + +--- +kind: pipeline +name: php71-stable14 + +steps: + - name: php71-stable14 + image: nextcloudci/php7.1:php7.1-16 + commands: + - make test-stable14 + +trigger: + branch: + - master + - stable* + event: + - pull_request + - push + +--- +kind: pipeline +name: php72-stable14 + +steps: + - name: php72-stable14 + image: nextcloudci/php7.2:php7.2-12 + commands: + - make test-stable14 + +trigger: + branch: + - master + - stable* + event: + - pull_request + - push + +--- +kind: pipeline +name: php71-stable15 + +steps: + - name: php71-stable15 + image: nextcloudci/php7.1:php7.1-16 + commands: + - make test-stable15 + +trigger: + branch: + - master + - stable* + event: + - pull_request + - push + +--- +kind: pipeline +name: php72-stable15 + +steps: + - name: php72-stable15 + image: nextcloudci/php7.2:php7.2-12 + commands: + - make test-stable15 + +trigger: + branch: + - master + - stable* + event: + - pull_request + - push + +--- +kind: pipeline +name: php73-stable15 + +steps: + - name: php73-stable15 + image: nextcloudci/php7.3:php7.3-2 + commands: + - make test-stable15 + +trigger: + branch: + - master + - stable* + event: + - pull_request + - push + +--- +kind: pipeline +name: php71-master + +steps: + - name: php71-master + image: nextcloudci/php7.1:php7.1-16 + commands: + - make test-master + +trigger: + branch: + - master + - stable* + event: + - pull_request + - push + +--- +kind: pipeline +name: php72-master + +steps: + - name: php72-master + image: nextcloudci/php7.2:php7.2-12 + commands: + - make test-master + +trigger: + branch: + - master + - stable* + event: + - pull_request + - push + +--- +kind: pipeline +name: php73-master + +steps: + - name: php73-master + image: nextcloudci/php7.3:php7.3-2 + commands: + - make test-master + +trigger: + branch: + - master + - stable* + event: + - pull_request + - push diff --git a/Makefile b/Makefile index bce1368..d58f0b3 100644 --- a/Makefile +++ b/Makefile @@ -23,15 +23,12 @@ test: updater.phar test/vendor test-cli: updater.phar test/vendor cd tests && vendor/behat/behat/bin/behat features/cli.feature -test-stable12: updater.phar test/vendor - cd tests && vendor/behat/behat/bin/behat features/stable12.feature - -test-stable13: updater.phar test/vendor - cd tests && vendor/behat/behat/bin/behat features/stable13.feature - test-stable14: updater.phar test/vendor cd tests && vendor/behat/behat/bin/behat features/stable14.feature +test-stable15: updater.phar test/vendor + cd tests && vendor/behat/behat/bin/behat features/stable15.feature + test-master: updater.phar test/vendor cd tests && vendor/behat/behat/bin/behat features/master.feature diff --git a/tests/features/bootstrap/FeatureContext.php b/tests/features/bootstrap/FeatureContext.php index 6a7eccd..ad1d9cf 100644 --- a/tests/features/bootstrap/FeatureContext.php +++ b/tests/features/bootstrap/FeatureContext.php @@ -195,84 +195,24 @@ class FeatureContext implements SnippetAcceptingContext */ public function getSignatureForVersion($version) { $signatures = [ - '9.0.54' => 'wVgtLXquICXsmfJwRUD8tJiFzYJAIdQfjAcOzvKGDYh96NMT6MGVEMYQgAfyYvq0 -tuAcqsU87CDc1IQ14y2GmkSnwnXJrCXEJFaYqBGyXJtbzRukby5k+IVx2NTBaNjL -XMC1irGa7tnCC/pyn9K+RDDHSTa3aQ7W0Z2MIq+TpNuASwshOGaep9IP7bmVvEsS -CC8df8qp8xBkUA6PLxDkrHHGe1dTauuMYc0hUkzclC+fD2wFzV4ks1RpX6V4dLlZ -4+nzlDeepIAVOnoaIaxLv4DmITD5Mg408z/CCB2YBBntFC9wIlfErr9X4JqQWVEQ -Xpo6Rlr6bSFMHcDn3Bjn+Q==', - '9.0.55RC1' => 'uUGqJ6shKJCxoP9UvPclGewzN3jxX1blMyB27RsLN/jEf1Y6nnxz3kVyeXQcUuvV -P54w4cyKBnj8+mMJV57bnIUf42B1GFIiHTILpauDcC6KqsEt/kGIUDiHtZjZAJKr -jzuUjSAXKjTxeAQv0l9H7nQaa7Xs7LgWTV9LycQVLksYoV0MDBMOjBuxH017jgQH -AAzqdiQguM2pv5+j6AZcP6q1YRueLePTcM2q+AlDB52LYA1Dfmj81jsP1J9WmbXJ -IfbjOzrkifG5mJB+Q7/HOJ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ature b/tests/features/stable12.feature deleted file mode 100644 index 94e35f8..0000000 --- a/tests/features/stable12.feature +++ /dev/null @@ -1,29 +0,0 @@ -Feature: CLI updater - stable12 base - - Scenario: Update is available - 12.0.0 beta 1 to 12.0.0 beta 2 - Given the current installed version is 12.0.0beta1 - And there is an update to prerelease version "12.0.0beta2" available - And the version number is decreased in the config.php to enforce upgrade - When the CLI updater is run successfully - And the output should contain "Update successful" - Then the installed version should be 12.0 - And maintenance mode should be off - And upgrade is not required - - Scenario: Update is available - 12.0.0 to 12.0.1 - Given the current installed version is 12.0.0 - And there is an update to version 12.0.1 available - When the CLI updater is run successfully - And the output should contain "Update successful" - Then the installed version should be 12.0.1 - And maintenance mode should be off - And upgrade is not required - - Scenario: Update is available - 12.0.0 to 13.0.1 - Given the current installed version is 12.0.0 - And there is an update to version 13.0.1 available - When the CLI updater is run successfully - And the output should contain "Update successful" - Then the installed version should be 13.0.1 - And maintenance mode should be off - And upgrade is not required diff --git a/tests/features/stable13.feature b/tests/features/stable13.feature deleted file mode 100644 index 68799bc..0000000 --- a/tests/features/stable13.feature +++ /dev/null @@ -1,61 +0,0 @@ -Feature: CLI updater - stable13 base - - Scenario: Update is available - 13.0.0 beta 1 to 13.0.0 beta 2 - Given the current installed version is 13.0.0beta1 - And there is an update to prerelease version "13.0.0beta2" available - And the version number is decreased in the config.php to enforce upgrade - When the CLI updater is run successfully - And the output should contain "Update successful" - Then the installed version should be 13.0 - And maintenance mode should be off - And upgrade is not required - - Scenario: Update is available - 13.0.0 to 13.0.1 - Given the current installed version is 13.0.0 - And there is an update to version 13.0.1 available - When the CLI updater is run successfully - And the output should contain "Update successful" - Then the installed version should be 13.0.1 - And maintenance mode should be off - And upgrade is not required - - Scenario: Update is available - 13.0.3 to 13.0.4 - Given the current installed version is 13.0.3 - And there is an update to version 13.0.4 available - When the CLI updater is run successfully - And the output should contain "Update successful" - Then the installed version should be 13.0.4 - And maintenance mode should be off - And upgrade is not required - - Scenario: Update is available but unexpected folder found - 13.0.3 to 13.0.4 - Given the current installed version is 13.0.3 - And there is an update to version 13.0.4 available - And there is a folder called "test123" - When the CLI updater is run - Then the return code should not be 0 - And the output should contain "The following extra files have been found" - Then the installed version should be 13.0.3 - And maintenance mode should be off - And upgrade is not required - - Scenario: Update is available and .well-known folder exist - 13.0.3 to 13.0.4 - Given the current installed version is 13.0.3 - And there is an update to version 13.0.4 available - And there is a folder called ".well-known" - When the CLI updater is run successfully - And the output should contain "Update successful" - Then the installed version should be 13.0.4 - And maintenance mode should be off - And upgrade is not required - - Scenario: Update is available - 13.0.1 to 14.0.3 - Given the current installed version is 13.0.1 - And PHP is at least in version 7.0 - And the current channel is "daily" - And there is an update to version 14.0.3 available - When the CLI updater is run successfully - And the output should contain "Update successful" - Then the installed version should be 14.0 - And maintenance mode should be off - And upgrade is not required