dcache-build.yml 1.42 KB
Newer Older
1
stages:
Tigran Mkrtchyan's avatar
Tigran Mkrtchyan committed
2
  - build:rpm
Tigran Mkrtchyan's avatar
Tigran Mkrtchyan committed
3
  - build:deb
Tigran Mkrtchyan's avatar
Tigran Mkrtchyan committed
4
  - build:tar
5
  - test_deploy
Tigran Mkrtchyan's avatar
Tigran Mkrtchyan committed
6

7

Tigran Mkrtchyan's avatar
Tigran Mkrtchyan committed
8
variables:
9
  MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version -DinstallAtEnd=true -DdeployAtEnd=true -DskipTests -Dmaven.repo.local=.m2/repository"
Tigran Mkrtchyan's avatar
Tigran Mkrtchyan committed
10
11
12
13
14
15
16


# Cache downloaded dependencies and plugins between builds.
# To keep cache across branches add 'key: "$CI_JOB_NAME"'
cache:
  key: "CI_JOB_NAME"
  paths:
17
    - ./.m2/repository
Tigran Mkrtchyan's avatar
Tigran Mkrtchyan committed
18

19
20
21
rpm:
  stage: build:rpm
  image: dcache/maven-java11-rpm-build
Tigran Mkrtchyan's avatar
Tigran Mkrtchyan committed
22
  script:
23
    - mvn $MAVEN_CLI_OPTS -am -pl packages/fhs -P rpm clean package
Tigran Mkrtchyan's avatar
Tigran Mkrtchyan committed
24
25
26
  artifacts:
    paths:
      - "packages/fhs/target/rpmbuild/RPMS/noarch/dcache*.rpm"
27
    expire_in: 2 days
Tigran Mkrtchyan's avatar
Tigran Mkrtchyan committed
28
29
30
31
32
33

deb:
  stage: build:deb
  image: dcache/maven-java11-deb-build
  script:
    - mvn $MAVEN_CLI_OPTS -am -pl packages/fhs -P deb clean package
34
35
36
  artifacts:
    paths:
      - "packages/fhs/target/dcache_*.deb"
37
    expire_in: 2 days
Tigran Mkrtchyan's avatar
Tigran Mkrtchyan committed
38
39
40
41
42
43

tar:
  stage: build:tar
  image: dcache/maven-java11-tar-build
  script:
    - mvn $MAVEN_CLI_OPTS -am -pl packages/tar clean package
44
45
  artifacts:
    paths:
Tigran Mkrtchyan's avatar
Tigran Mkrtchyan committed
46
      - "packages/tar/target/dcache-*.tar.gz"
47
    expire_in: 2 days
Tigran Mkrtchyan's avatar
Tigran Mkrtchyan committed
48
49

install_rpm:
50
  stage: test_deploy
Tigran Mkrtchyan's avatar
Tigran Mkrtchyan committed
51
52
53
  image: centos:7
  script:
    - yum --nogpgcheck install -y packages/fhs/target/rpmbuild/RPMS/noarch/dcache*.rpm
54
55
56
57
58

install_deb:
  stage: test_deploy
  image: ubuntu:20.04
  script:
59
    - apt-get update
60
    - DEBIAN_FRONTEND=noninteractive apt install -y -f ./packages/fhs/target/dcache_*.deb