-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added default:sys.cf_edition variable #5679
Added default:sys.cf_edition variable #5679
Conversation
Ticket: ENT-10078 Signed-off-by: Victor Moene <[email protected]> Changelog: Introduced a new variable default:sys.cf_edition that keeps track whether cfengine is community or enterprise.
e4f055d
to
81a56e8
Compare
@cf-bottom jenkins, please |
Alright, I triggered a build: Jenkins: https://ci.cfengine.com/job/pr-pipeline/11612/ Packages: http://buildcache.cfengine.com/packages/testing-pr/jenkins-pr-pipeline-11612/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done 🚀
@cf-bottom try jenkins again, please :) |
Sure, I triggered a build: Jenkins: https://ci.cfengine.com/job/pr-pipeline/11616/ Packages: http://buildcache.cfengine.com/packages/testing-pr/jenkins-pr-pipeline-11616/ |
const Class *enterprise_edition = EvalContextClassGet(ctx, "default", "enterprise_edition"); | ||
if (enterprise_edition == NULL) | ||
{ | ||
EvalContextVariablePutSpecial(ctx, SPECIAL_SCOPE_SYS, "cf_edition", "community", CF_DATA_TYPE_STRING, "derived-from=enterprise_edition,report"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see we have one more tag which we typically use for things like this:
EvalContextVariablePutSpecial(ctx, SPECIAL_SCOPE_SYS, "cf_edition", "community", CF_DATA_TYPE_STRING, "derived-from=enterprise_edition,report"); | |
EvalContextVariablePutSpecial(ctx, SPECIAL_SCOPE_SYS, "cf_edition", "community", CF_DATA_TYPE_STRING, "derived-from=enterprise_edition,report,source=agent"); |
source=agent
means this is defined in the agent (in the C code), as opposed to being defined in the policy.
} | ||
else | ||
{ | ||
EvalContextVariablePutSpecial(ctx, SPECIAL_SCOPE_SYS, "cf_edition", "enterprise", CF_DATA_TYPE_STRING, "derived-from=enterprise_edition,report"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EvalContextVariablePutSpecial(ctx, SPECIAL_SCOPE_SYS, "cf_edition", "enterprise", CF_DATA_TYPE_STRING, "derived-from=enterprise_edition,report"); | |
EvalContextVariablePutSpecial(ctx, SPECIAL_SCOPE_SYS, "cf_edition", "enterprise", CF_DATA_TYPE_STRING, "derived-from=enterprise_edition,report,source=agent"); |
No description provided.