aboutsummaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* Export ini_section_create() functionJoseph Hunkeler2024-07-131-0/+8
|
* Change return value of conda_setup_headless() from void to intJoseph Hunkeler2024-07-131-1/+1
| | | | * Replace exit() with return;
* Add github.c and github.h (#9)Joseph Hunkeler2024-07-065-19/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add github.c and github.h * Implements get_github_release_notes() * Remove unused variables * Fix circular dependency on tplfunc_frame * Remove predeclaration of tplfunc_frame * tpl_register_func accepts pointer to void instead * tpl_register_func sets maximum number of arguments * Frame is generated within tpl_register_func * Improve template function error handling and return/output management * Remove redundant extern statement * Include github.h and template_func_proto.h in core.h * Expose get_github_release_notes_tplfunc_entrypoint function to template engine * Add template_func_proto.c and template_func_proto.h * Replace free() with guard variant * Fix test_template::test_tpl_register_func * Fix tests * Fix tests * cmd should be at least PATH_MAX in size. * Magic number caused failure to install conda with a long installation path * Implement get_github_release_notes_auto function that bases release note data off test contexts * Disable overwriting releases by default * Add automatic release note generation function call to release_notes.md.in * Fix test_tpl_register_func() * Add enough space for tar command plus a path * Fix circular include * Github functions do not require access to core.h anyway * Add comments to union * Update README to mention template function availability * Add EnvCtl structure * Add runtime checks to avoid running all the way to the end only to be met with a configuration error. * Rename GITHUB to GH * Development docs pre-rough-draft
* Pass .ci_support/plat_arch_.yaml to conda-build (#8)Joseph Hunkeler2024-06-243-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Pass .ci_support/plat_arch_.yaml to conda-build * Fixes a few outstanding leaks in delivery context * Move micromamba function out of stasis_indexer.c * Adjust code in the indexer to accommodate the move. The function now expects a MicromambaInfo structure as its first argument. * Add missing warning message * User is informed when pandoc is not available for HTML page generation * Initialize workdir_template string to zero * Add micromamba program to runtime PATH * Expose storage.tools_dir to template engine * Remove dead code * Fix wording in comment * Fix conda-forge builds * Pass their .ci_support configurations to conda-build in order to fully set up their build runtime environment * Add get_cpu_count() * Exposes STASIS_CPU_COUNT and CPU_COUNT to the runtime environment * Implements conda reactivation template string * {{ workaround.conda_reactivate }} * This is useful to call after installing any conda packages within a test.script * Fix conda runtime inside of test.script * This ensures conda and mamba are fully initialized. * Previous behavior only placed the commands on the PATH but didn't provide any shell macros (i.e. undefined behavior) * Document CPU_COUNT and workaround.conda_reactivate
* Rebrand OhMyCal (OMC) as STASIS (#7)Joseph Hunkeler2024-06-2122-137/+137
|
* Unit tests (#6)Joseph Hunkeler2024-06-206-32/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Initial commit of unit tests [WIP] * Address shortcomings and bugs flushed out by unit tests * Enable unit testing in CI workflow * Enable verbose ctests * Handle lack of __FILE_NAME__ define * Only podman support `run --arch` argument * Skip docker build testing if CI system cannot pull an image * Remove errant call to puts() * Identify local repo user * Fix missing xmllint * NULL terminate arrays * Fix filename assignment in is_url mode * Break loop when expected lines are exhausted * strcmp_array expects NULL terminated array. Iterating by size in this case passes NULL to strcmp leading to an invalid read * Remove debug printf statements * Disable a few warnings for tests * Workaround for ctest junit xml truncation * Update checkout@v4 * Prevent false-positive result * Return zero on error * Fix strlist_remove function * Value argument can be constant * Fix test to match changes to startswith and endswith * Add test_ini.c * Fix redaction code to accept NULL pointers in array * And let the caller specify the length of the array of strings to redact. * Redactions now occur directly on authentication strings rather than their command line arguments * Fix BUILD_TESTING_DEBUG * Adds missing -D argument
* Remove newlineJoseph Hunkeler2024-05-211-1/+0
|
* Consolidate OMC_COLOR_ definesJoseph Hunkeler2024-05-211-0/+40
|
* Documentation updateJoseph Hunkeler2024-05-202-2/+293
|
* junitxml: add missing "error" typeJoseph Hunkeler2024-05-171-18/+49
|
* DocumentationJoseph Hunkeler2024-05-161-0/+57
|
* First pass at test result creation, and optional markdown->html conversionJoseph Hunkeler2024-05-162-0/+48
|
* Allow doxygen to ingest header fileJoseph Hunkeler2024-05-031-4/+4
|
* Add delivery_dump_metadata()Joseph Hunkeler2024-05-021-0/+3
|
* Move listdir to utils.c and export prototypeJoseph Hunkeler2024-05-021-0/+3
|
* Convert ohmycal to a libraryJoseph Hunkeler2024-05-021-0/+5
|
* Move artifactory authentication redaction code into its own function: ↵Joseph Hunkeler2024-04-151-0/+43
| | | | redact_sensitive()
* Add ini_has_key() and expose ini_section_search() functionJoseph Hunkeler2024-04-151-0/+20
| | | | * ini_section_search now has three matching modes _EXACT, _BEGINS, and _SUBSTR
* Add ini_setval() functionJoseph Hunkeler2024-04-151-0/+13
|
* Save raw and rendered versions of the input configuration.Joseph Hunkeler2024-04-121-0/+1
|
* Export bootstrap_build_info()Joseph Hunkeler2024-04-121-0/+3
|
* Allow filtering of tags from repositories during build/test phaseJoseph Hunkeler2024-04-121-8/+9
| | | | | * The version requested and the tag resolved by git describe may be different if the project's maintainer tagged a commit object more than once. * If version 1.2.3 and 1.2.3a fall on the same commit, one can now filter the "a" to ensure the tag is reported correctly during build/test.
* Remove HOME redirectionJoseph Hunkeler2024-04-101-1/+0
| | | | * If the user wants that, they need to reassign HOME manually prior to executing OMC
* fixme: add artifactory url to globalsJoseph Hunkeler2024-04-101-0/+1
|
* Stop duplicating the jfrog authentication context for each upload context.Joseph Hunkeler2024-04-101-1/+2
| | | | | | * We only need one * RAM isn't peppered with auth data * The artifactory URL has been consolidated and exposed as a template variable: deploy.jfrog.url
* Consolidate INIFILE handling across the delivery contextJoseph Hunkeler2024-04-101-0/+12
| | | | * Break delivery_init() into separate populate_* functions
* We no longer pass INIFILE pointers to delivery_init()Joseph Hunkeler2024-04-101-1/+1
|
* Rewriting the specfile is now a two stage processJoseph Hunkeler2024-04-101-1/+4
| | | | | * This allows for generating a template spec file that can consumed and manipulated by the Dockerfile, and OMC's machinery * To reduce complexity the tpl_* functions are not used.
* Add docker_validate_image_compression()Joseph Hunkeler2024-04-101-0/+2
|
* Add docker_sanitize_tag()Joseph Hunkeler2024-04-101-0/+1
| | | | * Replace invalid docker tag characters with dash ('-')
* Write conda installer to a temporary location instead of the current working ↵Joseph Hunkeler2024-04-101-3/+4
| | | | | | directory * Replaces function argument "delivery" with "ctx" for better consistency
* Reenable installation via local wheelsJoseph Hunkeler2024-04-021-0/+1
|
* Include wheel.hJoseph Hunkeler2024-04-021-0/+1
|
* Reset HOME to point to a temporary directory to prevent contaminating the ↵Joseph Hunkeler2024-04-021-0/+1
| | | | user account's home directory with build artifacts, caches, and other artifacts
* Use do-while in COE_CHECK_ABORT.Joseph Hunkeler2024-04-021-6/+7
| | | | | * continue_on_error is always checked * An additional conditional can be passed. Use `1` to fail normally. Use `0` to never fail.
* Add REPLACE_TRUNCATE_AFTER_MATCH mode to replace_textJoseph Hunkeler2024-04-021-2/+4
|
* Adjust guard_strlist_free to match new function signatureJoseph Hunkeler2024-04-021-1/+1
|
* Changes to strlist_*() functions:Joseph Hunkeler2024-04-021-3/+3
| | | | | Functions that modify the input StrList have been refactored to use `struct StrList **` instead of `struct StrList *`. * Fixes realloc error handling
* Changes to ini_write() behavior:Joseph Hunkeler2024-04-021-1/+5
| | | | | | * Caller can choose to dump raw unmodified key/value pairs, or render all values through the template engine * Fixes spurious line feeds injected into the output stream * Uses LINE_SEP instead of "\n"
* Fix replace_text*() functionsJoseph Hunkeler2024-04-021-2/+2
| | | | | * Now return an error code * Completely rewrote replace_text()
* Rebrand to OMCJoseph Hunkeler2024-03-261-3/+3
|
* Dynamically allocate Delivery.system.platform array.Joseph Hunkeler2024-03-221-1/+1
| | | | * This avoids compiler warnings about passing the address to a stack-allocated chunk of member in tpl_register.
* Remove split_free() functionJoseph Hunkeler2024-03-221-1/+0
|
* Add GENERIC_ARRAY_FREE macro to avoid code duplications when freeing ↵Joseph Hunkeler2024-03-221-0/+6
| | | | character arrays
* Make SYSERROR macro act more like perror, and allow extra argumentsJoseph Hunkeler2024-03-221-1/+4
|
* Move collapse_whitespace to utils.c / utils.hJoseph Hunkeler2024-03-221-0/+2
|
* Add fix_tox_conf functionJoseph Hunkeler2024-03-142-0/+12
| | | | * If the user calls tox in a test script like so: tox {{ workaround.tox_posargs }}, then a temporary tox configuration will be generated and the appropriate arguments to use it will be injected into tox's command line arguments
* Pretty-print pytest xml results (if xmllint is present)Joseph Hunkeler2024-03-142-0/+14
| | | | | | | * Adds Delivery.storage.results_dir member * Exposes storage.results_dir to templates * This is to make the test results human-readable * xmllint is optional. If it isn't installed it isn't a big deal.
* Add template functions to store/load function pointers.Joseph Hunkeler2024-03-141-0/+24
| | | | * Incomplete and unused for now
* Replace ini_show with ini_writeJoseph Hunkeler2024-03-141-2/+4
| | | | * One can still display the ini configuration by using ini_show(iniptr, stdout);