-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Makefile composer #34630
Makefile composer #34630
Conversation
@@ -61,7 +61,7 @@ pipeline: | |||
image: owncloudci/php:${PHP_VERSION} | |||
pull: true | |||
commands: | |||
- ./tests/drone/composer-install.sh | |||
- make install-composer-deps |
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.
somehow I had the feeling that all drone scripts were avoiding the Makefile for some reason... not sure if it's good to add it back
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.
In recent times we have been using the make
targets directly in the drone scripts - e.g. make test-acceptance-api
etc. This has happened in both core and apps.
@@ -38,7 +41,7 @@ YARN := $(shell command -v yarn 2> /dev/null) | |||
KARMA=$(NODE_PREFIX)/node_modules/.bin/karma | |||
JSDOC=$(NODE_PREFIX)/node_modules/.bin/jsdoc | |||
PHPUNIT="$(shell pwd)/lib/composer/phpunit/phpunit/phpunit" | |||
COMPOSER_BIN=build/composer.phar | |||
COMPOSER_BIN := $(shell command -v composer 2> /dev/null) |
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.
what if there is no composer ? when to show a warning ?
note that in some build paths like JS tests no composer is required for Drone, so if a warning is shown it must only apply whenever composer is really needed
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.
I can add the "standard" code block that has been added in app make files:
ifndef COMPOSER_BIN
$(error composer is not available on your system, please install composer)
endif
We never made it smart in the app make files! It is likely emitting this warning in some drone build jobs that do not have composer
in their docker, and also do not need it.
I will think about how to make it smarter.
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.
I looked at drone. It has a composer:
pipeline step that uses image: owncloudci/php
which has composer
available and works.
Javascript runs test-javascript.sh
and does not go via Makefile
so it does not notice if composer
is there or not. In any case it uses the same docker image that has composer
in it.
phan
phpstan
owncloud-coding-standard
use make
commands. They use php
and composer
anyway and have that docker images also.
So everything relevant in drone has composer
already installed.
I have added the message block in my post above ^
That will only appear when a developer first does some make
command and they do not have composer
installed on their system. They should install it ;)
Codecov Report
@@ Coverage Diff @@
## master #34630 +/- ##
============================================
+ Coverage 65.23% 65.23% +<.01%
Complexity 18438 18438
============================================
Files 1203 1203
Lines 69825 69825
Branches 1280 1280
============================================
+ Hits 45548 45549 +1
+ Misses 23905 23904 -1
Partials 372 372
Continue to review full report at Codecov.
|
1 similar comment
Codecov Report
@@ Coverage Diff @@
## master #34630 +/- ##
============================================
+ Coverage 65.23% 65.23% +<.01%
Complexity 18438 18438
============================================
Files 1203 1203
Lines 69825 69825
Branches 1280 1280
============================================
+ Hits 45548 45549 +1
+ Misses 23905 23904 -1
Partials 372 372
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #34630 +/- ##
=========================================
Coverage 65.23% 65.23%
Complexity 18438 18438
=========================================
Files 1203 1203
Lines 69825 69825
Branches 1280 1280
=========================================
Hits 45548 45548
Misses 23905 23905
Partials 372 372
Continue to review full report at Codecov.
|
@PVince81 @individual-it @patrickjahns ready for review again |
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.
fine 👍
@phil-davis please backport |
Backport |
Description
Makefile
so it expects and finds a pre-installedcomposer
on the system, rather than downloading a copy..drone.yml
so it no longer tries to self-installcomposer
This makes composer-related stuff work like it does in the app repos.
This is a resolved version of PR #32213 and moves forward from that.
Related Issue
owncloud/QA#582
Motivation and Context
Have a consistent CI and development environment in core as in apps.
How Has This Been Tested?
Local
to see that these still work locally.
Types of changes
Checklist:
Open tasks: