Mise à jour effectuée, merci de nous signaler tout dysfonctionnement ! | Upgrade done, please let us know about any dysfunction!

.gitlab-ci.yml 2.19 KB
Newer Older
Éloïs's avatar
Éloïs committed
1
stages:
Stéphane Veyret's avatar
Stéphane Veyret committed
2
  - github-sync
3
4
  - release
  - release-message
Éloïs's avatar
Éloïs committed
5

Éloïs's avatar
Éloïs committed
6
7
8
9
10
push_to_github:
    stage: github-sync
    variables:
        GIT_STRATEGY: none
    tags:
11
        - redshift
Éloïs's avatar
Éloïs committed
12
13
14
15
16
17
18
19
20
21
22
    script:
        - rm -rf ./*
        - rm -rf .git
        - git clone --mirror $CI_REPOSITORY_URL .
        - git remote add github $GITHUB_URL_AND_KEY
        - git config --global user.email "contact@duniter.org"
        - git config --global user.name "Duniter"
        # Job would fail if we don't remove refs about pull requests
        - bash -c "cat packed-refs | grep -v 'refs/pull' > packed-refs-new; echo 'Removed pull refs.'"
        - mv packed-refs-new packed-refs
        - bash -c "git push --force --mirror github 2>&1 | grep -v duniter-gitlab; echo $?"
23
24
25

release_linux:test:
  stage: release
26
  image: duniter/release-builder:v1.0.1
Stéphane Veyret's avatar
Stéphane Veyret committed
27
  tags:
Éloïs's avatar
Éloïs committed
28
    - redshift-duniter-builder
29
  variables:
releaser-duniter's avatar
releaser-duniter committed
30
31
32
    DAY: $(date +%Y%m%d)
    HOUR: $(date +%H%M)
    SEC: $(date +%S)
Stéphane Veyret's avatar
Stéphane Veyret committed
33
  script:
releaser-duniter's avatar
releaser-duniter committed
34
    - bash "release/arch/linux/build-lin.sh" "${DAY}.${HOUR}.${SEC}"
Stéphane Veyret's avatar
Stéphane Veyret committed
35
36
  artifacts:
    paths:
releaser-duniter's avatar
releaser-duniter committed
37
38
39
      - work/bin/duniter-desktop-v"${DAY}.${HOUR}.${SEC}"-linux-x64.deb
      - work/bin/duniter-desktop-v"${DAY}.${HOUR}.${SEC}"-linux-x64.tar.gz
      - work/bin/duniter-server-v"${DAY}.${HOUR}.${SEC}"-linux-x64.deb
Stéphane Veyret's avatar
Stéphane Veyret committed
40
    expire_in: 8h
Éloïs's avatar
Éloïs committed
41
  when: manual
42
43
44
  except:
    - tags
  
Stéphane Veyret's avatar
Stéphane Veyret committed
45

46
release_linux:deploy:desktop:
47
  stage: release
48
  image: duniter/release-builder:v1.0.1
Stéphane Veyret's avatar
Stéphane Veyret committed
49
  tags:
Éloïs's avatar
Éloïs committed
50
    - redshift-duniter-builder
Stéphane Veyret's avatar
Stéphane Veyret committed
51
52
53
54
  script:
    - bash "release/arch/linux/build-lin.sh" "${CI_COMMIT_TAG#v}"
  artifacts:
    paths:
55
56
57
      - work/bin/duniter-desktop-"${CI_COMMIT_TAG}"-linux-x64.deb
      - work/bin/duniter-desktop-"${CI_COMMIT_TAG}"-linux-x64.tar.gz
      - work/bin/duniter-server-"${CI_COMMIT_TAG}"-linux-x64.deb
58
    expire_in: 8h
Éloïs's avatar
Éloïs committed
59
  when: manual
Stéphane Veyret's avatar
Stéphane Veyret committed
60
  only:
Éloïs's avatar
Éloïs committed
61
  - tags
Éloïs's avatar
Éloïs committed
62
  - master
63
64
65
    
enforce-message:
  stage: release-message
Éloïs's avatar
Éloïs committed
66
  image: tensorflow/tensorflow:latest-py3
Éloïs's avatar
Éloïs committed
67
68
  tags:
    - redshift-duniter-builder
69
  variables:
Éloïs's avatar
Éloïs committed
70
    JOB_ARTIFACTS: 'release'
71
    EXPECTED_ARTIFACTS: '["duniter-desktop-${CI_COMMIT_TAG}-linux-x64.deb","duniter-desktop-${CI_COMMIT_TAG}-linux-x64.tar.gz","duniter-server-${CI_COMMIT_TAG}-linux-x64.deb"]'
Cédric Moreau's avatar
Cédric Moreau committed
72
  script:
73
    - python3 .gitlab/releaser.py
Éloïs's avatar
Éloïs committed
74
  when: manual
75
  only:
Éloïs's avatar
Éloïs committed
76
  - tags
Éloïs's avatar
Éloïs committed
77
  - master