Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
packages
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
infra
packages
Commits
45598962
Commit
45598962
authored
6 years ago
by
Robin Sonnabend
Browse files
Options
Downloads
Patches
Plain Diff
Add uploading packages
parent
999a5191
No related branches found
No related tags found
No related merge requests found
Pipeline
#582
failed
6 years ago
Stage: build
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+3
-1
3 additions, 1 deletion
.gitlab-ci.yml
packages.yml
+1
-0
1 addition, 0 deletions
packages.yml
scripts/build.py
+19
-5
19 additions, 5 deletions
scripts/build.py
with
23 additions
and
6 deletions
.gitlab-ci.yml
+
3
−
1
View file @
45598962
...
...
@@ -6,13 +6,15 @@ before_script:
-
echo "deb-src http://security.debian.org/debian-security stretch/updates main contrib non-free" >> /etc/apt/sources.list
-
sort /etc/apt/sources.list | uniq > sources.list.new
-
mv sources.list.new /etc/apt/sources.list
-
cat /etc/apt/sources.list
-
apt-get update
-
apt-get install -y dpkg-dev quilt devscripts
-
python3 -m venv venv
-
source venv/bin/activate
-
pip install wheel
-
pip install -r requirements.txt
-
mkdir -p ~/.ssh
-
echo $DEPLOY_KEY | base64 --decode > ~/.ssh/id_ed25519
-
chmod go-rw ~/.ssh/id_ed25519
stages
:
-
build
...
...
This diff is collapsed.
Click to expand it.
packages.yml
+
1
−
0
View file @
45598962
maintainer
:
name
:
FSMPI Admin-Team
mail
:
admin@fsmpi.rwth-aachen.de
upload_target
:
repo@repo.fsmpi.rwth-aachen.de:/srv/repo/incoming/
packages
:
-
name
:
adcli
version
:
0.8.2-1.1-fsmpi
...
...
This diff is collapsed.
Click to expand it.
scripts/build.py
+
19
−
5
View file @
45598962
...
...
@@ -67,14 +67,10 @@ def build_package(repo_dir, package_dir, name,
workdir
=
os
.
path
.
join
(
tempdir
,
pkg_dir
)
print
(
"
Content of tempdir:
"
,
os
.
listdir
(
tempdir
))
print
(
"
Content of workdir:
"
,
os
.
listdir
(
workdir
))
if
additional_content
is
not
None
:
print
(
"
applying additional content
"
)
for
content
in
additional_content
:
target_dir
=
content
[
"
target_dir
"
]
print
(
"
applying
"
,
content
,
"
in
"
,
target_dir
)
os
.
chdir
(
os
.
path
.
join
(
workdir
,
target_dir
))
if
"
patch_dir
"
in
content
:
abs_patch_dir
=
os
.
path
.
join
(
...
...
@@ -101,7 +97,6 @@ def build_package(repo_dir, package_dir, name,
for
entry
in
_get_log_entries
():
run_checked
(
command
+
[
entry
])
print
(
"
building
"
)
command
=
[
"
apt-get
"
,
"
build-dep
"
,
"
-y
"
,
name
]
run_checked
(
command
)
...
...
@@ -117,6 +112,22 @@ def build_package(repo_dir, package_dir, name,
shutil
.
move
(
os
.
path
.
join
(
tempdir
,
filename
),
package_dir
)
def
upload_packages
(
package_dir
,
upload_target
,
key_file
=
None
):
ssh_args
=
[
"
ssh
"
,
"
-o
"
,
"
StrictHostKeyChecking=no
"
]
if
key_file
:
ssh_args
.
extend
([
"
-i
"
,
key_file
])
if
not
package_dir
.
endswith
(
"
/
"
):
package_dir
+=
"
/
"
command
=
[
"
rsync
"
,
"
--recursive
"
,
"
-e
"
,
"
"
.
join
(
ssh_args
),
package_dir
,
upload_target
,
]
run_checked
(
command
)
def
main
():
repo_dir
=
os
.
getcwd
()
config
=
load_config
()
...
...
@@ -137,8 +148,11 @@ def main():
os
.
chdir
(
repo_dir
)
import
pprint
print
(
"
Built packages:
"
)
pprint
.
pprint
(
sorted
(
os
.
listdir
(
package_dir
)))
upload_packages
(
package_dir
,
config
[
"
upload_target
"
],
key_file
=
"
~/.ssh/id_ed25519
"
)
if
__name__
==
"
__main__
"
:
main
()
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