我有一个 Liberty Profile 应用程序,我正在使用 devops 管道构建/部署它,但我没有看到任何确定正在运行的当前构建的机制。我已经转储了所有环境变量,但似乎没有任何迹象表明内部版本号。
价值是我找不到的地方还是真的不可用?
Build and Deploy Jobs in Bluemix DevOps Services offer and environment variable called: BUILD_NUMBER. This variable is not propagated automatically to Bluemix runtimes.
Perhaps in the deploy script, you can add a Cloud Foundry environment variable associated to your app. Something like:
cf set-env "${CF_APP}" BUILD_NUMBER "${BUILD_NUMBER}"
so you will have such info accessible from the running code.
Hope it helps!