aboutsummaryrefslogtreecommitdiffstats
path: root/man/repackage.man
blob: df32ab7914c9698c906f9b6f13417f6a042a47d1 (plain)
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
.TH repackage 1 {{DATE}} OpenECOMP OpenECOMP
.SH NAME
repackage - package an set of files into debian,
or docker packages
.SH SYNOPSIS
.HP 20
repackage [-h] [-n] [-c] [-N] [-K] [-v] -b PACKAGETYPE [-u] [-d DIRECTORY]
[-e ENVIRONFILE] [-o OUTPUTDIRECTORY]
.SH DESCRIPTION
Build the specified packages. 'package-type' is one or more of docker, debian,
(comma-separated), or 'all' to build all of them.
.SH OPTIONS
.TP 20
-h, --help
show a help message and exit
.TP 20
-n, --skipexecution
indicate the packages and exit
.TP 20
-c, --usecache
if a debian/tar/tgz artifact already exists use it
.TP 20
-N, --skipbuild
skip actually building the packages
.TP 20
-K, --keeptempfiles
keep temp files at exit
.TP 20
-v, --verbose
turn on verbosity
.TP 20
-b PACKAGETYPE, --packagetype PACKAGETYPE
The package-type may be specified multiple times or
may use a ','-separated or space-separated list. 'all'
is an alias for all of them.
Potential values are
debian, docker, 
tar or tgz
.TP 20
-u, --upload
Depending on package type -- docker, debian, tar or
tgz -- uploads the artifact to a remote repository.
For Docker, uses $DOCKERREGISTRY as the remote
repository to push the image. For Debian, uses
$REPACKAGEDEBIANUPLOAD as the command, with {0} as the
local path to the debian image, {1} as the image name
with build number, and optionally {2} as groupId (may
be used as part of the directory path), {3} as the
image name without the build number, and {4} as the
image name with no build number and no .deb suffix.
For additional uploads, this will also look for
$REPACKAGEDEBIANUPLOAD2, $REPACKAGEDEBIANUPLOAD3,
etc., and repeat the upload. For tar, uses
$REPACKAGETARUPLOAD as the command. Everything said
about $REPACKAGEDEBIANUPLOAD applies to
$REPACKAGETARUPLOAD. For tgz, uses $REPACKAGETGZUPLOAD
as the command. Everything said about
$REPACKAGEDEBIANUPLOAD applies to $REPACKAGETGZUPLOAD.
In addition, if --multipleuploadversions
is used, the above will be executed using the list of upload
version numbers specified there. This is typically used to
create multiple versions (using --multipleuploadversions) on
multiple remote repositories (using $REPACKAGE*UPLOAD).
.TP 20
-d DIRECTORY, --directory DIRECTORY
where to find the stage directory and repackage.yaml.
Defaults to '.'
.TP 20
-e ENVIRONFILE, --environfile ENVIRONFILE
Optional environment file. Overrides
$REPACKAGEENVFILE, defaults to /dev/null
.TP 20
-o OUTPUTDIRECTORY, --outputdirectory OUTPUTDIRECTORY
Output directory. Defaults to 'output' under --directory
path.
.TP 20
-y FILE, --repackageyaml FILE
Name of parameter file. Defaults to 'repackage.yaml' or 'repackage.json' under --directory path.
.TP 20
-B buildnumber, --buildnumber BUILD-NUMBER
Build number. Defaults to $BUILD_NUMBER, which defaults to a date-based string.
.TP 20
-M MULTIPLEUPLOADVERSIONS, --multipleuploadversions MULTIPLEUPLOADVERSIONS
Use multiple versions for upload. Comma-separated list
of {datetime}, {buildnumber} or arbitrary strings.
Defaults to {buildnumber}, which is the value from
--buildnumber.
.SH "DIRECTORY STRUCTURE"
Repackage requires as its input four items:
.P
.TP 20
stage/*
A directory structure filled with files laid out exactly
as they are to appear on the end system, as if "stage" were
the root of the filesystem. For DCAE applications, it 
is recommended that you use the path opt/app/PACKAGENAME
for all files associated with PACKAGENAME.
.TP 20
repackage.yaml or repackage.json
A configuration file with information about the packages,
such as the package's name, version information,
dependencies, etc. More information will be provided below.
.TP 20
Dockerfile
This file is only used for creating Docker images. It contains
the docker creation script.
.TP 20
common/*
If needed, any package installation or package removal scripts
would be placed here. They must be named preinst, postinst,
prerm or postrm.
.P
If the installation scripts need some temporary files, it is recommended that
you place them into stage/opt/app/PACKAGENAME/pkg. Your installation script
can then remove that directory if necessary after successful installation.
.SH FILES
/opt/app/repackage/bin/repackage

/opt/app/repackage/man/repackage.1