Unverified Commit 2cebd956 authored by Sheogorath's avatar Sheogorath 🏰 Committed by GitHub
Browse files

Merge pull request #2 from SISheogorath/feature/serviceRepo

Add deployment version
parents 01a9fe5b e0dbf713
sudo: required
language: bash
services:
- docker
addons: addons:
apt: apt:
packages: packages:
...@@ -11,4 +16,18 @@ addons: ...@@ -11,4 +16,18 @@ addons:
script: script:
- "./updaterepos.sh" - "./updaterepos.sh"
- "ls pkgs" - "docker build -t ${DOCKER_REPO_PREFIX}/${DOCKER_REPO_NAME}:latest ."
after_success:
# Push successful builds of the master branch to Docker Hub
# You need to define $DOCKER_REPO_PREFIX, $DOCKER_REPO_NAME, $DOCKER_USERNAME and $DOCKER_PASSWORD in your Travis settings.
# $DOCKER_REPO_PREFIX - Organisation of username who owns the repo on Docker Hub
# $DOCKER_REPO_NAME - Repository name on Docker Hub
# $DOCKER_USERNAME - Docker Hub username used to push the image
# $DOCKER_PASSWORD - Password of the Docker Hub user used to push the image
# See https://docs.travis-ci.com/user/environment-variables/#Defining-Variables-in-Repository-Settings
- if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_BRANCH" == "master" ] && [ "$DOCKER_REPO_PREFIX" != "" ] && [ "$DOCKER_REPO_NAME" != "" ] && [ "$DOCKER_USERNAME" != "" ] && [ "$DOCKER_PASSWORD" != "" ]; then
docker images "${DOCKER_REPO_PREFIX}/${DOCKER_REPO_NAME}";
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
docker images --format "{{.Repository}}:{{.Tag}}" "${DOCKER_REPO_PREFIX}/${DOCKER_REPO_NAME}" | xargs -L 1 docker push ;
fi
FROM nginx:stable-alpine
COPY pkgs/ /usr/share/nginx/html/
<title>Simply test repository</title>
<h1>This is the index page of a test repository</h2>
<p>This is just for testing, please don't use in production</p>
...@@ -12,8 +12,6 @@ echo -e "Download new RPM packages" ...@@ -12,8 +12,6 @@ echo -e "Download new RPM packages"
mkdir -p pkgs/rpms mkdir -p pkgs/rpms
curl -L 'https://github.com/bitwarden/desktop/releases/download/v1.0.5/Bitwarden-1.0.5-x86_64.rpm' -o pkgs/rpms/bitwarden.rpm curl -L 'https://github.com/bitwarden/desktop/releases/download/v1.0.5/Bitwarden-1.0.5-x86_64.rpm' -o pkgs/rpms/bitwarden.rpm
# generation of new RPM repository from downloaded packages
createrepo pkgs/rpms/
echo -e "Download new DEB packages" echo -e "Download new DEB packages"
mkdir pkgs/debs/ mkdir pkgs/debs/
...@@ -34,6 +32,9 @@ echo "%_gpg_name $KEYID" > ~/.rpmmacros ...@@ -34,6 +32,9 @@ echo "%_gpg_name $KEYID" > ~/.rpmmacros
# Sign deb package # Sign deb package
debsigs --sign=origin -k $KEYID /tmp/bitwarden.deb debsigs --sign=origin -k $KEYID /tmp/bitwarden.deb
# generation of new RPM repository from downloaded packages
createrepo pkgs/rpms/
# generation of new Deb repository from downloaded packages # generation of new Deb repository from downloaded packages
mkdir pkgs/debs/conf mkdir pkgs/debs/conf
touch pkgs/debs/conf/{option,distributions} touch pkgs/debs/conf/{option,distributions}
...@@ -47,6 +48,12 @@ echo "Sign the repositories" ...@@ -47,6 +48,12 @@ echo "Sign the repositories"
gpg --detach-sign --armor pkgs/rpms/repodata/repomd.xml gpg --detach-sign --armor pkgs/rpms/repodata/repomd.xml
gpg --detach-sign --armor pkgs/debs/dists/bitwarden/main/binary-amd64/Release gpg --detach-sign --armor pkgs/debs/dists/bitwarden/main/binary-amd64/Release
echo "Cleanup key"
rm signing.key
echo "Beautify repository"
cp pub.gpg pkgs/
cp resources/index.html pkgs/
# DOCS # DOCS
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment