Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-cpplib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-cpplib
Commits
3e3196e5
Verified
Commit
3e3196e5
authored
2 years ago
by
Timm Fitschen
Browse files
Options
Downloads
Patches
Plain Diff
Add BUILD_ACM to pipeline
parent
2e5b4785
No related branches found
No related tags found
2 merge requests
!42
Release 0.2.0
,
!40
F dot in username
Pipeline
#24973
failed
2 years ago
Stage: info
Stage: setup
Stage: test
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+2
-1
2 additions, 1 deletion
.gitlab-ci.yml
src/cxxcaosdbcli.cpp
+14
-4
14 additions, 4 deletions
src/cxxcaosdbcli.cpp
with
16 additions
and
5 deletions
.gitlab-ci.yml
+
2
−
1
View file @
3e3196e5
...
...
@@ -84,7 +84,8 @@ test:
script
:
-
mkdir build
-
cd build
-
conan install .. -s "compiler.libcxx=libstdc++11"
-
VERSION="$(conan inspect --raw version ..)"
-
conan install -s "compiler.libcxx=libstdc++11" -o build_acm=True .. "caosdb/$VERSION"
-
cmake -DCMAKE_BUILD_TYPE=Debug ..
-
cmake --build . -j
-
cmake --build . -j --target unit_test_coverage
...
...
This diff is collapsed.
Click to expand it.
src/cxxcaosdbcli.cpp
+
14
−
4
View file @
3e3196e5
...
...
@@ -46,7 +46,9 @@ using boost::program_options::positional_options_description;
using
boost
::
program_options
::
store
;
using
boost
::
program_options
::
value
;
using
boost
::
program_options
::
variables_map
;
#ifdef BUILD_ACM
using
caosdb
::
acm
::
Role
;
#endif
auto
print_version
(
bool
print
)
->
void
{
if
(
print
)
{
...
...
@@ -98,6 +100,7 @@ auto execute_query(std::string query) -> void {
}
}
#ifdef BUILD_ACM
auto
list_roles
()
->
void
{
std
::
cout
<<
"Known roles:"
<<
std
::
endl
;
const
auto
&
connection
=
caosdb
::
connection
::
ConnectionManager
::
GetDefaultConnection
();
...
...
@@ -125,6 +128,7 @@ auto delete_role(std::string name) {
connection
->
DeleteSingleRole
(
name
);
std
::
cout
<<
"OK"
<<
std
::
endl
;
}
#endif
auto
main
(
int
argc
,
const
char
*
argv
[])
->
int
{
try
{
...
...
@@ -137,10 +141,14 @@ auto main(int argc, const char *argv[]) -> int {
"retrieve"
,
value
<
std
::
string
>
()
->
notifier
(
retrieve_entity_by_id
),
"Retrieve an entity by id and print its JSON representation."
)(
"execute-query"
,
value
<
std
::
string
>
()
->
notifier
(
execute_query
),
"Execute a query and print the results"
)(
"list-roles"
,
"List all known roles"
)(
"retrieve-role"
,
value
<
std
::
string
>
()
->
notifier
(
retrieve_role
),
"Retrieve a role by name"
)(
"create-role"
,
value
<
std
::
string
>
()
->
notifier
(
create_role
),
"Create a new role"
)(
"delete-role"
,
value
<
std
::
string
>
()
->
notifier
(
delete_role
),
"Create a new role"
);
"Execute a query and print the results"
)
#ifdef BUILD_ACM
(
"list-roles"
,
"List all known roles"
)(
"retrieve-role"
,
value
<
std
::
string
>
()
->
notifier
(
retrieve_role
),
"Retrieve a role by name"
)(
"create-role"
,
value
<
std
::
string
>
()
->
notifier
(
create_role
),
"Create a new role"
)(
"delete-role"
,
value
<
std
::
string
>
()
->
notifier
(
delete_role
),
"Create a new role"
)
#endif
;
parser
.
options
(
desc
);
...
...
@@ -158,6 +166,7 @@ auto main(int argc, const char *argv[]) -> int {
}
else
if
(
vm
[
"version"
].
as
<
bool
>
())
{
}
else
if
(
vm
.
count
(
"test-connection"
))
{
test_connection
();
#ifdef BUILD_ACM
}
else
if
(
vm
.
count
(
"list-roles"
))
{
list_roles
();
}
else
if
(
vm
.
count
(
"retrieve-role"
))
{
...
...
@@ -165,6 +174,7 @@ auto main(int argc, const char *argv[]) -> int {
}
else
if
(
vm
.
count
(
"create-role"
))
{
}
else
if
(
vm
.
count
(
"delete-role"
))
{
}
else
if
(
vm
.
count
(
"execute-query"
))
{
#endif
}
else
{
print_version
(
true
);
test_connection
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment