diff --git a/.drone.jsonnet b/.drone.jsonnet
deleted file mode 100644
index 8ae0982..0000000
--- a/.drone.jsonnet
+++ /dev/null
@@ -1,161 +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: [
- 'apt-get -qq update && apt-get install -yqq --no-install-recommends libpq-dev',
- 'make build',
- ],
- },
- {
- name: 'verify',
- image: 'alpine',
- commands: [
- 'src/target/x86_64-unknown-linux-musl/release/bitwarden_rs --help',
- 'src/target/x86_64-unknown-linux-musl/release/bitwarden_rs --version',
- ],
- },
- {
- 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 }}**
Build: [{{ repo.Owner }}/{{ repo.Name }}]({{ build.link }}) ({{ build.branch }}) by {{ build.author }}
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',
- ]),
-]
diff --git a/.drone.yml b/.drone.yml
index afb6a8f..9dd5ffb 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -1,6 +1,6 @@
---
kind: pipeline
-name: build-container-amd64
+name: build-container
platform:
os: linux
@@ -35,11 +35,21 @@ steps:
ref:
- 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
image: plugins/docker
settings:
- auto_tag: true
- auto_tag_suffix: amd64
dockerfile: Dockerfile
password:
from_secret: docker_password
@@ -73,24 +83,6 @@ platform:
arch: amd64
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
image: sheogorath/readme-to-dockerhub
environment:
@@ -136,6 +128,6 @@ depends_on:
---
kind: signature
-hmac: f4a12d5f9cee46cefee4176323f595a01e36894f96afcad48cbdfc445ddba8d1
+hmac: 0b872dcb7733170e21e3c72667ab49b8d46f61d885be86c1582b5e8a5a52d833
...
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b818a05..ab7a86a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,2 @@
-* ENHANCEMENT
- * update server to v1.14.2
- * update web-vault to v2.13.2
+* INTERNAL
+ * simplify repo structure and ci
diff --git a/README.md b/README.md
index 194a496..e392bae 100644
--- a/README.md
+++ b/README.md
@@ -20,7 +20,7 @@ version: '3'
services:
postgres:
- container_name: bitwardenrs_postgres
+ container_name: postgres
image: postgres
environment:
POSTGRES_DB: bitwarden
diff --git a/docker-compose.yml b/docker-compose.yml
index 27dcb64..025219e 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -3,7 +3,7 @@ version: '3'
services:
postgres:
- container_name: bitwardenrs_postgres
+ container_name: postgres
image: postgres
environment:
POSTGRES_DB: bitwarden
diff --git a/manifest.tmpl b/manifest.tmpl
deleted file mode 100644
index 225cc27..0000000
--- a/manifest.tmpl
+++ /dev/null
@@ -1,15 +0,0 @@
-image: xoxys/bitwardenrs:{{#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:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}amd64
- platform:
- architecture: amd64
- os: linux