Comments (5)
It might not have worked, because this information is coming from the agent-side. So, the p4 wrapper would need to be replaced on the agent-side and the PATH of the agent should be changed.
I think what you said makes sense. For smaller projects, though, they might appreciate that extra information. I'm wondering about a more generic solution. Maybe making the console logs more configurable (ability to hide lines, marking task start better, etc). Should be able to do that in Javascript.
from gocd.
Regarding your suggestion, we replaced those p4 scripts on the agent-side, but it didn't work as we expected it.
Finally, we took the below script: https://github.com/programmiersportgruppe/go-defrustrator and added the below snippet:
// Perforce
applyRegex(/\/\/(?!artifactory).*\n/g, "");
applyRegex(/(Client .* not changed)/g,"<span style='color: blue;'>$1</span>\n");
To be honest, that snippet works, but it takes longer to present that information. It would be worth if we would have a way of enabling/disabling that verbose output.
Technically, there is a minor change in order to get rid of that verbose output, but I'm not sure if the community would be agree about it:
Source: com/thoughtworks/go/domain/materials/perforce/P4Client.java
https://github.com/gocd/gocd/blob/master/common/src/com/thoughtworks/go/domain/materials/perforce/P4Client.java
as it is:
public void sync(long revision, boolean shouldForce, ProcessOutputStreamConsumer outputStreamConsumer) {
if (shouldForce) {
execute(p4("sync", "-f", clientView() + "@" + revision), "", outputStreamConsumer, true);
} else {
execute(p4("sync", clientView() + "@" + revision), "", outputStreamConsumer, true);
}
}
would be:
public void sync(long revision, boolean shouldForce, ProcessOutputStreamConsumer outputStreamConsumer) {
if (shouldForce) {
execute(p4("sync", "-q", "-f", clientView() + "@" + revision), "", outputStreamConsumer, true);
} else {
execute(p4("sync", "-q", clientView() + "@" + revision), "", outputStreamConsumer, true);
}
}
Obviously, it would be great to have a flag (checkbox) under the materials configuration in order to enable/disable it, but likely it would affect some changes within the database. I would be happy to develop that feature but I need some tech advices about it. Let me know If you have any clues about it.
Cheers
from gocd.
Hi again,
any suggestions about this ticket?
Thanks
from gocd.
Hey @v1v,
That sounds like a good idea. You seem to have found the right code as well. Making it configurable, is the important part here, as you mentioned. Luckily, in this case, we can make a change that affects only the configuration and not the database (with a caveat). So, I think it'll be good for you to try to do this. I can help you.
I wrote detailed steps to do this, but thought maybe you'll want to find it out yourself. :) So, I've written slightly high-level steps here. Let me know if you need more help or details. I'll be happy to provide them:
- Add a config migration to upgrade schema version. As a part of it, make a new flag (say, "quietOutput") part of the XSD for the P4 part of the configuration.
- Now that the XML can be saved with the flag, you need to connect it to the code. You should make changes here and here and then in P4Client (the place you mentioned earlier).
- Changing the UI (optional): This would be the file to look at.
Caveat:
This works for current runs, but since the flag is not stored in the database, it will not be used for reruns (if you rerun an older instance). It will then revert to the default (verbose output) for that run. I think it's a good tradeoff.
If you need more details, just let me know.
Cheers,
Aravind
from gocd.
Closing as stale.
from gocd.
Related Issues (20)
- Material authentication changing to pipeline is not picking latest git credentials HOT 12
- ENV AGENT_BOOTSTRAPPER_ARGS with Docker Compose is provided as a whole String HOT 1
- Clean up old code related to PluggableTask and Package material config/preferences HOT 2
- Release GoCD 23.4.0
- Console view toolbar not shown after scrolling on v23.4.0 HOT 2
- Ability to have empty material HOT 3
- Command Execution Issue on Windows Agents in GOCD v23.3 HOT 2
- GoCD isn't parsing new config repo. No pipeliens are shown HOT 2
- Go-Agent on a different subnet HOT 1
- Unable to pick stage from Add Material menu in Chrome on MacOS Sonoma HOT 7
- pipeline artifact URL is incorrect HOT 2
- Release GoCD 23.5.0
- Unable to move pipeline group when using pipeline filter HOT 2
- Installing chromium on alpine3.18 gocd docker agent causes crash loop HOT 3
- Can't collect artifacts from a folder containing a "%" or ";" in its name HOT 4
- HTTP -> HTTPS redirect in loadBalancer leads to error code 422 when editing cruise-config.xml in gocd-server gui with and gocd-server error InvalidAuthenticityToken HOT 8
- Unable to trigger GoCD pipeline via API HOT 2
- API endpoint to check the status of the GoCD pipeline
- Notification plugin stage status events don't include accurate material information for fields such as git shallow-clone HOT 4
- how to build a docker image with private reigistry image ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gocd.