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
49655f87
There was a problem fetching the pipeline summary.
Commit
49655f87
authored
6 years ago
by
Guilherme Becker Agge
Browse files
Options
Downloads
Patches
Plain Diff
SCRUM#463
: Add more testing stages on CI
parent
57c58bad
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!25
Develop
,
!16
SCRUM#463: Add more testing stages on CI
Pipeline
#
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.deploy.sh
+12
-3
12 additions, 3 deletions
.deploy.sh
.gitlab-ci.yml
+28
-3
28 additions, 3 deletions
.gitlab-ci.yml
with
40 additions
and
6 deletions
.deploy.sh
+
12
−
3
View file @
49655f87
...
...
@@ -10,9 +10,18 @@ ssh-add <(echo "$PRIV_KEY")
echo
"Deploy job name:
$CI_JOB_NAME
"
if
[
"
$CI_JOB_NAME
"
=
"deploy_for_
testing
"
]
;
then
if
[
"
$CI_JOB_NAME
"
=
"deploy_for_
unstable
"
]
;
then
dput
-u
-f
--config
=
dput.cf repo build/
*
.changes
elif
[
"
$CI_JOB_NAME
"
=
"deploy_for_stable"
]
;
then
elif
[
"
$CI_JOB_NAME
"
=
"deploy_for_testing"
]
;
then
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]*'
)
REPREPRO_CMD
=
"reprepro -Vb /home/repository/www/le6 copysrc testing unstable
$PACKAGE
$VERSION
"
# shellcheck disable=SC2029
ssh
-o
StrictHostKeyChecking
=
no
-i
~/.ssh/id_rsa repository@repo.c3sl.ufpr.br
"
$REPREPRO_CMD
"
elif
[
"
$CI_JOB_NAME
"
=
"deploy_for_testing"
]
;
then
CHANGELOG
=
"package/debian/changelog"
LINE
=
$(
head
-n
1
$CHANGELOG
)
PACKAGE
=
$(
echo
"
$LINE
"
|
cut
-d
' '
-f1
)
...
...
@@ -21,4 +30,4 @@ elif [ "$CI_JOB_NAME" = "deploy_for_stable" ]; then
REPREPRO_CMD
=
"reprepro -Vb /home/repository/www/le6 copysrc stable testing
$PACKAGE
$VERSION
"
# shellcheck disable=SC2029
ssh
-o
StrictHostKeyChecking
=
no
-i
~/.ssh/id_rsa repository@repo.c3sl.ufpr.br
"
$REPREPRO_CMD
"
fi
fi
This diff is collapsed.
Click to expand it.
.gitlab-ci.yml
+
28
−
3
View file @
49655f87
## Template para empacotamento utilizando o Gitlab-ci.
stages
:
-
lint
-
build
...
...
@@ -28,14 +29,39 @@ test:
-
ubuntu
-
regular
script
:
-
echo "Installation test:"
-
apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install $(pwd)/build/*.deb language-pack-gnome-pt language-pack-pt-base
-
echo "Removal test:"
-
pkg_name=$(dpkg -I $(pwd)/build/*.deb | grep Package | head -1 | cut -d ':' -f2)
-
DEBIAN_FRONTEND=noninteractive apt -y remove $pkg_name
-
echo "Getting latest stable package from repo..."
-
DEBIAN_FRONTEND=noninteractive apt-get -y install wget
-
wget http://repo.c3sl.ufpr.br/le6/dists/stable/main/binary-amd64/Packages
-
wget http://repo.c3sl.ufpr.br/le6/$(tail -n +$(grep -n "Package:${pkg_name}" Packages | cut -d ":" -f1) Packages | grep "Filename" | head -1 |cut -d " " -f2)
-
echo "Update test:"
-
DEBIAN_FRONTEND=noninteractive apt-get -y install $(pwd)/*.deb
-
DEBIAN_FRONTEND=noninteractive apt-get -y install $(pwd)/build/*.deb
-
echo "Downgrade test:"
-
DEBIAN_FRONTEND=noninteractive apt-get -y --allow-downgrades install $(pwd)/*.deb
dependencies
:
-
build
deploy_for_unstable
:
stage
:
deploy
only
:
-
develop
tags
:
-
debian-packaging
script
:
-
./.deploy.sh
dependencies
:
-
build
deploy_for_testing
:
stage
:
deploy
when
:
manual
only
:
-
master
-
master
tags
:
-
debian-packaging
script
:
...
...
@@ -47,11 +73,10 @@ deploy_for_stable:
stage
:
deploy
when
:
manual
only
:
-
master
-
master
tags
:
-
debian-packaging
script
:
-
./.deploy.sh
dependencies
:
-
build
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