Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlovetox <philipp@hoerist.com>2021-01-02 01:21:56 +0300
committerlovetox <philipp@hoerist.com>2021-01-02 01:49:02 +0300
commit9a0a2a9b04f9b80b8662817ebab733c0d50c9c2f (patch)
tree067cb69512a41f29a3f6ace3fbe741b78801f2fa
parent9dd5eb6be57e6710935386baeb34eb3dbe9253ec (diff)
-rw-r--r--.gitlab-ci.yml36
-rwxr-xr-xscripts/ci/appveyor.py22
2 files changed, 52 insertions, 6 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a822efa03..ae29e993a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,12 +1,19 @@
-before_script:
- - sudo apt-get build-dep -y -qq gajim-default-nightly
+workflow:
+ rules:
+ - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
+ when: never
+ - when: always
stages:
- test
- build
-run-tests:
+Code Quality:
stage: test
+ rules:
+ - if: '$CI_PIPELINE_SOURCE == "schedule"'
+ when: never
+ - when: always
script:
- rm -rf civenv-master
- virtualenv -p python3 --system-site-packages civenv
@@ -35,21 +42,31 @@ run-tests:
reports:
cobertura: coverage.xml
-run-appdata:
+appdata.xml:
stage: test
+ rules:
+ - if: '$CI_PIPELINE_SOURCE == "schedule"'
+ when: never
+ - when: always
script:
- python3 setup.py build
- appstream-util validate build/data/org.gajim.Gajim.appdata.xml
-run-build:
+Linux:
stage: build
+ rules:
+ - if: '$CI_PIPELINE_SOURCE == "schedule"'
+ when: never
+ - when: always
+ before_script:
+ - sudo apt-get build-dep -y -qq gajim-default-nightly
script:
- python3 setup.py sdist
- cd dist
- GF=$(basename gajim-* .tar.gz)
- gzip -d $GF.tar.gz
- mkdir -p $GF/gajim/data/plugins/
- - curl -O https://ftp.gajim.org/plugins_1/plugin_installer.zip
+ - curl -O https://ftp.gajim.org/plugins_master_zip/plugin_installer.zip
- unzip plugin_installer.zip -d $GF/gajim/data/plugins/
- rm plugin_installer.zip
- tar -uf $GF.tar $GF
@@ -60,3 +77,10 @@ run-build:
expire_in: 1 week
paths:
- dist/gajim-*.tar.gz
+
+Windows:
+ stage: build
+ rules:
+ - if: '$CI_PIPELINE_SOURCE == "schedule"'
+ script:
+ - ./scripts/ci/appveyor.py
diff --git a/scripts/ci/appveyor.py b/scripts/ci/appveyor.py
new file mode 100755
index 000000000..eb597b29f
--- /dev/null
+++ b/scripts/ci/appveyor.py
@@ -0,0 +1,22 @@
+#!/usr/bin/env python3
+
+import os
+import requests
+
+webhook_key = os.environ['APPVEYOR_WEBHOOK_KEY']
+branch = os.environ['CI_COMMIT_BRANCH']
+
+url = f'https://ci.appveyor.com/api/git/webhook?id={webhook_key}'
+ref = f'refs/heads/{branch}'
+
+with open('appveyor.yml', 'r') as file:
+ yaml = file.read()
+
+payload = {
+ 'ref': ref,
+ 'repository': {'name': 'Gajim'},
+ 'config': yaml
+}
+
+req = requests.post(url, json=payload)
+req.raise_for_status()