-
Notifications
You must be signed in to change notification settings - Fork 4
Bootstrap test and release pipeline #5
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| workspace: | ||
| base: /var/www/owncloud | ||
| path: apps/testing | ||
|
|
||
| branches: | ||
| - master | ||
|
|
||
| pipeline: | ||
| prepare-lint: | ||
| image: owncloudci/php | ||
| pull: true | ||
| commands: | ||
| - make vendor-bin/php-parallel-lint/vendor | ||
|
|
||
| lint-php5: | ||
| image: owncloudci/php:5.6 | ||
| pull: true | ||
| group: lint | ||
| commands: | ||
| - make test-php-lint | ||
|
|
||
| lint-php70: | ||
| image: owncloudci/php:7.0 | ||
| pull: true | ||
| group: lint | ||
| commands: | ||
| - make test-php-lint | ||
|
|
||
| lint-php71: | ||
| image: owncloudci/php:7.1 | ||
| pull: true | ||
| group: lint | ||
| commands: | ||
| - make test-php-lint | ||
|
|
||
| lint-php72: | ||
| image: owncloudci/php:7.2 | ||
| pull: true | ||
| group: lint | ||
| commands: | ||
| - make test-php-lint | ||
|
|
||
| build: | ||
| image: owncloudci/php:7.1 | ||
| pull: true | ||
| commands: | ||
| - make dist | ||
|
|
||
| github_release: | ||
| image: plugins/github-release | ||
| pull: true | ||
| secrets: [ github_token ] | ||
| files: build/dist/testing.tar.gz | ||
| prerelease: true | ||
| file_exists: overwrite | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the default behavior
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I know - I want it to be explicit |
||
| checksum: sha256 | ||
| when: | ||
| event: tag | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| build | ||
| /vendor/ | ||
| vendor-bin/**/vendor | ||
| vendor-bin/**/composer.lock |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| SHELL := /bin/bash | ||
|
|
||
| COMPOSER_BIN := $(shell command -v composer 2> /dev/null) | ||
| ifndef COMPOSER_BIN | ||
| $(error composer is not available on your system, please install composer) | ||
| endif | ||
|
|
||
| # directories | ||
| app_name=$(notdir $(CURDIR)) | ||
| build_dir=$(CURDIR)/build | ||
| dist_dir=$(build_dir)/dist | ||
| src_files=README.md LICENSE | ||
| src_dirs=appinfo data img lib locking | ||
| all_src=$(src_dirs) $(src_files) | ||
|
|
||
| # bin file definitions | ||
| PHPLINT=php -d zend.enable_gc=0 vendor-bin/php-parallel-lint/vendor/bin/parallel-lint | ||
|
|
||
| # start with displaying help | ||
| .DEFAULT_GOAL := help | ||
|
|
||
| help: | ||
| @fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//' | ||
|
|
||
|
|
||
|
|
||
| ## | ||
| ## Build targets | ||
| ##-------------------------------------- | ||
|
|
||
| .PHONY: dist | ||
| dist: ## Build distribution | ||
| dist: distdir package | ||
|
|
||
| .PHONY: distdir | ||
| distdir: | ||
| rm -rf $(build_dir) | ||
| mkdir -p $(dist_dir)/$(app_name) | ||
| cp -R $(all_src) $(dist_dir)/$(app_name) | ||
|
|
||
| .PHONY: package | ||
| package: | ||
| tar -czf $(dist_dir)/$(app_name).tar.gz -C $(dist_dir) $(app_name) | ||
|
|
||
| ## | ||
| ## Tests | ||
| ##-------------------------------------- | ||
|
|
||
| .PHONY: test-php-lint | ||
| test-php-lint: ## Run phan | ||
| test-php-lint: vendor-bin/php-parallel-lint/vendor | ||
| $(PHPLINT) appinfo lib locking | ||
|
|
||
| # | ||
| # Dependency management | ||
| #-------------------------------------- | ||
|
|
||
| composer.lock: composer.json | ||
| @echo composer.lock is not up to date. | ||
|
|
||
| vendor: | ||
| composer install --no-dev | ||
|
|
||
| vendor/bamarni/composer-bin-plugin: | ||
| composer install | ||
|
|
||
| vendor-bin/php-parallel-lint/vendor: vendor/bamarni/composer-bin-plugin vendor-bin/php-parallel-lint/composer.lock | ||
| composer bin php-parallel-lint install --no-progress | ||
|
|
||
| vendor-bin/php-parallel-lint/composer.lock: vendor-bin/php-parallel-lint/composer.json | ||
| @echo php-parallel-lint composer.lock is not up to date. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| { | ||
| "name": "owncloud/testing", | ||
| "description": "ownCloud testing app", | ||
| "type": "owncloud-app", | ||
| "license": "AGPL", | ||
| "require": {}, | ||
| "require-dev": { | ||
| "bamarni/composer-bin-plugin": "^1.2" | ||
| }, | ||
| "extra": { | ||
| "bamarni-bin": { | ||
| "bin-links": false | ||
| } | ||
| } | ||
| } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "require": { | ||
| "jakub-onderka/php-parallel-lint": "^1.0" | ||
| } | ||
| } |
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.
Why a preprelease?
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.
Should not be marked as official and this is just a helper