Skip to content
This repository has been archived by the owner on Jul 6, 2022. It is now read-only.

Commit

Permalink
migrate repo content
Browse files Browse the repository at this point in the history
  • Loading branch information
OCram85 committed Jan 4, 2022
1 parent 84f928b commit 54f30ae
Show file tree
Hide file tree
Showing 24 changed files with 876 additions and 0 deletions.
121 changes: 121 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
---
kind: pipeline
type: docker
name: "Build Pipeline"
trigger:
event:
exclude:
- pull_request

steps:
- name: "Build binary"
image: golang:1.15-buster
commands:
- CGO_ENABLED=0 go build -o ServiceUpdater

- name: "Build and Push (master)"
image: plugins/docker
settings:
username:
from_secret: hub_user
password:
from_secret: hub_passwd
repo: ocram85/portainer-serviceupdate
#dockerfile: src/Dockerfile
tags: latest
#no_cache: true
when:
branch:
- master

- name: "Build (${DRONE_BRANCH})"
image: plugins/docker
settings:
username:
from_secret: hub_user
password:
from_secret: hub_passwd
repo: ocram85/portainer-serviceupdate
#dockerfile: src/Dockerfile
tags: "${DRONE_BRANCH}"
#no_cache: true
when:
branch:
exclude:
- master

- name: "Trivy dev (${DRONE_BRANCH})"
image: aquasec/trivy
commands:
- trivy image ocram85/portainer-serviceupdate:${DRONE_BRANCH}
when:
branch:
exclude:
- master

- name: "Trivy latest"
image: aquasec/trivy
commands:
- trivy image ocram85/portainer-serviceupdate:latest
when:
branch:
- master

---
kind: pipeline
type: docker
name: "Test pipeline"

depends_on:
- "Build Pipeline"

trigger:
event:
exclude:
- pull_request

steps:
- name: "Test missing uri"
image: ocram85/portainer-serviceupdate:${DRONE_BRANCH}
failure: ignore
settings:
VERBOSE: true
when:
branch:
exclude:
- master

- name: "Test missing token"
image: ocram85/portainer-serviceupdate:${DRONE_BRANCH}
failure: ignore
settings:
VERBOSE: true
URI: "https://portainer.ocram85.com"
when:
branch:
exclude:
- master

- name: "Test update failure"
image: ocram85/portainer-serviceupdate:${DRONE_BRANCH}
failure: ignore
settings:
VERBOSE: true
URI: "https://portainer.ocram85.com"
TOKEN: "fooo"
when:
branch:
exclude:
- master

- name: "Test Service Update"
image: ocram85/portainer-serviceupdate:${DRONE_BRANCH}
settings:
VERBOSE: true
URI: "https://portainer.ocram85.com"
TOKEN:
from_secret: TOKEN
when:
branch:
exclude:
- master
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[{Makefile,go.mod,go.sum,*.go}]
indent_style = tab
indent_size = 4

[*.yml]
indent_size = 2
17 changes: 17 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# images
*.jpg binary
*.jpeg binary
*.bmp binary
*.tiff binary
*.png binary
*.svg binary
*.ico binary

# binary files
*.exe binary
*.dll binary

# PowerShell specific
*.ps1 working-tree-encoding=UTF-8
*.psm1 working-tree-encoding=UTF-8
*.psd1 working-tree-encoding=UTF-8
11 changes: 11 additions & 0 deletions .gitea/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
----
name: "Default"
about: "Use this template if nothing seems to work."
title: ":question: "
labels:
- question
----

#### :grey_question: Simply ask your question here: :grey_question:

<!-- Take your time an think about your problem.... -->
48 changes: 48 additions & 0 deletions .gitea/ISSUE_TEMPLATE/Bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
----
name: "Bug"
about: "This template is used to report bugs!"
title: ":lady_beetle: "
labels:
- bug
----
<!--
This bug report is ony for content provided in this repository!
- Make sure you're able to reproduce the error in the lastest version of this package.
- Search of already existing issues.
- Refer to the known issues and FAQ section.
-->

#### :bomb: Steps to reproduce

```bash

```

#### :rocket: Expected behavior

```bash

```

#### :boom: Actual behavior

```bash

```

#### :notebook: Environment data

<!-- You can add additional environment data here--->

```bash

```

