Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
le-parental-control
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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-parental-control
Commits
54eeadd5
Commit
54eeadd5
authored
6 years ago
by
Guilherme Becker Agge
Browse files
Options
Downloads
Patches
Plain Diff
SCRUM#492
: Change CI to deploy to unstable
parent
8e78b679
No related branches found
Branches containing commit
No related tags found
Tags containing commit
3 merge requests
!25
Develop to master
,
!24
Develop to master
,
!19
SCRUM#492: Change CI to deploy to unstable
Pipeline
#16890
passed
6 years ago
Stage: build
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.deploy.sh
+17
-8
17 additions, 8 deletions
.deploy.sh
.gitlab-ci.yml
+12
-0
12 additions, 0 deletions
.gitlab-ci.yml
with
29 additions
and
8 deletions
.deploy.sh
+
17
−
8
View file @
54eeadd5
...
...
@@ -5,19 +5,28 @@
apt-get update
&&
apt-get
install
-y
dput ssh
eval
$(
ssh-agent
-s
)
eval
"
$(
ssh-agent
-s
)
"
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
else
if
[
"
$CI_JOB_NAME
"
=
"deploy_for_testing"
]
;
then
REPO_SRC
=
"unstable"
REPO_TGT
=
"testing"
elif
[
"
$CI_JOB_NAME
"
=
"deploy_for_stable"
]
;
then
REPO_SRC
=
"testing"
REPO_TGT
=
"stable"
fi
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]*'
)
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
$REPO_TGT
$REPO_SRC
$PACKAGE
$VERSION
"
REPREPRO_CMD
=
"reprepro -Vb /home/repository/www/le6 copysrc stable testing
$PACKAGE
$VERSION
"
ssh
-o
StrictHostKeyChecking
=
no
-i
~/.ssh/id_rsa repository@repo.c3sl.ufpr.br
"
$REPREPRO_CMD
"
fi
ssh
-o
StrictHostKeyChecking
=
no
-o
UserKnownHostsFile
=
/dev/null repository@repo.c3sl.ufpr.br
"
$REPREPRO_CMD
"
fi
This diff is collapsed.
Click to expand it.
.gitlab-ci.yml
+
12
−
0
View file @
54eeadd5
...
...
@@ -31,8 +31,20 @@ test:
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
tags
:
...
...
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