diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-01-30 00:16:22 -0500 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-01-30 00:16:22 -0500 |
commit | 31936d2d7230f9134e17148646b23aaf1e6c1c13 (patch) | |
tree | 13de1eb38a1ace43eaf15e18c43a9a79b91da575 /include | |
parent | 95b791fa4625eaec2a612a4fd9043b7e7148b341 (diff) | |
download | stasis-31936d2d7230f9134e17148646b23aaf1e6c1c13.tar.gz |
General improvements
* Fix segfault related to Delivery.storage.tmpdir not being initialized properly
* Add delivery_format_str() to make delivery rules easier to maintain
* Test configurations can accept their own runtime variables
* When no conda package or python packages are to be installed, indicate that state by printing "N/A" in output summary
* Change shell_safe() accept a string instead of an array
* Add support for artifactory client certs key/path
* Initial pass at defining an artifactory repo destination (not fully implemented yet)
* Add missing line feeds to error messages during ini config initialization
Diffstat (limited to 'include')
-rw-r--r-- | include/deliverable.h | 36 | ||||
-rw-r--r-- | include/system.h | 5 |
2 files changed, 38 insertions, 3 deletions
diff --git a/include/deliverable.h b/include/deliverable.h index 135a14c..e699703 100644 --- a/include/deliverable.h +++ b/include/deliverable.h @@ -28,6 +28,12 @@ #define DEFER_CONDA 0 ///< Build conda packages #define DEFER_PIP 1 ///< Build python packages +struct Content { + unsigned type; + char *filename; + char *data; +}; + /*! \struct Delivery * \brief A structure describing a full delivery object */ @@ -49,6 +55,7 @@ struct Delivery { char *tmpdir; ///< Temporary storage area (within root) char *delivery_dir; ///< Delivery artifact output directory char *tools_dir; ///< Tools storage + char *mission_dir; ///< Mission data storage char *conda_install_prefix; ///< Path to install Conda char *conda_artifact_dir; ///< Base path to store compiled conda packages char *conda_staging_dir; ///< Base path to copy compiled conda packages @@ -123,6 +130,12 @@ struct Delivery { char *build_recipe; ///< Conda recipe to build (optional) struct Runtime runtime; ///< Environment variables specific to the test context } tests[1000]; ///< An array of tests + + struct Rule { + bool enable_final; ///< true=allow rc value replacement, false=keep rc value even if final release + char *release_fmt; ///< Release generator format string + struct Content content[1000]; + } rules; }; /** @@ -284,6 +297,29 @@ void delivery_conda_enable(struct Delivery *ctx, char *conda_install_dir); */ void delivery_install_conda(char *install_script, char *conda_install_dir); +/** + * Generate a formatted release string + * + * Formatters: + * %n = Delivery Name + * %c = Delivery Codename (HST mission, only) + * %m = Mission + * %R = Delivery Revision number (or "final") + * %r = Delivery Revision number + * %v = Delivery Version + * %P = Python version (i.e. 3.9.1) + * %p = Compact Python version (i.e. 3.9.1 -> 39) + * %a = System architecture name + * %o = System platform name + * %t = Delivery timestamp (Unix Epoch) + * + * @param ctx pointer to Delivery context + * @param dest NULL pointer to string, or initialized string + * @param fmt release format string + * @return 0 on success, -1 on error + */ +int delivery_format_str(struct Delivery *ctx, char **dest, const char *fmt); + // helper function void delivery_gather_tool_versions(struct Delivery *ctx); diff --git a/include/system.h b/include/system.h index 32c7c79..8ad613f 100644 --- a/include/system.h +++ b/include/system.h @@ -21,9 +21,8 @@ struct Process { int returncode; }; -int shell(struct Process *proc, char *args[]); -int shell2(struct Process *proc, char *args); -int shell_safe(struct Process *proc, char *args[]); +int shell(struct Process *proc, char *args); +int shell_safe(struct Process *proc, char *args); char *shell_output(const char *command, int *status); #endif //OMC_SYSTEM_H |