Some builds failing, click retry and they always work


#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.


#2

Specify the Docker image with the SHA instead of a tag and it will solve this.


#3

Do you mean here?
composer global require wp-coding-standards/wpcs:0.10.*


#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.


#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


#6

I’m referring to the Docker container. I doubt it’s an issue with composer.


#7

How do I change that, I wasnt aware we even use docker…


#8

Is this a 2.0 question…?


#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?


#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.


#11

When I rebuild with SSH the build passes, it always works with a rebuild.


#12

How can the PATH be off though, its clearly defined in the line above it.


#13