How to authenticate matlab CI on bitbucket pipeline
8 次查看(过去 30 天)
显示 更早的评论
Hi All,
I was trying to run a matlab pipeline on bitbucket, but wasn't able to get things running. Even the simplist of examples failed.
# This is an example Starter pipeline configuration
# Use a skeleton to build, test and deploy using manual and parallel steps
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: mathworks/matlab:r2020b
pipelines:
default:
- parallel:
- step:
name: 'Build and Test'
script:
- echo "Your build and test goes here..."
- which matlab
- ls
- pwd
- matlab -batch "test"
test.m:
disp(["Current folder: " pwd])
the resulting output was:
+ umask 000
+ GIT_LFS_SKIP_SMUDGE=1 retry 6 git clone --branch="master" --depth 50 https://x-token-auth:$REPOSITORY_OAUTH_ACCESS_TOKEN@bitbucket.org/$BITBUCKET_REPO_FULL_NAME.git $BUILD_DIR
Cloning into '/opt/atlassian/pipelines/agent/build'...
+ git reset --hard 34fe2e3f4340d345d63c64a786a7554a73318ef6
HEAD is now at 34fe2e3 bitbucket-pipelines.yml edited online with Bitbucket
+ git config user.name bitbucket-pipelines
+ git config user.email commits-noreply@bitbucket.org
+ git config push.default current
+ git config http.${BITBUCKET_GIT_HTTP_ORIGIN}.proxy http://localhost:29418/
+ git remote set-url origin http://bitbucket.org/$BITBUCKET_REPO_FULL_NAME
+ git reflog expire --expire=all --all
+ echo ".bitbucket/pipelines/generated" >> .git/info/exclude
+ chmod 777 $BUILD_DIR
Images used:
build : docker.io/mathworks/matlab@sha256:b0228cdcb741437f4f6fc4808a90c6500fbb483f4186a4f533afa894f8d2ae38
+ echo "Your build and test goes here..."
Your build and test goes here...
+ matlab -batch "test.m"
Searching for test report files in directories named [test-results, failsafe-reports, test-reports, surefire-reports] down to a depth of 4
Finished scanning for test reports. Found 0 test report files.
Merged test suites, total number tests is 0, with 0 failures and 0 errors.
i.e. no output or failure message.
2 个评论
Jonas Massmann
2022-6-20
Hi Walter, could you find any solution here? My feeling is that it's not possible in Bitbucket so far.
Lukas
2024-3-26
Hy Walter
Did you have any success in the meantime?
I would like to build a matlab pipeline in bitbucket as well.
回答(1 个)
Jacob Mathew
2025-6-24
MathWorks has an official GitHub page on how to setup MATLAB as part of a Continous Integration pipelines and run MATLAB tests:
Specifically, they have provided example tests and jenkinsfile which can be used to check if your CI pipelines are functioning. The test files are actual MATLAB UnitTests Testcases. This could be the reason the CI failed as the last part of the command window output notes "Merged test suites, total number tests is 0, with 0 failures and 0 errors."
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 MATLAB Report Generator 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!