similar question to this thread but that thread is very outdated (Xocde4)
on Xcode13. How do you see logs of a pre and post build action? I am running a script as part of the pre-build action but logs can't be found anymore.
I am not even sure its kicked off - how do I check pre build action its actually invoked?
Resolved a similar issue by forwarding my pre-build logs to a file. I added the next bunch of code to the beginning of my pre-build script.
#/bin/bash
exec > "${PROJECT_DIR}/prebuild.log" 2>&1
set -o pipefail
set -e
Related
Hello everyone,
#!/bin/sh
inotifywait -e move,create /home/importantdirectory|
while read path action file;
do
*do something here*
done
I have this script running to watch the directory and then sends an email notification. When I run it, it seems to run twice, as in I receive the email notification twice. I removed the email notification code and put some simple echos inside. Still I get it 2 times. How can I see if this folder is being watched more than once. I was running it nohup ./execscript > /dev/null 2>&1 &
I shutdown the script and ran it ./execscript and I indeed see it execute once and then seconds later a 2nd time before its done. Also can I see if the number of watches on that directory and the scripts watching it?
Any help is appreciated.
Thank you
Edit: actually, I noticed in my command log that I have run nohup ./execscript > /dev/null 2>&1 & multiple times. could the same script be running more than once if you issue the command above ?
I have a question to all the experienced Teamcity users out there.
I would like to exit out of a job based on a particular condition, but I do not want the status of the job as a failure. Is it possible to mark a job as successful even when you exit out of the job with an "exit code 1" or any pointers to achieve the same (exit out of a Teamcity job but mark the job as successful) through an alternative way is greatly appreciated!
Thanks!
You can use TeamCity service messages to update build status, e.g. write to the output
##teamcity[buildStatus status='SUCCESS' text='{build.status.text} and then made green']
to get build status text concatenated with the and then made green string.
If you have Command Line Build Step and you are using TeamCity 2017.2 then you can format stderr output as warning. Here is a documentation: https://confluence.jetbrains.com/display/TCD10/Command+Line
I am running JMeter version 3.3 in non-GUI mode and I do not want the process to exit upon successful execution of the test.
I have tried running following command:
$ ./bin/jmeter -n -t scenarios/WebTestPlan.jmx -LDEBUG -Jjmeterengine.force.system.exit=false
But it doesn't do the trick. How do I achieve desired behavior?
If basing your approach on time is acceptable and you don't need JMeter report to be generated on Heroku, add a tearDown Thread Group that contains an infinite sleep using Timer.
If you need report, then do a sleep in a shell
I currenty have a simple shell script that I created for a linux machine to be run using cron, but now I want to be able to run the file using windows task scheduler. I have tried to get it to work using cron for cygwin, but even after running cron-config successfully and ensuring that the shell script can be executed successfully, for some reason the cron task simply wasn't executing. So I decided to give in and use the windows task scheduler. In order to do this, I looked at the following posts about the issue:
Cgywin .sh file run as Windows Task Scheduler
http://www.davidjnice.com/cygwin_scheduled_tasks.html
in my case, the entry in the "actions" tab of the new task looks like this:
program/script: c:\cygwin64\bin\bash.exe
arguments: -l -c "/cygdrive/c/users/paul/bitcoinbot/download_all_data.sh >> cygdrive/c/users/paul/bitcoinbot/logfile.log 2>&1"
start in: c:\cygwin64\bin
Notice that I redirected the output of the shell script to a log file, so that I should be able to see there whether the program run. Other than that, I simply edited the "trigger" tab to run the task daily, and set the time to a couple of minutes in the fture to see whether it ran successfully.
Alas, when I look at the detailed event history for the task, nothing changes when the trigger time passes. And when I manually "run" the task, the event history seems to add a few different events, but the task is completed within seconds, whereas this task should take over an hour (and it does when the shell script is executed directly from the terminal). And when I look for the log file that should have been created, there is nothing.
Does anyone have any idea what might be the issue here? How can I get my task to run properly at the trigger time, and how can I make sure it does so?
Best,
Paul
EDIT:
here are the pictures showing event history, as per Ken White's request.
Please ignore the fact that it says there are 24 events. These are from multiple separate runs of the task. The events shown here are a complete list of the events triggered by a single run.
EDIT 2:
Regarding my attempts to get cron to work, I have run into the following problem when I try to start the cron service using cygrunsrv. First of all, I tried to start cron by typing
cygrunsrv -I cron -p /usr/sbin/cron.exe -a -D
Now when I type
$cygrunsrv -Q cron
Service: cron
Current State: stopped
Command: /usr/bin/cron.exe
Now, I tried to start the cron service by typing
cygrunsrv -S cron
Cygrunsrv: Error starting a service: QueryServiceStatus: Win32 error 1062:
The service has not been started.
Does anyone hae any idea what this error means? I tried googling it, but couldn't find any answers.
how can I kill hudson job from bash script when the log file doesn't change? (hudson is freezed).
Context: I have a bash script that check if a log file had change after X seconds and I want to modified it to check that if the timeout raises, and there's no error in console, this means that hudson job is freezed, so I want to be notified about this.
It might be easier to use the Build Timeout plugin.
Finally the solution was to use the following command:
#!/bin/bash
#if the log file does not change
if [ "something" ]; then
kill -9 $(pidof eclipse)
fi
This kills the eclipse instance (who's calls hudson), and continues with the build of the others elements and that it's Ok for my task.