cleanup
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Robert Kaussow 2020-05-04 19:43:13 +02:00
parent c11763c0cf
commit e99f3ab16f
6 changed files with 64 additions and 198 deletions

View File

@ -1,152 +0,0 @@
local PipelineBuild(arch='amd64') = {
kind: 'pipeline',
name: 'build-container-' + arch,
platform: {
os: 'linux',
arch: arch,
},
steps: [
{
name: 'binary',
image: 'clux/muslrust:nightly-2019-12-19',
environment: {
BUILD_VERSION: '${DRONE_TAG%-*}',
},
commands: [
'make build',
],
},
{
name: 'dryrun',
image: 'plugins/docker',
settings: {
dry_run: true,
dockerfile: 'Dockerfile',
repo: 'xoxys/${DRONE_REPO_NAME}',
username: { from_secret: 'docker_username' },
password: { from_secret: 'docker_password' },
},
when: {
ref: [
'refs/pull/**',
],
},
},
{
name: 'publish',
image: 'plugins/docker',
settings: {
auto_tag: true,
auto_tag_suffix: arch,
dockerfile: 'Dockerfile',
repo: 'xoxys/${DRONE_REPO_NAME}',
username: { from_secret: 'docker_username' },
password: { from_secret: 'docker_password' },
},
when: {
ref: [
'refs/heads/master',
'refs/tags/**',
],
},
},
{
name: 'publish-gitea',
image: 'plugins/gitea-release',
settings: {
api_key: { from_secret: 'gitea_token' },
base_url: 'https://gitea.rknet.org',
overwrite: true,
title: '${DRONE_TAG}',
note: 'CHANGELOG.md',
},
when: {
ref: ['refs/tags/**'],
},
},
],
};
local PipelineNotifications(depends_on=[]) = {
kind: 'pipeline',
name: 'notifications',
platform: {
os: 'linux',
arch: 'amd64',
},
steps: [
{
image: 'plugins/manifest',
name: 'manifest',
settings: {
ignore_missing: true,
tags: [
'${DRONE_TAG}',
'${DRONE_TAG%-*}',
'${DRONE_TAG%.*}',
'${DRONE_TAG%%.*}',
],
username: { from_secret: 'docker_username' },
password: { from_secret: 'docker_password' },
spec: 'manifest.tmpl',
},
when: {
status: [
'success',
],
},
},
{
name: 'readme',
image: 'sheogorath/readme-to-dockerhub',
environment: {
DOCKERHUB_USERNAME: { from_secret: 'docker_username' },
DOCKERHUB_PASSWORD: { from_secret: 'docker_password' },
DOCKERHUB_REPO_PREFIX: 'xoxys',
DOCKERHUB_REPO_NAME: '${DRONE_REPO_NAME}',
README_PATH: 'README.md',
SHORT_DESCRIPTION: 'Rootless Bitwarden_RS - Self-hosted password manager',
},
when: {
status: [
'success',
],
},
},
{
name: 'matrix',
image: 'plugins/matrix',
settings: {
homeserver: { from_secret: 'matrix_homeserver' },
roomid: { from_secret: 'matrix_roomid' },
template: 'Status: **{{ build.status }}**<br/> Build: [{{ repo.Owner }}/{{ repo.Name }}]({{ build.link }}) ({{ build.branch }}) by {{ build.author }}<br/> Message: {{ build.message }}',
username: { from_secret: 'matrix_username' },
password: { from_secret: 'matrix_password' },
},
when: {
status: [
'success',
'failure',
],
},
},
],
trigger: {
ref: [
'refs/heads/master',
'refs/tags/**',
],
status: [
'success',
'failure',
],
},
depends_on: depends_on,
};
[
PipelineBuild(arch='amd64'),
PipelineNotifications(depends_on=[
'build-container-amd64',
]),
]

View File

