3#ifndef STASIS_DELIVERY_H
4#define STASIS_DELIVERY_H
14#define DELIVERY_PLATFORM_MAX 4
15#define DELIVERY_PLATFORM_MAXLEN 65
16#define DELIVERY_PLATFORM 0
17#define DELIVERY_PLATFORM_CONDA_SUBDIR 1
18#define DELIVERY_PLATFORM_CONDA_INSTALLER 2
19#define DELIVERY_PLATFORM_RELEASE 3
21#define DELIVERY_REWRITE_SPEC_STAGE_1 0
22#define DELIVERY_REWRITE_SPEC_STAGE_2 1
24#define INSTALL_PKG_CONDA 1 << 1
25#define INSTALL_PKG_CONDA_DEFERRED 1 << 2
26#define INSTALL_PKG_PIP 1 << 3
27#define INSTALL_PKG_PIP_DEFERRED 1 << 4
39#define TEST_NUM_ALLOC_INITIAL 10
187 char *image_compression;
394int delivery_gather_tool_versions(
struct Delivery *ctx);
397int delivery_init_tmpdir(
struct Delivery *ctx);
399void delivery_init_dirs_stage1(
struct Delivery *ctx);
401void delivery_init_dirs_stage2(
struct Delivery *ctx);
403int delivery_init_platform(
struct Delivery *ctx);
405int delivery_init_artifactory(
struct Delivery *ctx);
407int delivery_artifact_upload(
struct Delivery *ctx);
409int delivery_mission_render_files(
struct Delivery *ctx);
411int delivery_docker(
struct Delivery *ctx);
413int delivery_fixup_test_results(
struct Delivery *ctx);
415int bootstrap_build_info(
struct Delivery *ctx);
417int delivery_dump_metadata(
struct Delivery *ctx);
419int populate_info(
struct Delivery *ctx);
421int populate_delivery_cfg(
struct Delivery *ctx,
int render_mode);
423int populate_delivery_ini(
struct Delivery *ctx,
int render_mode);
425int populate_mission_ini(
struct Delivery **ctx,
int render_mode);
427void validate_delivery_ini(
struct INIFILE *ini);
429int filter_repo_tags(
char *repo,
struct StrList *patterns);
431#define DELIVERY_NOT_FOUND 0
432#define DELIVERY_FOUND 1
440int delivery_overlay_packages_from_env(
struct Delivery *ctx,
const char *env_name);
struct Delivery * delivery_duplicate(struct Delivery *ctx)
Definition delivery.c:4
void delivery_runtime_show(struct Delivery *ctx)
Definition delivery_show.c:97
void delivery_conda_enable(struct Delivery *ctx, char *conda_install_dir)
Definition delivery_conda.c:106
int delivery_copy_conda_artifacts(struct Delivery *ctx)
Definition delivery_postprocess.c:180
int delivery_exists(struct Delivery *ctx)
Definition delivery_init.c:400
int delivery_install_packages(struct Delivery *ctx, char *conda_install_dir, char *env_name, int type, struct StrList *manifest[])
int delivery_conda_enforce_package_version(struct Delivery *ctx, const char *env_name, const char *name)
Definition delivery_install.c:140
int tests_add(struct Tests *tests, struct Test *x)
Definition delivery_test.c:20
int delivery_init(struct Delivery *ctx, int render_mode)
Definition delivery_init.c:279
int delivery_index_conda_artifacts(struct Delivery *ctx)
Definition delivery_postprocess.c:204
int delivery_build_recipes(struct Delivery *ctx)
Definition delivery_build.c:7
void delivery_rewrite_stage1(struct Delivery *ctx, char *specfile)
Definition delivery_export.c:64
void delivery_install_conda(char *install_script, char *conda_install_dir)
Definition delivery_conda.c:66
void delivery_conda_show(struct Delivery *ctx)
Definition delivery_show.c:34
struct Test * test_init()
Definition delivery_test.c:37
int delivery_get_conda_installer(struct Delivery *ctx, char *installer_url)
Definition delivery_conda.c:37
void delivery_free(struct Delivery *ctx)
Definition delivery.c:198
void tests_free(struct Tests **x)
Definition delivery_test.c:72
void delivery_tests_run(struct Delivery *ctx)
Definition delivery_test.c:85
void delivery_rewrite_stage2(struct Delivery *ctx, char *specfile)
Definition delivery_export.c:73
void delivery_tests_show(struct Delivery *ctx)
Definition delivery_show.c:85
void delivery_rewrite_spec(struct Delivery *ctx, char *filename, unsigned stage)
Definition delivery_postprocess.c:71
void test_free(struct Test **x)
Definition delivery_test.c:52
void delivery_export(const struct Delivery *ctx, char *envs[])
Definition delivery_export.c:51
int delivery_purge_packages(struct Delivery *ctx, const char *env_name, int use_pkg_manager)
Definition delivery_install.c:293
int delivery_copy_wheel_artifacts(struct Delivery *ctx)
Definition delivery_postprocess.c:208
int delivery_format_str(struct Delivery *ctx, char **dest, size_t maxlen, const char *fmt)
Definition delivery.c:293
struct Tests * tests_init(size_t num_tests)
Definition delivery_test.c:3
void delivery_meta_show(struct Delivery *ctx)
Definition delivery_show.c:12
struct StrList * delivery_build_wheels(struct Delivery *ctx)
Definition delivery_build.c:371
void delivery_get_conda_installer_url(struct Delivery *ctx, char *result, size_t maxlen)
Definition delivery_conda.c:4
void delivery_defer_packages(struct Delivery *ctx, int type)
Definition delivery.c:357
int delivery_series_sync(struct Delivery *ctx)
Definition delivery_artifactory.c:194
int delivery_index_wheel_artifacts(struct Delivery *ctx)
Definition delivery_postprocess.c:216
char * delivery_get_release_header(struct Delivery *ctx)
Definition delivery_postprocess.c:14
Conda configuration.
Definition delivery.h:144
struct StrList * pip_packages_defer
Python packages to be built for delivery.
Definition delivery.h:157
char * installer_version
Version of installer.
Definition delivery.h:147
char * installer_baseurl
URL describing where Conda will be downloaded from.
Definition delivery.h:145
char * installer_platform
Platform/OS target of installer.
Definition delivery.h:148
struct StrList * wheels_packages
Wheel packages built for delivery.
Definition delivery.h:159
struct StrList * conda_packages_purge
Conda packages to remove from a delivery (for: based_on)
Definition delivery.h:155
char * installer_name
Name of installer (Miniconda3, Miniforge3, etc)
Definition delivery.h:146
char * tool_build_version
Installed version of "build" package.
Definition delivery.h:152
struct StrList * pip_packages_purge
Python packages to remove from a delivery (for: based_on)
Definition delivery.h:158
char * tool_version
Installed version of conda.
Definition delivery.h:151
struct StrList * pip_packages
Python packages to install (pip)
Definition delivery.h:156
struct StrList * conda_packages
Conda packages to deliver.
Definition delivery.h:153
char * installer_path
Absolute path of installer on-disk.
Definition delivery.h:150
struct StrList * conda_packages_defer
Conda recipes to be built for delivery.
Definition delivery.h:154
char * installer_arch
CPU architecture target of installer.
Definition delivery.h:149
Definition delivery.h:185
Definition delivery.h:178
Definition delivery.h:175
Release information (name & datetime)
Definition delivery.h:130
time_t time_now
Time stamp for when STASIS execution started.
Definition delivery.h:135
char * time_str_epoch
String representation of Unix epoch.
Definition delivery.h:136
struct tm * time_info
Delivery time structure.
Definition delivery.h:134
char * release_name
The fully combined release string.
Definition delivery.h:131
Definition delivery.h:196
bool enable_final
true=allow rc value replacement, false=keep rc value even if final release
Definition delivery.h:198
char * build_number_fmt
Build number format string.
Definition delivery.h:201
char * build_name_fmt
Build name format string.
Definition delivery.h:200
char * release_fmt
Release format string.
Definition delivery.h:199
Global runtime variables.
Definition delivery.h:165
RuntimeEnv * environ
Environment variables.
Definition delivery.h:166
Container for INIFILE handles.
Definition delivery.h:67
Storage paths.
Definition delivery.h:86
char * package_dir
Base path to where all packages are stored.
Definition delivery.h:94
char * tools_dir
Tools storage.
Definition delivery.h:92
char * build_recipes_dir
Path to store conda recipes.
Definition delivery.h:106
char * wheel_artifact_dir
Base path to store compiled wheel packages (Unused)
Definition delivery.h:102
char * build_sources_dir
Path to store source code.
Definition delivery.h:107
char * docker_artifact_dir
Base path to store saved docker images.
Definition delivery.h:101
char * output_dir
Base path to where all artifacts are stored.
Definition delivery.h:89
char * build_testing_dir
Path to store test data (Unused)
Definition delivery.h:108
char * conda_staging_dir
Base path to copy compiled conda packages.
Definition delivery.h:99
char * results_dir
Base path to where test results are stored.
Definition delivery.h:95
char * wheel_staging_dir
Base path to copy compiled wheel packages (Unused)
Definition delivery.h:103
char * delivery_dir
Delivery artifact output directory.
Definition delivery.h:90
char * tmpdir
Temporary storage area (within root)
Definition delivery.h:88
char * conda_staging_url
URL to access compiled conda packages.
Definition delivery.h:100
char * cfgdump_dir
Base path to where input configuration dumps are stored.
Definition delivery.h:91
char * conda_artifact_dir
Base path to store compiled conda packages.
Definition delivery.h:98
char * wheel_staging_url
URL to access compiled wheel packages (Unused)
Definition delivery.h:104
char * conda_install_prefix
Path to install Conda.
Definition delivery.h:97
char * build_dir
Base path to store source code and recipes.
Definition delivery.h:105
char * meta_dir
Base path to where metadata records are stored.
Definition delivery.h:96
char * mission_dir
Mission data storage.
Definition delivery.h:93
char * root
Top-level storage area.
Definition delivery.h:87
char * build_docker_dir
Path to store docker build script.
Definition delivery.h:109
System information.
Definition delivery.h:79
char * arch
System CPU architecture ident.
Definition delivery.h:80
char ** platform
System platform name.
Definition delivery.h:81
Definition delivery.h:169
A structure describing a full delivery object.
Definition delivery.h:63
A structure to describe an INI configuration file.
Definition ini.h:82
JFrog Artifactory Authentication struct.
Definition artifactory.h:11
JFrog Artifactory Upload struct.
Definition artifactory.h:25
An array of tests.
Definition delivery.h:44
char * repository
Git repository of package.
Definition delivery.h:47
char * script_setup
Commands to execute before the main script.
Definition delivery.h:48
char * name
Name of package.
Definition delivery.h:45
struct StrList * repository_remove_tags
Git tags to remove (to fix duplicate commit tags)
Definition delivery.h:55
char * repository_info_ref
Git commit hash.
Definition delivery.h:53
bool disable
Toggle a test block.
Definition delivery.h:50
struct Runtime * runtime
Environment variables specific to the test context.
Definition delivery.h:56
char * repository_info_tag
Git tag (first parent)
Definition delivery.h:54
bool parallel
Toggle parallel or serial execution.
Definition delivery.h:51
char * version
Version of package.
Definition delivery.h:46
int timeout
Timeout in seconds.
Definition delivery.h:57
char * script
Commands to execute.
Definition delivery.h:49
char * build_recipe
Conda recipe to build (optional)
Definition delivery.h:52