Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
b9c4eb70
Commit
b9c4eb70
authored
Jan 08, 2019
by
Leonard Gram
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build: publishes beta releases to separate repos.
parent
8f5886e6
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
9 deletions
+37
-9
.circleci/config.yml
+2
-2
scripts/build/update_repo/unlock-gpg-key.sh
+1
-1
scripts/build/update_repo/update-deb.sh
+19
-4
scripts/build/update_repo/update-rpm.sh
+15
-2
No files found.
.circleci/config.yml
View file @
b9c4eb70
...
...
@@ -423,10 +423,10 @@ jobs:
comand
:
'
./scripts/build/load-signing-key.sh'
-
run
:
name
:
Update Debian repository
command
:
'
./scripts/build/update_repo/update-deb.sh
"oss"
"$GPG_KEY_PASSWORD"'
command
:
'
./scripts/build/update_repo/update-deb.sh
"oss"
"$GPG_KEY_PASSWORD"
"$CIRCLE_TAG"
'
-
run
:
name
:
Update RPM repository
command
:
'
./scripts/build/update_repo/update-rpm.sh
"oss"
"$GPG_KEY_PASSWORD"'
command
:
'
./scripts/build/update_repo/update-rpm.sh
"oss"
"$GPG_KEY_PASSWORD"
"$CIRCLE_TAG"
'
workflows
:
version
:
2
...
...
scripts/build/update_repo/
sign-deb-repo
.sh
→
scripts/build/update_repo/
unlock-gpg-key
.sh
View file @
b9c4eb70
#!/usr/bin/env expect
set
password
[
lindex
$argv
0]
spawn
aptly publish repo grafana filesystem:repo:grafana
spawn
gpg
--detach-sign
--armor
/tmp/sign-this
expect
"Enter passphrase: "
send
--
"
$password
\r
"
expect eof
scripts/build/update_repo/update-deb.sh
View file @
b9c4eb70
...
...
@@ -2,12 +2,23 @@
RELEASE_TYPE
=
"
${
1
:-}
"
GPG_PASS
=
"
${
2
:-}
"
RELEASE_TAG
=
"
${
3
:-}
"
REPO
=
"grafana"
if
[
-z
"
$RELEASE_TYPE
"
-o
-z
"
$GPG_PASS
"
]
;
then
echo
"Both RELEASE_TYPE (arg 1) and GPG_PASS (arg 2) has to be set"
exit
1
fi
if
[[
"
$RELEASE_TYPE
"
!=
"oss"
&&
"
$RELEASE_TYPE
"
!=
"enterprise"
]]
;
then
echo
"RELEASE_TYPE (arg 1) must be either oss or enterprise."
exit
1
fi
if
echo
"
$RELEASE_TAG
"
|
grep
-q
"beta"
;
then
REPO
=
"beta"
fi
set
-e
# Setup environment
...
...
@@ -20,22 +31,26 @@ mkdir -p /deb-repo/db \
gsutil
-m
rsync
-r
"gs://grafana-aptly-db/
$RELEASE_TYPE
"
/deb-repo/db
# Add the new release to the repo
aptly publish drop squeeze filesystem:repo:grafana
||
true
aptly publish drop grafana filesystem:repo:grafana
||
true
aptly publish drop beta filesystem:repo:grafana
||
true
cp ./dist/
*
.deb /deb-repo/tmp
rm /deb-repo/tmp/grafana_latest
*
.deb
||
true
aptly repo add
grafana
./dist
aptly repo add
"
$REPO
"
./dist
# Setup signing and sign the repo
echo
"allow-loopback-pinentry"
>
~/.gnupg/gpg-agent.conf
echo
"pinentry-mode loopback"
>
~/.gnupg/gpg.conf
./scripts/build/update_repo/sign-deb-repo.sh
"
$GPG_PASS
"
./scripts/build/update_repo/unlock-gpg-key.sh
"
$GPG_PASS
"
aptly publish repo grafana filesystem:repo:grafana
aptly publish repo beta filesystem:repo:grafana
# Update the repo and db on gcp
gsutil
-m
rsync
-r
-d
/deb-repo/db
"gs://grafana-aptly-db/
$RELEASE_TYPE
"
gsutil
-m
rsync
-r
-d
/deb-repo/repo/grafana
"gs://grafana-repo/
$RELEASE_TYPE
/deb"
# usage:
#
curl https://packages.grafana.com/gpg.key | apt-key add -
#
# deb https://packages.grafana.com/oss/deb stable main
scripts/build/update_repo/update-rpm.sh
View file @
b9c4eb70
...
...
@@ -3,18 +3,31 @@
RELEASE_TYPE
=
"
${
1
:-}
"
GPG_PASS
=
"
${
2
:-}
"
RELEASE_TAG
=
"
${
3
:-}
"
REPO
=
"rpm"
if
[
-z
"
$RELEASE_TYPE
"
-o
-z
"
$GPG_PASS
"
]
;
then
echo
"Both RELEASE_TYPE (arg 1) and GPG_PASS (arg 2) has to be set"
exit
1
fi
if
[[
"
$RELEASE_TYPE
"
!=
"oss"
&&
"
$RELEASE_TYPE
"
!=
"enterprise"
]]
;
then
echo
"RELEASE_TYPE (arg 1) must be either oss or enterprise."
exit
1
fi
if
echo
"
$RELEASE_TAG
"
|
grep
-q
"beta"
;
then
REPO
=
"rpm-beta"
fi
set
-e
# Setup environment
BUCKET
=
"gs://grafana-repo/
$RELEASE_TYPE
/
$REPO
"
mkdir
-p
/rpm-repo
# Download the database
gsutil
-m
rsync
-r
"
gs://grafana-repo/
$RELEASE_TYPE
/rpm
"
/rpm-repo
gsutil
-m
rsync
-r
"
$BUCKET
"
/rpm-repo
# Add the new release to the repo
cp ./dist/
*
.rpm /rpm-repo
...
...
@@ -32,7 +45,7 @@ pkill gpg-agent || true
./scripts/build/update_repo/sign-rpm-repo.sh
"
$GPG_PASS
"
# Update the repo and db on gcp
gsutil
-m
rsync
-r
-d
/rpm-repo
"
gs://grafana-repo/
$RELEASE_TYPE
/rpm
"
gsutil
-m
rsync
-r
-d
/rpm-repo
"
$BUCKET
"
# usage:
# [grafana]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment