pross
March 30, 2017, 6:20pm
1
Getting intermittent issues with out build scripts. It basically installs phpcs then runs it against our php code with a custom set of rules, every now and then and more often than not it fails with the following error
phpcs --config-set installed_paths $HOME/.composer/vendor/wp-coding-standards/wpcs
bash: line 1: phpcs: command not found
phpcs --config-set installed_paths $HOME/.composer/vendor/wp-coding-standards/wpcs returned exit code 127
Action failed: phpcs --config-set installed_paths $HOME/.composer/vendor/wp-coding-standards/wpcs
If i click rebuild it will then work properly and pass/fail based on phpcs findings.
rohara
March 30, 2017, 6:31pm
2
Specify the Docker image with the SHA instead of a tag and it will solve this.
pross
March 30, 2017, 7:11pm
3
pross:
phpcs --config-set inst
Do you mean here?
composer global require wp-coding-standards/wpcs:0.10.*
rohara
March 30, 2017, 7:24pm
4
That heavily depends on your setup but most inconsistencies are related to using the “latest” tag or something similar where a version is cached on our hosts and a newer one exists on other hosts.
pross
March 30, 2017, 7:27pm
5
The code we use is pretty simple:
export PATH="$HOME/.composer/vendor/bin:$PATH"
composer global require wp-coding-standards/wpcs:0.10.*
phpcs --config-set installed_paths $HOME/.composer/vendor/wp-coding-standards/wpcs
Then 50% of builds we get phpcs not found
rohara
March 30, 2017, 7:32pm
6
I’m referring to the Docker container. I doubt it’s an issue with composer.
pross
March 30, 2017, 7:34pm
7
How do I change that, I wasnt aware we even use docker…
rohara
March 30, 2017, 7:44pm
8
Is this a 2.0 question…?
pross
March 30, 2017, 7:45pm
9
Ah … no then!
Sorry I clicked the link at the top must have ended up in the worng area, can you move the topic?
1 Like
rohara
March 30, 2017, 7:52pm
10
On 1.0 I’d SSH in and see if find
brings up any results. Maybe the $PATH is off sometimes? It’s certainly an odd.
pross
March 30, 2017, 7:53pm
11
When I rebuild with SSH the build passes, it always works with a rebuild.
pross
March 30, 2017, 8:06pm
12
How can the PATH be off though, its clearly defined in the line above it.