-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy path.gitlab-ci.yml
121 lines (110 loc) · 2.53 KB
/
.gitlab-ci.yml
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
120
variables:
GIT_DEPTH: "3"
BUILD_DIR: "build"
JAVADOC_DIR: "$BUILD_DIR/docs/javadoc"
MAVEN_DIR: "$BUILD_DIR/maven2"
PAGE_DIR: "$BUILD_DIR/page"
DISTRIBUTION_DIR: "$BUILD_DIR/distributions"
ZIP_DIR: "$BUILD_DIR/distributions/zip"
#RPM_DIR: "$DISTRIBUTION_DIR/rpm"
#DEB_DIR: "$DISTRIBUTION_DIR/deb"
RPM_DIR: "$BUILD_DIR/distributions/rpm"
DEB_DIR: "$BUILD_DIR/distributions/deb"
RPM_REPO_DIR: "$RPM_DIR/repo"
DEB_REPO_DIR: "$DEB_DIR/repo"
stages:
- build
- test
- deploy
build:fedora:
stage: build
image: $CI_REGISTRY_IMAGE/build:fedora
script:
- cd $CI_PROJECT_DIR
- chmod +x ./gradlew
- ./gradlew build
- ./gradlew combinedjavadoc
- ./gradlew publishEccoMavenPublicationToRootEccoRepository
- ./gradlew combinedWindowsZip
- ./gradlew combinedLinuxZip
- ./gradlew combinedrpm
- ./gradlew combineddeb
- ./gradlew html
- ./gradlew page
- mkdir $ZIP_DIR/
- cp $DISTRIBUTION_DIR/*.zip $ZIP_DIR/
- createrepo_c $RPM_DIR
- ls -la $RPM_DIR/.
only:
- master
- develop
when: on_success
allow_failure: false
artifacts:
paths:
- $JAVADOC_DIR
- $MAVEN_DIR
- $ZIP_DIR
- $RPM_DIR
- $PAGE_DIR
- $BUILD_DIR/downloads.html
build:ubuntu:
stage: build
image: $CI_REGISTRY_IMAGE/build:ubuntu
script:
- cd $CI_PROJECT_DIR
- chmod +x ./gradlew
- ./gradlew build
- ./gradlew combinedjavadoc
- ./gradlew publishEccoMavenPublicationToRootEccoRepository
- ./gradlew combinedWindowsZip
- ./gradlew combinedLinuxZip
- ./gradlew combinedrpm
- ./gradlew combineddeb
- ./gradlew html
- ./gradlew page
- mkdir $ZIP_DIR/
- cp $DISTRIBUTION_DIR/*.zip $ZIP_DIR/
- ls -la $DEB_DIR/.
only:
- master
- develop
when: on_success
allow_failure: true
artifacts:
paths:
- $DEB_DIR
pages:
stage: deploy
variables:
GIT_STRATEGY: none
image: alpine:latest
script:
- cd $CI_PROJECT_DIR
- pwd
- ls -la
- mkdir public/
- cp -r $MAVEN_DIR/. public/maven2/
- cp -r $JAVADOC_DIR/. public/doc/
- cp -r $RPM_DIR/. public/rpm/
# - cp -r $DEB_DIR/. public/deb/
- cp -r $ZIP_DIR/. public/
- cp -r $PAGE_DIR/. public/
- cp $BUILD_DIR/downloads.html public/
- cd public
- pwd
- ls -la
only:
- master
- develop
when: on_success
allow_failure: false
dependencies:
- build:fedora
# - build:ubuntu
artifacts:
paths:
- public/
environment:
name: gitlab
url: https://llinsbauer.gitlab.io/ecco/