Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gajim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mesonium
gajim
Commits
1f4556ed
Commit
1f4556ed
authored
4 years ago
by
Philipp Hörist
Browse files
Options
Downloads
Patches
Plain Diff
Update CI
parent
9a0a2a9b
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+2
-13
2 additions, 13 deletions
.gitlab-ci.yml
scripts/ci/pylint.sh
+0
-0
0 additions, 0 deletions
scripts/ci/pylint.sh
scripts/ci/sdist.py
+62
-0
62 additions, 0 deletions
scripts/ci/sdist.py
with
64 additions
and
13 deletions
.gitlab-ci.yml
+
2
−
13
View file @
1f4556ed
...
...
@@ -30,7 +30,7 @@ Code Quality:
-
pip3 install -I pyOpenSSL
-
mypy -V
-
mypy gajim
-
scripts/
dev
/pylint
-ci
.sh --jobs=2 gajim
-
scripts/
ci
/pylint.sh --jobs=2 gajim
-
coverage run --source=gajim -m unittest discover -s test/no_gui -v
-
coverage report -mi
-
coverage xml -i
...
...
@@ -58,19 +58,8 @@ Linux:
-
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_master_zip/plugin_installer.zip
-
unzip plugin_installer.zip -d $GF/gajim/data/plugins/
-
rm plugin_installer.zip
-
tar -uf $GF.tar $GF
-
gzip $GF.tar
-
./scripts/ci/sdist.py
artifacts
:
name
:
"
gajim-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA"
...
...
This diff is collapsed.
Click to expand it.
scripts/
dev
/pylint
-ci
.sh
→
scripts/
ci
/pylint.sh
+
0
−
0
View file @
1f4556ed
File moved
This diff is collapsed.
Click to expand it.
scripts/ci/sdist.py
0 → 100755
+
62
−
0
View file @
1f4556ed
#!/usr/bin/env python3
import
os
import
io
import
zipfile
import
subprocess
import
shutil
from
pathlib
import
Path
import
requests
PLUGINS
=
[
'
plugin_installer
'
,
]
PLUGINS_BASE_URL
=
'
https://ftp.gajim.org
'
PLUGINS_FOLDER
=
Path
(
'
./gajim/data/plugins
'
)
COMMIT_BRANCH
=
os
.
environ
[
'
CI_COMMIT_BRANCH
'
]
def
get_plugins_folder
():
if
COMMIT_BRANCH
==
'
master
'
:
return
'
plugins_master_zip
'
version
=
COMMIT_BRANCH
.
split
(
'
_
'
)[
1
]
return
f
'
plugins_
{
version
}
_zip
'
def
get_plugins_url
(
plugin
):
folder
=
get_plugins_folder
()
return
f
'
{
PLUGINS_BASE_URL
}
/
{
folder
}
/
{
plugin
}
.zip
'
def
extraxt_zip
(
zip_bytes
,
path
):
print
(
'
Extract to
'
,
path
)
with
zipfile
.
ZipFile
(
io
.
BytesIO
(
zip_bytes
))
as
zip_file
:
zip_file
.
extractall
(
path
)
def
download_plugins
():
PLUGINS_FOLDER
.
mkdir
(
parents
=
True
)
for
plugin
in
PLUGINS
:
url
=
get_plugins_url
(
plugin
)
print
(
'
Download
'
,
url
)
req
=
requests
.
get
(
url
)
req
.
raise_for_status
()
extraxt_zip
(
req
.
content
,
PLUGINS_FOLDER
)
def
setup
():
print
(
'
Setup
'
)
subprocess
.
call
([
'
python3
'
,
'
setup.py
'
,
'
sdist
'
])
def
cleanup
():
print
(
'
Cleanup
'
)
shutil
.
rmtree
(
PLUGINS_FOLDER
)
download_plugins
()
setup
()
cleanup
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment