I have template which have two build steps:
Maven
Command line
Command line steps sets current datetime in variable which i want to use in Build Feature.
I am getting proper Current datetime as follows via Command Line step:
#!/bin/bash
export current_build_date_format="+%%d%%m%%Y_%%H%%M%%S"
export current_build_date="$(date $current_build_date_format)"
##teamcity[setParameter name='current_build_date' value='$current_build_date']
When i am trying to refer it in Build Feature, its not able to identify parameter via "%current_build_date%"
It shows paramter as undefined in Configuration Parameter section
Anything missing? I have defined that parameter via command line, how will teamcity features use that
Parameter error:
Error while reading user defined parameter first:
Initialization
[05:42:27][Initialization] - Build Details Validator
[05:42:27][ Build Details Validator] Error: Conversion = 'm'
[05:42:27][Initialization] Build validation failed
You need to echo TeamCity service message to let TeamCity parse and use it, e.g.:
echo "##teamcity[setParameter name='current_build_date' value='$current_build_date']"
Related
We have an existing extension that is already in the VS Code market place.
I'm trying to automate publishing by using Github Actions and executing this command...
vsce publish -p ${{ secrets.VSCODE_PAT }}
When the command executes I'm getting this error:
ERROR Invalid publisher name 'Wilderness Labs'. Expected the
identifier of a publisher, not its human-friendly name.
The vscode documentation doesn't really help in this situation. Any ideas/suggestions?
The publisher name MUST NOT be a string literal with spaces. As mentioned by #Lex it needs to be a something like WildernessLabs or wilderness-labs or whatever it is for your own organisation.
I am trying to execute jmeter with Robot Framework but getting attribute error when I tried to pass extra parameter. I tried below solution but it doesn't work.
How to pass values to the user defined variable in jmeter's jmx file via robot framework
Error:
robot TestCases/TC2_jmeter.robot
==============================================================================
TC2 jmeter
==============================================================================
Get_weather_info | FAIL |
AttributeError: module 'string' has no attribute 'split'
------------------------------------------------------------------------------
TC2 jmeter | FAIL |
1 test, 0 passed, 1 failed
==============================================================================
Sounds like usage of a deprecated string function
If you're using this library then it supposed to work with Python 2.7, I think you should be able to still get it, or alternatively identify and re-write the problematic piece of the library, it's open source in any case.
In general you should not need any extra libraries, it's quite possible to kick off a JMeter test in non-GUI mode or generate a HTML Reporting Dashboard using subprocess module
Getting error when I run following code:
Parameters:
Counter:
Type : Number
Default : 5
Description : Maximum number of times to check query execution
Error:
An error occurred (ValidationError) when calling the CreateChangeSet operation: Invalid input for parameter key Counter. Cannot specify usePreviousValue as true for a parameter key not in the previous template
I am writing code in yaml and running via AWS cloudformation.
Are you creating a ChangeSet or updating the stack using the option usePreviousValue? The error mentions you are using the usePreviousValue with a parameter that doesn't exist in the template. You can only use the previous value if this parameter is part of the latest version of the template.
We are using TeamCity to process hundreds of builds. We added a custom command line script which prints an error to console, and if the enviroment variable TEAMCITY_VERSION is set, then we print the error message in the format TeamCity understands:
Console.Out.WriteLine(
"##teamcity[message text='Custom Script failed.' errorDetails='" +
ex.Message + "' status='ERROR']");
Now, I see that the error is displayed in the build log, however, under the build details, we only see [13:00:25]Process exited with code 1, and in the email notification sent to developers that included changes in that build, only that line is sent.
Is it possible to send in the email, and include in the build details the error we actually print to the console?
There is some build script interaction available:
Console.Out.WriteLine(
"##teamcity[buildProblem text='Custom Script failed.' errorDetails='" +
ex.Message + "']");
And complete it with a buildStatus:
Console.Out.WriteLine(
"##teamcity[buildStatus text='{build.status.text} : Environment variable issue.' status='FAILURE']");
You can get more information about building script interaction on the official website:
When you will send the mail, if you have a specific routine which watch the build, you can get information easily using the available api.
I'm working on deploying application to WebSphere 7 using python script and the script is throwing exception at this line:-
AdminTask.listTCPEndPoints('abc(abc)')
If I run the above command before I run the python script, it works fine. It gives me an error ADMF0003E: Invalid parameter value. But the same command fails in the python script with this error:
wsadmin>AdminTask.listTCPEndPoints('abc(abc)')
WASX7015E: Exception running command: "AdminTask.listTCPEndPoints('abc(abc)')"; exception information: com.ibm.websphere.management.cmdframework.CommandValidationException: ADMF0007E: target object is required.
I can guess that there something in the python script that is causing this issue, but I don't understand why is the AdminTask.listTCPEndPoints command is not able to see the parameter being passed. I'm new to WebSphere, I have only used it in past but never configured it. Any help/insight would be highly appreciated.
Thanks!
Added stack trace of interactive mode option
wsadmin>print AdminTask.listTCPEndPoints('-interactive')
List NamedEndPoints that can be used by a TCPInboundChannel
Lists all NamedEndPoints that can be associated with a TCPInboundChannel
*TCPInboundChannel: abc(abc)
excludeDistinguished (excludeDistinguished): 0
WASX7435W: Value 0 is converted to a boolean value of false.
unusedOnly (unusedOnly): 0
WASX7435W: Value 0 is converted to a boolean value of false.
List NamedEndPoints that can be used by a TCPInboundChannel
F (Finish)
C (Cancel)
Select [F, C]: [F] F
WASX7278I: Generated command line: AdminTask.listTCPEndPoints('[-excludeDistinguished false -unusedOnly false]')
WASX7015E: Exception running command: "AdminTask.listTCPEndPoints('-interactive')"; exception information:
com.ibm.websphere.management.cmdframework.CommandValidationException: ADMF0007E: target object is required.
Follow this link. It appears that you have not specified the target object that's why that error is coming.
I suggest use the following command as a starter
print AdminTask.listTCPEndPoints('-interactive')
Note: Instead of copying and pasting the command, type it on the command line. sometimes command editor does not take the command after pasting it directly.
Okay, I was able to fix the error. I was getting that error because as part of the application deployment script, I was copying few of my application jars to WebSphere's java/jre/lib/ext directory so that those are available in classpath. In one of those jar, I had bundled an IBM class (Base64Coder.class) which was required by a class in my jar and it was corrupting the WebSphere AdminTask utility. When I removed that Base64Coder.class from my jar, python script worked fine. I believe, the reason it corrupted WebSphere was that there was a duplication of the same class in the JVM as the class comes with IBM WebSphere installation and was present in AppServer/runtimes/com.ibm.ws.webservices.thinclient_7.0.0.jar