question1:
in jenkins, I use BUILD_NUMBER to generate my version file: xxx.$BUILD_NUMBER.tar
but in onedev, how to get BUILD_NUMBER value?
in jenkins like this:
if [ -z $BUILD_NUMBER ] || [ -z $JOB_NAME ] || [ -z $GIT_BRANCH ]; then
echo "Not in jenkins!"
echo "you can test use follow command"
echo "export BUILD_NUMBER=0; export JOB_NAME=pvetui/master; export GIT_BRANCH=master"
exit 1
fi
question 2: how to search issues in onedev?
Robin Shen commented 1 month ago
In commands field of the step, you may input '@' to bring up the variable prompt. For build number, it is @build_number@.
As to search by artibrary text, please surround with ~, as suggested in the auto completion dropdown. And you can press tab to have OneDev adding ~ automatically.
wc commented 1 month ago
In commands field of the step, you may input '@' to bring up the variable prompt. For build number, it is @build_number@.
As to search by artibrary text, please surround with ~, as suggested in the auto completion dropdown. And you can press tab to have OneDev adding ~ automatically.
build_number=@build_number@
echo "build_number is $build_number"
thank you, it works, How to get all built-in variables like @build_number@?
Robin Shen commented 1 month ago
As mentioned, just input @ and OneDev will prompt all available variables.
wc commented 1 month ago
As mentioned, just input @ and OneDev will prompt all available variables.
question1: in jenkins, I use BUILD_NUMBER to generate my version file: xxx.$BUILD_NUMBER.tar but in onedev, how to get BUILD_NUMBER value?
in jenkins like this:
question 2: how to search issues in onedev?