@ -1,6 +1,6 @@
--- ---
kind: pipeline kind: pipeline
name: build-container-amd64 name: build-container
platform: platform:
os: linux os: linux
@ -28,11 +28,21 @@ steps:
ref: ref:
- refs/pull/** - refs/pull/**
- name: tags
image: xoxys/docker-autotag
environment:
DOCKER_AUTOTAG_FORCE_LATEST: True
DOCKER_AUTOTAG_IGNORE_PRERELEASE: True
DOCKER_AUTOTAG_OUTPUT_FILE: .tags
DOCKER_AUTOTAG_VERSION: ${DRONE_TAG}
when:
ref:
- refs/heads/master
- refs/tags/**
- name: publish - name: publish
image: plugins/docker image: plugins/docker
settings: settings:
auto_tag: true
auto_tag_suffix: amd64
dockerfile: Dockerfile dockerfile: Dockerfile
password: password:
from_secret: docker_password from_secret: docker_password
@ -66,24 +76,6 @@ platform:
arch: amd64 arch: amd64
steps: steps:
- name: manifest
image: plugins/manifest
settings:
ignore_missing: true
password:
from_secret: docker_password
spec: manifest.tmpl
tags:
- ${DRONE_TAG}
- ${DRONE_TAG%-*}
- ${DRONE_TAG%.*}
- ${DRONE_TAG%%.*}
username:
from_secret: docker_username
when:
status:
- success
- name: readme - name: readme
image: sheogorath/readme-to-dockerhub image: sheogorath/readme-to-dockerhub
environment: environment:
@ -125,10 +117,10 @@ trigger:
- failure - failure
depends_on: depends_on:
- build-container-amd64 - build-container
--- ---
kind: signature kind: signature
hmac: 102f01aa01fda11f602b3287bcffaff10091321eb5f3ff83fe665090bd504297 hmac: e6fa16a11bafd135df4b773257c95f9b34126023325a6b2ebabc2069ab24032f
... ...

View File

@ -1,2 +1,2 @@
* ENHANCEMENT * INTERNAL
* upstream update * simplify repo structure and ci

View File

@ -15,9 +15,50 @@ This is a custom Docker image for [bitwarden_rs_ldap](https://github.com/ViViDbo
version: '3' version: '3'
services: services:
postgres:
container_name: postgres
image: postgres
environment:
POSTGRES_DB: bitwarden
POSTGRES_PASSWORD: pass
POSTGRES_USER: user
ldap:
container_name: ldap
image: osixia/openldap
bitwardenrs:
container_name: bitwardenrs_server
image: xoxys/bitwardenrs:latest
depends_on:
- postgres
ports:
- "80:8080"
volumes:
- data:/app/data
environment:
BITWARDENRS_DATABASE_URL: postgresql://user:pass@postgres:5432/bitwarden
BITWARDENRS_ADMIN_TOKEN: my_secure_token
bitwardenrs_ldap: bitwardenrs_ldap:
container_name: bitwardenrs_ldap container_name: ldap_sync
restart: always
image: xoxys/bitwardenrs_ldap:latest image: xoxys/bitwardenrs_ldap:latest
depends_on:
- bitwardenrs
- ldap
environment:
BITWARDENRS_LDAP_BITWARDEN_URL: http://bitwardenrs_server:8080
BITWARDENRS_LDAP_BITWARDEN_ADMIN_TOKEN: my_secure_token
BITWARDENRS_LDAP_HOST: ldap
BITWARDENRS_LDAP_SSL: "False"
BITWARDENRS_LDAP_BIND_DN: "cn=admin,dc=example,dc=org"
BITWARDENRS_LDAP_SEARCH_BASE_DN: "dc=example,dc=org"
BITWARDENRS_LDAP_BIND_PASSWORD: admin
volumes:
data:
driver: local
``` ```
## Configuration ## Configuration

View File

@ -3,7 +3,7 @@ version: '3'
services: services:
postgres: postgres:
container_name: bitwardenrs_postgres container_name: postgres
image: postgres image: postgres
environment: environment:
POSTGRES_DB: bitwarden POSTGRES_DB: bitwarden
@ -11,7 +11,7 @@ services:
POSTGRES_USER: user POSTGRES_USER: user
ldap: ldap:
container_name: bitwardenrs_ldap container_name: ldap
image: osixia/openldap image: osixia/openldap
bitwardenrs: bitwardenrs:
@ -24,11 +24,11 @@ services:
volumes: volumes:
- data:/app/data - data:/app/data
environment: environment:
BITWARDENRS_DATABASE_URL: postgresql://user:pass@bitwardenrs_postgres:5432/bitwarden BITWARDENRS_DATABASE_URL: postgresql://user:pass@postgres:5432/bitwarden
BITWARDENRS_ADMIN_TOKEN: my_secure_token BITWARDENRS_ADMIN_TOKEN: my_secure_token
bitwardenrs_ldap: bitwardenrs_ldap:
container_name: bitwardenrs_ldap_sync container_name: ldap_sync
restart: always restart: always
image: xoxys/bitwardenrs_ldap:latest image: xoxys/bitwardenrs_ldap:latest
depends_on: depends_on:
@ -37,7 +37,7 @@ services:
environment: environment:
BITWARDENRS_LDAP_BITWARDEN_URL: http://bitwardenrs_server:8080 BITWARDENRS_LDAP_BITWARDEN_URL: http://bitwardenrs_server:8080
BITWARDENRS_LDAP_BITWARDEN_ADMIN_TOKEN: my_secure_token BITWARDENRS_LDAP_BITWARDEN_ADMIN_TOKEN: my_secure_token
BITWARDENRS_LDAP_HOST: bitwardenrs_ldap BITWARDENRS_LDAP_HOST: ldap
BITWARDENRS_LDAP_SSL: "False" BITWARDENRS_LDAP_SSL: "False"
BITWARDENRS_LDAP_BIND_DN: "cn=admin,dc=example,dc=org" BITWARDENRS_LDAP_BIND_DN: "cn=admin,dc=example,dc=org"
BITWARDENRS_LDAP_SEARCH_BASE_DN: "dc=example,dc=org" BITWARDENRS_LDAP_SEARCH_BASE_DN: "dc=example,dc=org"

View File

@ -1,15 +0,0 @@
image: xoxys/bitwardenrs_ldap:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
{{#if build.tags}}
tags:
{{#each build.tags}}
{{#if this}}
- {{trimPrefix "v" this}}
- {{trimPrefix "v" this}}-amd64
{{/if}}
{{/each}}
{{/if}}
manifests:
- image: xoxys/bitwardenrs_ldap:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}amd64
platform:
architecture: amd64
os: linux