aboutsummaryrefslogtreecommitdiff
path: root/include/artifactory.h
blob: 0fcf073602472861e9286aec84f48f248c91ba15 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#ifndef OMC_ARTIFACTORY_H
#define OMC_ARTIFACTORY_H

#include <stdio.h>
#include <stdlib.h>
#include "omc.h"

struct JFRT_Auth {
    bool insecure_tls;
    char *access_token;
    char *password;
    char *client_cert_key_path;
    char *client_cert_path;
    char *ssh_key_path;
    char *ssh_passphrase;
    char *user;
    char *server_id;
    char *url;
};

struct JFRT_Upload {
    bool quiet;
    char *project;
    bool ant;
    bool archive;
    char *build_name;
    char *build_number;
    bool deb;
    bool detailed_summary;
    bool dry_run;
    char *exclusions;
    bool explode;
    bool fail_no_op;
    bool flat;
    bool include_dirs;
    char *module;
    bool recursive;
    bool regexp;
    int retries;
    int retry_wait_time;
    char *spec;
    char *spec_vars;
    bool symlinks;
    bool sync_deletes;
    char *target_props;
    int threads;
    bool workaround_parent_only;
};

struct JFRT_Download {
    char *archive_entries;
    char *build;
    char *build_name;
    char *build_number;
    char *bundle;
    bool detailed_summary;
    bool dry_run;
    char *exclude_artifacts;
    char *exclude_props;
    char *exclusions;
    bool explode;
    bool fail_no_op;
    bool flat;
    char *gpg_key;
    char *include_deps;
    char *include_dirs;
    int limit;
    int min_split;
    char *module;
    int offset;
    char *project;
    char *props;
    bool quiet;
    bool recursive;
    int retries;
    int retry_wait_time;
    bool skip_checksum;
    char *sort_by;
    char *sort_order;
    char *spec;
    char *spec_vars;
    int split_count;
    bool sync_deletes;
    int threads;
    bool validate_symlinks;
};

int artifactory_download_cli(char *dest,
                             char *jfrog_artifactory_base_url,
                             char *jfrog_artifactory_product,
                             char *cli_major_ver,
                             char *version,
                             char *os,
                             char *arch,
                             char *remote_filename);
int jfrog_cli(struct JFRT_Auth *auth, char *args);
int jfrog_cli_rt_ping(struct JFRT_Auth *auth);
int jfrog_cli_rt_upload(struct JFRT_Auth *auth, struct JFRT_Upload *ctx, char *src, char *repo_path);
int jfrog_cli_rt_download(struct JFRT_Auth *auth, struct JFRT_Download *ctx, char *repo_path, char *dest);
int jfrog_cli_rt_build_collect_env(struct JFRT_Auth *auth, char *build_name, char *build_number);
int jfrog_cli_rt_build_publish(struct JFRT_Auth *auth, char *build_name, char *build_number);
void jfrt_upload_set_defaults(struct JFRT_Upload *ctx);

#endif //OMC_ARTIFACTORY_H