#### :framed_picture: Screenshots

<!-- Paste your screenshots here. -->

#### :bookmark: Refs

<!-- A place for addtional references to othe issues and PRs -->
24 changes: 24 additions & 0 deletions .gitea/ISSUE_TEMPLATE/Enhancement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
----
name: "Enhancement"
about: "Wite about new features."
title: ":flying_saucer: "
labels:
- enhancement
----
<!--
This issue template is used to describe whished features.
-->

#### :satellite: Suggestion



#### :artificial_satellite: Implementation ideas



#### :framed_picture: Mock-up Images



#### :bookmark: Refs.
11 changes: 11 additions & 0 deletions .gitea/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#### :book: Summary

<!-- Provide a summary of your changes. Pleas describe the why and not how. -->

#### :bookmark_tabs: Test Plan

<!-- For major changes don't forget to write your tests. -->

#### :books: Additional Details

<!-- A place for additional details. -->
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@

# Dependency directories (remove the comment below to include it)
# vendor/


# additional custom excludes
*.log
19 changes: 19 additions & 0 deletions .gitlocal
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[alias]

# simplified logs
log1 = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
log2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all

# Phabricator inspired workflow
# 1. Create new feature branch
feature = "!f(){ b=$1; git checkout master; git pull; git checkout -b "$b" master; };f"

# 2. Working with code
wip = !"git add -A; git commit -m '[WIP]'"
squish = !"git add -A; git commit --no-edit --amend"

# 3. Push to origin
pod = !"git push origin dev"

# 4. Push to custom remote branch
poc = "!f(){ b=$1; git push origin "$b";};f"
22 changes: 22 additions & 0 deletions .vscode/cSpell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// cSpell Settings
{
// Version of the setting file. Always 0.1
"version": "0.1",
// language - current active spelling language
"language": "en,de,de-DE",
// words - list of words to be always considered correct
"words": [],
// flagWords - list of words to be always considered incorrect
// This is useful for offensive words and common spelling errors.
// For example "hte" should be "the"
"flagWords": [],
"dictionaryDefinitions": [
{
"name": "default",
"path": "./dictionaries/default.txt"
}
],
"dictionaries": [
"default"
]
}
2 changes: 2 additions & 0 deletions .vscode/dictionaries/default.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
gitea
gitlocal
8 changes: 8 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"recommendations": [
"streetsidesoftware.code-spell-checker",
"streetsidesoftware.code-spell-checker-german",
"editorconfig.editorconfig",
"eamodio.gitlens"
]
}
59 changes: 59 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"files.encoding": "utf8",
"files.eol": "auto",
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
"editor.renderWhitespace": "boundary",
"editor.formatOnSave": true,
"editor.formatOnType": true,
"editor.rulers": [
116
],
"cSpell.enabled": true,
"cSpell.enabledLanguageIds": [
"c",
"cpp",
"csharp",
"go",
"javascript",
"javascriptreact",
"json",
"latex",
"markdown",
"php",
"plaintext",
"powershell",
"python",
"text",
"typescript",
"typescriptreact",
"yaml",
"yml"
],
"cSpell.language": "en,de,de-DE",
// powershell general
"powershell.startAutomatically": true,
"powershell.useX86Host": false,
"powershell.enableProfileLoading": true,
"powershell.scriptAnalysis.enable": true,
// powershell code Formatting
"powershell.codeFormatting.openBraceOnSameLine": true,
"powershell.codeFormatting.newLineAfterOpenBrace": true,
"powershell.codeFormatting.newLineAfterCloseBrace": true,
"powershell.codeFormatting.whitespaceBeforeOpenBrace": true,
"powershell.codeFormatting.whitespaceBeforeOpenParen": true,
"powershell.codeFormatting.whitespaceAroundOperator": true,
"powershell.codeFormatting.whitespaceAfterSeparator": true,
"powershell.codeFormatting.ignoreOneLineBlock": true,
"powershell.codeFormatting.alignPropertyValuePairs": true,
"[yaml]": {
"editor.insertSpaces": true,
"editor.tabSize": 2,
"editor.quickSuggestions": {
"other": true,
"comments": false,
"strings": true
},
"editor.autoIndent": "full"
}
}
Loading

0 comments on commit 54f30ae

Please sign in to comment.