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

.gitlab-ci.yml 2.01 KB
Newer Older
Éloïs's avatar
Éloïs committed
1
stages:
Stéphane Veyret's avatar
Stéphane Veyret committed
2
  - github-sync
releaser-duniter's avatar
releaser-duniter committed
3
4
  - releases
  - releases-page
Éloïs's avatar
Éloïs committed
5
6
7
8
9
push_to_github:
    stage: github-sync
    variables:
        GIT_STRATEGY: none
    tags:
10
        - redshift
Éloïs's avatar
Éloïs committed
11
12
13
14
15
16
17
18
19
20
21
    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 $?"
22

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

releaser-duniter's avatar
releaser-duniter committed
43
44
releases:
  stage: releases
45
  image: duniter/release-builder:v1.0.1
Stéphane Veyret's avatar
Stéphane Veyret committed
46
  tags:
Éloïs's avatar
Éloïs committed
47
    - redshift-duniter-builder
Stéphane Veyret's avatar
Stéphane Veyret committed
48
49
50
51
  script:
    - bash "release/arch/linux/build-lin.sh" "${CI_COMMIT_TAG#v}"
  artifacts:
    paths:
releaser-duniter's avatar
releaser-duniter committed
52
53
54
      - 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
55
    expire_in: 8h
Éloïs's avatar
Éloïs committed
56
  when: manual
Stéphane Veyret's avatar
Stéphane Veyret committed
57
  only:
Éloïs's avatar
Éloïs committed
58
  - tags
Éloïs's avatar
Éloïs committed
59
  - master
60
    
releaser-duniter's avatar
releaser-duniter committed
61
releases-message:
releaser-duniter's avatar
releaser-duniter committed
62
  stage: releases-page
Éloïs's avatar
Éloïs committed
63
  image: tensorflow/tensorflow:latest-py3
Éloïs's avatar
Éloïs committed
64
65
  tags:
    - redshift-duniter-builder
66
  variables:
releaser-duniter's avatar
releaser-duniter committed
67
    JOB_ARTIFACTS: 'releases'
68
    EXPECTED_ARTIFACTS: '["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"]'
Cédric Moreau's avatar
Cédric Moreau committed
69
  script:
70
    - python3 .gitlab/releaser.py
Éloïs's avatar
Éloïs committed
71
  when: manual
72
  only:
Éloïs's avatar
Éloïs committed
73
  - tags
Éloïs's avatar
Éloïs committed
74
  - master