mirror of https://github.com/grafana/grafana
commit
525367c591
@ -1,2 +1,3 @@ |
||||
@import 'CustomScrollbar/CustomScrollbar'; |
||||
@import 'DeleteButton/DeleteButton'; |
||||
@import 'Tooltip/Tooltip'; |
||||
|
@ -1,3 +1,4 @@ |
||||
export { DeleteButton } from './DeleteButton/DeleteButton'; |
||||
export { Tooltip } from './Tooltip/Tooltip'; |
||||
export { Portal } from './Portal/Portal'; |
||||
export { CustomScrollbar } from './CustomScrollbar/CustomScrollbar'; |
||||
|
@ -1,5 +1,25 @@ |
||||
FROM circleci/golang:1.11 |
||||
|
||||
RUN git clone https://github.com/aptly-dev/aptly $GOPATH/src/github.com/aptly-dev/aptly && \ |
||||
cd $GOPATH/src/github.com/aptly-dev/aptly && \ |
||||
# pin aptly to a specific commit after 1.3.0 that contains gpg2 support |
||||
git reset --hard a64807efdaf5e380bfa878c71bc88eae10d62be1 && \ |
||||
make install |
||||
|
||||
FROM circleci/python:2.7-stretch |
||||
|
||||
RUN sudo pip install awscli && \ |
||||
curl https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-222.0.0-linux-x86_64.tar.gz | \ |
||||
sudo tar xvzf - -C /opt |
||||
ENV PATH=$PATH:/opt/google-cloud-sdk/bin |
||||
|
||||
USER root |
||||
|
||||
RUN pip install awscli && \ |
||||
curl https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-222.0.0-linux-x86_64.tar.gz | \ |
||||
tar xvzf - -C /opt && \ |
||||
apt update && \ |
||||
apt install -y createrepo expect && \ |
||||
apt-get autoremove -y && \ |
||||
rm -rf /var/lib/apt/lists/* |
||||
|
||||
COPY --from=0 /go/bin/aptly /usr/local/bin/aptly |
||||
|
||||
USER circleci |
||||
|
@ -0,0 +1,7 @@ |
||||
#!/usr/bin/env bash |
||||
|
||||
set -e |
||||
|
||||
git clone git@github.com:torkelo/private.git ~/private-repo |
||||
gpg --batch --allow-secret-key-import --import ~/private-repo/signing/private.key |
||||
pkill gpg-agent |
@ -0,0 +1,27 @@ |
||||
{ |
||||
"rootDir": "/deb-repo/db", |
||||
"downloadConcurrency": 4, |
||||
"downloadSpeedLimit": 0, |
||||
"architectures": [], |
||||
"dependencyFollowSuggests": false, |
||||
"dependencyFollowRecommends": false, |
||||
"dependencyFollowAllVariants": false, |
||||
"dependencyFollowSource": false, |
||||
"dependencyVerboseResolve": false, |
||||
"gpgDisableSign": false, |
||||
"gpgDisableVerify": false, |
||||
"gpgProvider": "gpg2", |
||||
"downloadSourcePackages": false, |
||||
"skipLegacyPool": true, |
||||
"ppaDistributorID": "ubuntu", |
||||
"ppaCodename": "", |
||||
"skipContentsPublishing": false, |
||||
"FileSystemPublishEndpoints": { |
||||
"repo": { |
||||
"rootDir": "/deb-repo/repo", |
||||
"linkMethod": "copy" |
||||
} |
||||
}, |
||||
"S3PublishEndpoints": {}, |
||||
"SwiftPublishEndpoints": {} |
||||
} |
@ -0,0 +1,7 @@ |
||||
#!/usr/bin/env expect |
||||
|
||||
set password [lindex $argv 0] |
||||
spawn gpg --detach-sign --armor /rpm-repo/repodata/repomd.xml |
||||
expect "Enter passphrase: " |
||||
send -- "$password\r" |
||||
expect eof |
@ -0,0 +1,7 @@ |
||||
#!/usr/bin/env expect |
||||
|
||||
set password [lindex $argv 0] |
||||
spawn gpg --detach-sign --armor /tmp/sign-this |
||||
expect "Enter passphrase: " |
||||
send -- "$password\r" |
||||
expect eof |
@ -0,0 +1,58 @@ |
||||
#!/usr/bin/env bash |
||||
|
||||
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 |
||||
cp scripts/build/update_repo/aptly.conf /etc/aptly.conf |
||||
mkdir -p /deb-repo/db \ |
||||
/deb-repo/repo \ |
||||
/deb-repo/tmp |
||||
|
||||
# Download the database |
||||
gsutil -m rsync -r "gs://grafana-aptly-db/$RELEASE_TYPE" /deb-repo/db |
||||
|
||||
# Add the new release to the repo |
||||
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 "$REPO" ./dist |
||||
|
||||
# Setup signing and sign the repo |
||||
|
||||
echo "allow-loopback-pinentry" > ~/.gnupg/gpg-agent.conf |
||||
echo "pinentry-mode loopback" > ~/.gnupg/gpg.conf |
||||
|
||||
touch /tmp/sign-this |
||||
./scripts/build/update_repo/unlock-gpg-key.sh "$GPG_PASS" |
||||
rm /tmp/sign-this /tmp/sign-this.asc |
||||
|
||||
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: |
||||
# |
||||
# deb https://packages.grafana.com/oss/deb stable main |
@ -0,0 +1,59 @@ |
||||
#!/usr/bin/env bash |
||||
|
||||
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 "$BUCKET" /rpm-repo |
||||
|
||||
# Add the new release to the repo |
||||
cp ./dist/*.rpm /rpm-repo |
||||
rm /rpm-repo/grafana-latest-1*.rpm || true |
||||
cd /rpm-repo |
||||
createrepo . |
||||
|
||||
# Setup signing and sign the repo |
||||
|
||||
echo "allow-loopback-pinentry" > ~/.gnupg/gpg-agent.conf |
||||
echo "pinentry-mode loopback" > ~/.gnupg/gpg.conf |
||||
|
||||
rm /rpm-repo/repodata/repomd.xml.asc || true |
||||
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 "$BUCKET" |
||||
|
||||
# usage: |
||||
# [grafana] |
||||
# name=grafana |
||||
# baseurl=https://packages.grafana.com/oss/rpm |
||||
# repo_gpgcheck=1 |
||||
# enabled=1 |
||||
# gpgcheck=1 |
||||
# gpgkey=https://packages.grafana.com/gpg.key |
||||
# sslverify=1 |
||||
# sslcacert=/etc/pki/tls/certs/ca-bundle.crt |
Loading…
Reference in new issue