Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
le-autoupgrade
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
le6
le-autoupgrade
Commits
e2a01ca7
There was a problem fetching the pipeline summary.
Commit
e2a01ca7
authored
7 years ago
by
Diego Giovane Pasqualin
Browse files
Options
Downloads
Plain Diff
Merge branch 'issue/230' into 'master'
SCRUM#230
: add job on .gitlab-ci.yml to deploy package to stable repository. See merge request
!3
parents
31bd4945
ec7271ec
No related branches found
No related tags found
1 merge request
!3
SCRUM#230: add job on .gitlab-ci.yml to deploy package to stable repository.
Pipeline
#
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.build.sh
+16
-0
16 additions, 0 deletions
.build.sh
.deploy.sh
+7
-0
7 additions, 0 deletions
.deploy.sh
.gitlab-ci.yml
+30
-22
30 additions, 22 deletions
.gitlab-ci.yml
with
53 additions
and
22 deletions
.build.sh
0 → 100755
+
16
−
0
View file @
e2a01ca7
#!/usr/bin/bash
apt-get update
&&
apt-get
install
-y
devscripts
CHANGELOG
=
"package/debian/changelog"
LINE
=
$(
head
-n
1
$CHANGELOG
)
PACKAGE
=
$(
echo
$LINE
|
cut
-d
' '
-f1
)
VERSION
=
$(
echo
$LINE
|
cut
-d
' '
-f2
|
grep
-o
-E
'[0-9]*\.[0-9]*\.[0-9]*'
)
if
[
$CI_JOB_NAME
=
"build_for_stable"
]
;
then
sed
's/testing; urgen/stable; urgen/'
$CHANGELOG
>
$CHANGELOG
fi
tar
--exclude
=
debian
-czf
${
PACKAGE
}
_
${
VERSION
}
.orig.tar.gz package/
*
cd
package
debuild
-us
-uc
cd
../
mkdir
build/
mv
${
PACKAGE
}*
build/
This diff is collapsed.
Click to expand it.
.deploy.sh
0 → 100755
+
7
−
0
View file @
e2a01ca7
#!/usr/bin/bash
apt-get update
&&
apt-get
install
-y
dput ssh
eval
$(
ssh-agent
-s
)
ssh-add <
(
echo
"
$PRIV_KEY
"
)
dput
-u
-f
--config
=
dput.cf repo build/
*
.changes
This diff is collapsed.
Click to expand it.
.gitlab-ci.yml
+
30
−
22
View file @
e2a01ca7
...
...
@@ -4,7 +4,7 @@ stages:
-
test
-
deploy
build
:
build
_for_testing
:
stage
:
build
artifacts
:
paths
:
...
...
@@ -12,17 +12,17 @@ build:
tags
:
-
debian-packaging
script
:
-
apt-get update && apt-get install -y devscripts
-
LINE=$(head -n 1 package/debian/changelog)
-
PACKAGE=$(echo $LINE | cut -d' ' -f1)
-
VERSION=$(echo $LINE | cut -d' ' -f2 | grep -o -E '[0-9]*\.[0-9]*\.[0-9]*')
-
tar --exclude=debian -czf ${PACKAGE}_${VERSION}.orig.tar.gz package/*
-
cd package
-
de
build
-us -uc --lintian-opts --suppress-tags package-installs-apt-preferences
-
cd ../
-
mkdir build/
-
mv ${PACKAGE}* build/
-
echo "Estágio de Build finalizado."
-
./.build.sh
build_for_stable
:
stage
:
build
artifacts
:
paths
:
-
build
/
tags
:
-
debian-packaging
script
:
-
./.build.sh
test
:
stage
:
test
...
...
@@ -32,11 +32,10 @@ test:
script
:
-
apt-get update && apt-get install -y unattended-upgrades
-
dpkg -i build/*.deb
-
echo "Estágio de Teste finalizado"
dependencies
:
-
build
-
build
_for_testing
deploy
:
deploy
_for_testing
:
stage
:
deploy
only
:
-
master
...
...
@@ -44,11 +43,20 @@ deploy:
-
ubuntu
-
regular
script
:
-
echo "Estágio de Deploy"
-
apt-get update && apt-get install -y dput ssh
-
eval $(ssh-agent -s)
-
ssh-add <(echo "$PRIV_KEY")
-
dput -u -f --config=dput.cf repo build/*.changes
-
echo "Estágio de Deploy finalizado"
-
./.deploy.sh
dependencies
:
-
build
-
build_for_testing
deploy_for_stable
:
stage
:
deploy
when
:
manual
only
:
-
master
tags
:
-
ubuntu
-
regular
script
:
-
./.deploy.sh
dependencies
:
-
build_for_stable
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