Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
dockerd-66serv
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
Package Registry
Model registry
Operate
Environments
Terraform modules
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
pkg
observice
dockerd-66serv
Commits
81dc720c
Commit
81dc720c
authored
5 years ago
by
Eric Vidal
Browse files
Options
Downloads
Patches
Plain Diff
update runner script
parent
53a0371f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.deploy.sh
+0
-101
0 additions, 101 deletions
.deploy.sh
.gitlab-ci.yml
+3
-5
3 additions, 5 deletions
.gitlab-ci.yml
.repositories.conf
+60
-0
60 additions, 0 deletions
.repositories.conf
with
63 additions
and
106 deletions
.deploy.sh
deleted
100755 → 0
+
0
−
101
View file @
53a0371f
#!/usr/bin/bash
# Copyright (c) 2015-2019 Eric Vidal <eric@obarun.org>
# All rights reserved.
#
# This file is part of Obarun. It is subject to the license terms in
# the LICENSE file found in the top-level directory of this
# distribution.
# This file may not be copied, modified, propagated, or distributed
# except according to the terms contained in the LICENSE file.
PROG
=
"
${
0
}
"
install
=
0
reset
=
'\033[0m'
red
=
'\033[1;31m'
green
=
'\033[1;32m'
yellow
=
'\033[1;33m'
bold
=
'\033[1m'
out
()
{
local
errno
=
"
${
1
}
"
color
=
"
${
2
}
"
msg
=
"
${
@
:3
}
"
printf
"
${
PROG
}
:
${
color
}
%s
${
reset
}
: %s
\n
"
"
${
errno
}
"
"
$msg
"
>
&1
}
out_trace
()
{
out
"tracing"
"
${
bold
}
"
"
${
@
}
"
}
out_success
()
{
out
"success"
"
${
green
}
"
"
${
@
}
"
}
out_warn
(){
out
"warning"
"
${
yellow
}
"
"
${
@
}
"
}
out_error
(){
out
"fatal"
"
${
red
}
"
"
${
@
}
"
}
out_usage
()
{
out
"usage"
"
${
reset
}
"
"
${
@
}
"
}
die
()
{
out_error
"
${
@
}
"
exit
111
}
extra_pkg
=(
"openssh"
"git"
)
out_trace
"Install extra packages"
pacman
-Sy
${
extra_pkg
[@]
}
--noconfirm
||
die
"Unable to install extra packages"
out_trace
"Starts ssh-agent"
eval
$(
ssh-agent
)
out_trace
"Configure ssh"
mkdir
-p
~/.ssh
||
die
"Unable to create ~/.ssh directory"
echo
"
${
ssh_private_key
}
"
|
tr
-d
'\r'
>
~/.ssh/id_rsa
chmod
700 ~/.ssh/id_rsa
||
die
"Unable to change permissions of ~/.ssh/id_rsa"
ssh-add ~/.ssh/id_rsa
||
die
"Unable to add key ~/.ssh/id_rsa"
echo
${
ssh_known_host
}
>
~/.ssh/known_hosts
out_trace
"Configure git"
git config
--global
user.name
${
GITLAB_USER_NAME
}
git config
--global
user.email
${
GITLAB_USER_EMAIL
}
out_trace
"Cd to /tmp"
cd
/tmp
out_trace
"Clone git@
${
CI_SERVER_HOST
}
:/
${
CI_PROJECT_PATH
}
.git"
git clone git@
${
CI_SERVER_HOST
}
:/
${
CI_PROJECT_PATH
}
.git
||
die
"Unable to clone git@
${
CI_SERVER_HOST
}
:/
${
CI_PROJECT_PATH
}
.git"
out_trace
"Cd to
${
CI_PROJECT_NAME
}
"
cd
${
CI_PROJECT_NAME
}
out_trace
"Checkout to branch
${
pkg_target
}
"
git checkout
${
pkg_target
}
||
die
"Unable to checkout to
${
pkg_target
}
"
out_trace
"Retrieve pkgver and pkgrel variables from PKGBUILD"
source
trunk/PKGBUILD
||
die
"Unable to source PKGBUILD"
out_trace
"Make directory of version:
${
pkgver
}
-
${
pkgrel
}
"
mkdir
-p
version/
${
pkgver
}
-
${
pkgrel
}
||
die
"Unable to make directory version/
${
pkgver
}
-
${
pkgrel
}
"
out_trace
"Copy file from trunk to version/
${
pkgver
}
-
${
pkgrel
}
"
cp
trunk/
*
version/
${
pkgver
}
-
${
pkgrel
}
||
die
"Unable to copy trunk/* to version/
${
pkgver
}
-
${
pkgrel
}
"
if
!
git diff-index
--quiet
HEAD
;
then
out_trace
"Git add new file"
git add
.
||
die
"Unable to git add"
out_trace
"Git commit message: upgpkg:
${
pkgver
}
-
${
pkgrel
}
"
git commit
-m
"upgpkg:
${
pkgver
}
-
${
pkgrel
}
"
||
die
"Unable to commit"
out_trace
"Push the new version"
git push
--all
||
die
"Unable to push at git@
${
CI_SERVER_HOST
}
:/
${
CI_PROJECT_PATH
}
.git"
fi
exit
0
This diff is collapsed.
Click to expand it.
.gitlab-ci.yml
+
3
−
5
View file @
81dc720c
...
...
@@ -6,6 +6,7 @@ variables:
ssh_private_key
:
"
$SSH_PRIVATE_KEY"
ssh_known_host
:
"
$SSH_KNOWN_HOSTS"
pkg_target
:
"
$CI_COMMIT_REF_NAME"
repo_conf
:
"
.repositories.conf"
# followed variable are ignored but
# need to be set
pkg_track
:
"
branch"
...
...
@@ -18,10 +19,7 @@ stages:
build_repo
:
stage
:
build
script
:
# you can specify the directory where find pkgbuild
# with e.g builder.sh --chdir=trunk
# you can ask to install the package after a build
# e.g builder.sh --install
-
cp ./${repo_conf} /etc/${repo_conf}
-
builder.sh --chdir=trunk
artifacts
:
...
...
@@ -41,4 +39,4 @@ deploy:
-
trunk/PKGBUILD
script
:
-
./.
deploy.sh
-
deploy.sh
This diff is collapsed.
Click to expand it.
.repositories.conf
0 → 100644
+
60
−
0
View file @
81dc720c
#[obcore-testing]
#SigLevel = Required
#Server = https://repo.obarun.org/obcore/testing/
[
obcore
]
SigLevel
=
Required
Server
=
https
://
repo
.
obarun
.
org
/
obcore
#[obextra-testing]
#SigLevel = Required
#Server = https://repo.obarun.org/obextra/testing
[
obextra
]
SigLevel
=
Required
Server
=
https
://
repo
.
obarun
.
org
/
obextra
#[obcommunity-testing]
#SigLevel = Required
#Server = https://repo.obarun.org/obcommunity/testing
[
obcommunity
]
SigLevel
=
Required
Server
=
https
://
repo
.
obarun
.
org
/
obcommunity
#[obmultilib-testing]
#SigLevel = Required
#Server = https://repo.obarun.org/obmultilib/testing
[
obmultilib
]
SigLevel
=
Required
Server
=
https
://
repo
.
obarun
.
org
/
obmultilib
#[observice-testing]
#SigLevel = Required
#Server = https://repo.obarun.org/observice/testing
[
observice
]
SigLevel
=
Required
Server
=
https
://
repo
.
obarun
.
org
/
observice
#[testing]
#Include = /etc/pacman.d/mirrorlist
[
core
]
Include
= /
etc
/
pacman
.
d
/
mirrorlist
[
extra
]
Include
= /
etc
/
pacman
.
d
/
mirrorlist
#[community-testing]
#Include = /etc/pacman.d/mirrorlist
[
community
]
Include
= /
etc
/
pacman
.
d
/
mirrorlist
#[multilib-testing]
#Include = /etc/pacman.d/mirrorlist
#[multilib]
#Include = /etc/pacman.d/mirrorlist
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