不明白 jenkins ci build 是如何工作的

发布于 2025-01-07 01:53:43 字数 1232 浏览 3 评论 0原文

我在詹金斯中有我的项目,当你构建它时,它会找到 script/cibuild 脚本并执行你在那里的任何内容。我从项目目录运行脚本,一切都很好,我从詹金斯运行构建,我收到错误吗?我不明白?

我的脚本/cibuild脚本:

#!/bin/sh   
# This script file is the entry point to ci.miranetworks.net build/test process.
# It is executed by jenkins, from the root directory
#

echo "1. cd into script "
cd script
echo "2. run createmysqldb test_traffic test_user password"
./createmysqldb test_traffic test_user password
echo "3. cd back into root dir "
cd ..
echo "4. create table with sql with: "
mysql -u test_user --password=password test_traffic < ./phoenix/data/sql/lib.model.schema.sql

export WORKSPACE=phoenix
export SYMFONY=$WORKSPACE/lib/vendor/symfony/lib
(cd $WORKSPACE
  echo "6. Clearing the cache"
  ./symfony cc
  echo "7. Run unit test"
  ./symfony php test/unit/RbcTest.php
)

echo "8. All done and exiting"
exit 0

所以当我使用 mysql -u test_user --password=password test_traffic 登录到mysql命令时,它是成功的,然后我授予所有并且我也得到:

 ERROR 1045 (28000): Access denied for user 'test_user'@'localhost' (using password: YES)

虽然在createmysqldb中我这样做:Q2 =“GRANT ALL ON <强>。至“$2”@“localhost”,由“$3”标识;”

谁能解释一下为什么我的访问被拒绝? 我对同一脚本有另一个问题,但想先解决这个问题:)

谢谢

i have my project in jenkins, when you build it, it finds the script/cibuild script and executes whatever you have in there. I run the script from my project directory and all is fine, i run the build from jenkins, i get errors? i dont understand?

my script/cibuild script:

#!/bin/sh   
# This script file is the entry point to ci.miranetworks.net build/test process.
# It is executed by jenkins, from the root directory
#

echo "1. cd into script "
cd script
echo "2. run createmysqldb test_traffic test_user password"
./createmysqldb test_traffic test_user password
echo "3. cd back into root dir "
cd ..
echo "4. create table with sql with: "
mysql -u test_user --password=password test_traffic < ./phoenix/data/sql/lib.model.schema.sql

export WORKSPACE=phoenix
export SYMFONY=$WORKSPACE/lib/vendor/symfony/lib
(cd $WORKSPACE
  echo "6. Clearing the cache"
  ./symfony cc
  echo "7. Run unit test"
  ./symfony php test/unit/RbcTest.php
)

echo "8. All done and exiting"
exit 0

so when i log onto mysql command with mysql -u test_user --password=password test_traffic it is succesfull then i do GRANT ALL and i also get:

 ERROR 1045 (28000): Access denied for user 'test_user'@'localhost' (using password: YES)

although in createmysqldb i do: Q2="GRANT ALL ON . TO '$2'@'localhost' IDENTIFIED BY '$3';"

can anyone explain why i get an access denied?
I have another issue with the same script but want to sort out this one first :)

thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

七分※倦醒 2025-01-14 01:53:43

据我所知,在 MySQL 中,您需要更改

ALL ON . TO ...

ALL ON .* TO ...

授予对所有表的访问权限?

As far as in MySQL i know you need to change

ALL ON . TO ...

into

ALL ON .* TO ...

to grant access to all tables ?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文