generated from Templates/Baseline
Compare commits
11 Commits
Author | SHA1 | Date | |
---|---|---|---|
65804bb394 | |||
aa45a6fc2f | |||
d38e42de7f | |||
4cd8ec250a | |||
60e6a7b23d | |||
6bc33fdc2d | |||
a1a47e91ba | |||
f0a4978fd6 | |||
8ce38ad8d7 | |||
0426f300c6 | |||
b699580cc7 |
@ -1,14 +1,14 @@
|
|||||||
root = true
|
root = true
|
||||||
|
|
||||||
[*]
|
[*]
|
||||||
indent_style = space
|
indent_style = space
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
end_of_line = lf
|
end_of_line = lf
|
||||||
charset = utf-8
|
charset = utf-8
|
||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
|
|
||||||
|
|
||||||
[*.go]
|
[*.go]
|
||||||
indent_style = tab
|
indent_style = tab
|
||||||
indent_size = 4
|
indent_size = 4
|
||||||
|
3
.hadolint.yml
Normal file
3
.hadolint.yml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
ignored:
|
||||||
|
- DL3018 # pin versions in Dockerfile
|
||||||
|
- DL3013 # pin pip versions in Dockerfile
|
8
.markdownlint.json
Normal file
8
.markdownlint.json
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"default": true,
|
||||||
|
"MD013": {
|
||||||
|
"line_length": 116,
|
||||||
|
"code_block_line_length": 116,
|
||||||
|
"tables": false
|
||||||
|
}
|
||||||
|
}
|
2
.vscode/dictionaries/project-words.txt
vendored
2
.vscode/dictionaries/project-words.txt
vendored
@ -1 +1,3 @@
|
|||||||
|
gitea
|
||||||
|
Gitea
|
||||||
tbd
|
tbd
|
||||||
|
3
.vscode/extensions.json
vendored
3
.vscode/extensions.json
vendored
@ -5,6 +5,7 @@
|
|||||||
"streetsidesoftware.code-spell-checker",
|
"streetsidesoftware.code-spell-checker",
|
||||||
"streetsidesoftware.code-spell-checker-german",
|
"streetsidesoftware.code-spell-checker-german",
|
||||||
"bierner.emojisense",
|
"bierner.emojisense",
|
||||||
"ryanluker.vscode-coverage-gutters"
|
"ryanluker.vscode-coverage-gutters",
|
||||||
|
"davidanson.vscode-markdownlint"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
19
.vscode/settings.json
vendored
19
.vscode/settings.json
vendored
@ -9,20 +9,6 @@
|
|||||||
"editor.rulers": [
|
"editor.rulers": [
|
||||||
116
|
116
|
||||||
],
|
],
|
||||||
// powershell general
|
|
||||||
"powershell.startAutomatically": true,
|
|
||||||
"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,
|
|
||||||
// cSpell settings for custom dictionary
|
// cSpell settings for custom dictionary
|
||||||
"cSpell.enabled": true,
|
"cSpell.enabled": true,
|
||||||
"cSpell.caseSensitive": false,
|
"cSpell.caseSensitive": false,
|
||||||
@ -67,5 +53,10 @@
|
|||||||
"addWords": true
|
"addWords": true
|
||||||
},
|
},
|
||||||
"custom": true
|
"custom": true
|
||||||
|
},
|
||||||
|
"[markdown]": {
|
||||||
|
"editor.defaultFormatter": "DavidAnson.vscode-markdownlint",
|
||||||
|
"editor.formatOnSave": true,
|
||||||
|
"editor.formatOnPaste": true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
3
.vscode/tasks.json
vendored
3
.vscode/tasks.json
vendored
@ -6,7 +6,8 @@
|
|||||||
"type": "shell",
|
"type": "shell",
|
||||||
"command": [
|
"command": [
|
||||||
"mv 'CHANGELOG.md' 'CHANGELOG.back' &&",
|
"mv 'CHANGELOG.md' 'CHANGELOG.back' &&",
|
||||||
"changelog -m '${input:Milestone}' --token '${input:GiteaToken}' -c .changelog.yml generate > CHANGELOG.md &&",
|
"echo '<!-- markdownlint-disable MD041 -->' > CHANGELOG.md &&",
|
||||||
|
"changelog -m '${input:Milestone}' --token '${input:GiteaToken}' -c .changelog.yml generate >> CHANGELOG.md &&",
|
||||||
"echo '' >> CHANGELOG.md &&",
|
"echo '' >> CHANGELOG.md &&",
|
||||||
"cat CHANGELOG.back >> CHANGELOG.md &&",
|
"cat CHANGELOG.back >> CHANGELOG.md &&",
|
||||||
"rm CHANGELOG.back"
|
"rm CHANGELOG.back"
|
||||||
|
@ -5,7 +5,7 @@ when:
|
|||||||
- ${CI_REPO_DEFAULT_BRANCH}
|
- ${CI_REPO_DEFAULT_BRANCH}
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
- &build_plugin 'woodpeckerci/plugin-docker-buildx:3.2.1'
|
- &build_plugin 'woodpeckerci/plugin-docker-buildx:4.2.0'
|
||||||
# deployment targets
|
# deployment targets
|
||||||
# TODO: Disabled docker hub target until first release is ready / Rate Limits
|
# TODO: Disabled docker hub target until first release is ready / Rate Limits
|
||||||
- &publish_repos 'ocram85/plugin-gitea-package,gitea.ocram85.com/plugins/gitea-package'
|
- &publish_repos 'ocram85/plugin-gitea-package,gitea.ocram85.com/plugins/gitea-package'
|
||||||
@ -26,6 +26,28 @@ variables:
|
|||||||
from_secret: gitea_passwd
|
from_secret: gitea_passwd
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
lint-dockerfile:
|
||||||
|
image: hadolint/hadolint:v2.12.1-beta-alpine
|
||||||
|
commands:
|
||||||
|
#- cat Dockerfile
|
||||||
|
#- hadolint --verbose --ignore DL3003 --ignore DL3018 Dockerfile
|
||||||
|
- hadolint --ignore DL3003 --ignore DL3018 Dockerfile
|
||||||
|
#when:
|
||||||
|
# path: "Dockerfile"
|
||||||
|
|
||||||
|
lint-markdown:
|
||||||
|
image: davidanson/markdownlint-cli2:v0.14.0
|
||||||
|
commands:
|
||||||
|
- "markdownlint-cli2 *.{md,markdown}"
|
||||||
|
when:
|
||||||
|
path: "*.{md,markdown}"
|
||||||
|
|
||||||
|
lint-editorconfig:
|
||||||
|
depends_on: []
|
||||||
|
image: docker.io/mstruebing/editorconfig-checker:v3.0.3
|
||||||
|
when:
|
||||||
|
event: pull_request
|
||||||
|
|
||||||
test:
|
test:
|
||||||
image: *build_plugin
|
image: *build_plugin
|
||||||
settings:
|
settings:
|
||||||
|
@ -4,44 +4,67 @@ when:
|
|||||||
branch:
|
branch:
|
||||||
- ${CI_REPO_DEFAULT_BRANCH}
|
- ${CI_REPO_DEFAULT_BRANCH}
|
||||||
|
|
||||||
|
|
||||||
|
variables:
|
||||||
|
- &build_plugin 'gitea.ocram85.com/plugins/gitea-package:next'
|
||||||
|
- &default_settings
|
||||||
|
user:
|
||||||
|
from_secret: gitea_user
|
||||||
|
password:
|
||||||
|
from_secret: gitea_passwd
|
||||||
|
owner: "plugins"
|
||||||
|
package_name: "dummy_package"
|
||||||
|
package_version: "0.1.0"
|
||||||
|
file_source: "./README.md"
|
||||||
|
file_name: "readme.md"
|
||||||
|
#update: "true"
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- "ci"
|
- "ci"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
next:
|
default:
|
||||||
image: gitea.ocram85.com/plugins/gitea-package:next
|
image: *build_plugin
|
||||||
pull: true
|
pull: true
|
||||||
secrets: [ gitea_user, gitea_passwd]
|
secrets: [ gitea_user, gitea_passwd]
|
||||||
settings:
|
settings:
|
||||||
user:
|
<<: *default_settings
|
||||||
from_secret: gitea_user
|
update: "true"
|
||||||
password:
|
when:
|
||||||
from_secret: gitea_passwd
|
event: pull_request
|
||||||
|
branch: ${CI_REPO_DEFAULT_BRANCH}
|
||||||
|
|
||||||
|
debug-out:
|
||||||
|
image: *build_plugin
|
||||||
|
pull: true
|
||||||
|
secrets: [ gitea_user, gitea_passwd]
|
||||||
|
settings:
|
||||||
|
<<: *default_settings
|
||||||
|
update: "true"
|
||||||
debug: "true"
|
debug: "true"
|
||||||
owner: "plugins"
|
|
||||||
package_name: "dummy_package"
|
|
||||||
package_version: "0.1.0"
|
|
||||||
file_source: "./README.md"
|
|
||||||
file_name: "readme.md"
|
|
||||||
update: "true"
|
|
||||||
when:
|
when:
|
||||||
event: pull_request
|
event: pull_request
|
||||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
branch: ${CI_REPO_DEFAULT_BRANCH}
|
||||||
next-nodebug:
|
|
||||||
image: gitea.ocram85.com/plugins/gitea-package:next
|
no-update:
|
||||||
|
image: *build_plugin
|
||||||
pull: true
|
pull: true
|
||||||
|
failure: ignore
|
||||||
secrets: [ gitea_user, gitea_passwd]
|
secrets: [ gitea_user, gitea_passwd]
|
||||||
settings:
|
settings:
|
||||||
user:
|
<<: *default_settings
|
||||||
from_secret: gitea_user
|
debug: "true"
|
||||||
password:
|
when:
|
||||||
from_secret: gitea_passwd
|
event: pull_request
|
||||||
owner: "plugins"
|
branch: ${CI_REPO_DEFAULT_BRANCH}
|
||||||
package_name: "dummy_package"
|
|
||||||
package_version: "0.1.0"
|
no-update-debug:
|
||||||
file_source: "./README.md"
|
image: *build_plugin
|
||||||
file_name: "readme.md"
|
pull: true
|
||||||
update: "true"
|
failure: ignore
|
||||||
|
secrets: [ gitea_user, gitea_passwd]
|
||||||
|
settings:
|
||||||
|
<<: *default_settings
|
||||||
when:
|
when:
|
||||||
event: pull_request
|
event: pull_request
|
||||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
branch: ${CI_REPO_DEFAULT_BRANCH}
|
||||||
|
27
CHANGELOG.md
27
CHANGELOG.md
@ -1,3 +1,29 @@
|
|||||||
|
<!-- markdownlint-disable MD041 -->
|
||||||
|
## [v0.3.0](https://gitea.ocram85.com/plugins/gitea-package/releases/tag/v0.3.0) - 2024-09-09
|
||||||
|
|
||||||
|
* 🤖 DEPENDENCIES
|
||||||
|
* Chore(deps): update davidanson/markdownlint-cli2 docker tag to v0.14.0 (#17)
|
||||||
|
* Chore(deps): update curlimages/curl docker tag to v8.9.1 (#16)
|
||||||
|
* Chore(deps): update woodpeckerci/plugin-docker-buildx docker tag to v4.2.0 (#15)
|
||||||
|
|
||||||
|
<!-- markdownlint-disable MD041 -->
|
||||||
|
## [v0.2.0](https://gitea.ocram85.com/plugins/gitea-package/releases/tag/v0.2.0) - 2024-07-09
|
||||||
|
|
||||||
|
* 🤖 DEPENDENCIES
|
||||||
|
* Chore(deps): update docker.io/mstruebing/editorconfig-checker docker tag to v3.0.3 (#13)
|
||||||
|
* Chore(deps): update curlimages/curl docker tag to v8.8.0 (#12)
|
||||||
|
|
||||||
|
<!-- markdownlint-disable MD041 -->
|
||||||
|
## [v0.1.1](https://gitea.ocram85.com/plugins/gitea-package/releases/tag/v0.1.1) - 2024-05-17
|
||||||
|
|
||||||
|
* 🛠️ ENHANCEMENTS
|
||||||
|
* Extend text output (#10)
|
||||||
|
* 📦 BUILD
|
||||||
|
* Add linter + renovate (#6)
|
||||||
|
* 🤖 DEPENDENCIES
|
||||||
|
* Chore(deps): update woodpeckerci/plugin-docker-buildx docker tag to v4 (#8)
|
||||||
|
|
||||||
|
<!-- markdownlint-disable MD041 -->
|
||||||
## [v0.1.0](https://gitea.ocram85.com/plugins/gitea-package/releases/tag/v0.1.0) - 2024-05-14
|
## [v0.1.0](https://gitea.ocram85.com/plugins/gitea-package/releases/tag/v0.1.0) - 2024-05-14
|
||||||
|
|
||||||
* 🐛 BUGFIXES
|
* 🐛 BUGFIXES
|
||||||
@ -7,4 +33,3 @@
|
|||||||
* Migrate content (#1)
|
* Migrate content (#1)
|
||||||
* ⚙️ META
|
* ⚙️ META
|
||||||
* Update Gitea meta files (#2)
|
* Update Gitea meta files (#2)
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
FROM curlimages/curl:8.7.1
|
FROM curlimages/curl:8.9.1
|
||||||
LABEL org.opencontainers.image.authors="marco@ocram85.com"
|
LABEL org.opencontainers.image.authors="marco@ocram85.com"
|
||||||
#ENV PLUGIN_OWNER
|
#ENV PLUGIN_OWNER
|
||||||
#ENV PLUGIN_PACKAGE_NAME
|
#ENV PLUGIN_PACKAGE_NAME
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
|
<!-- markdownlint-disable MD033 MD041 -->
|
||||||
|
|
||||||
<p align="right">
|
<p align="right">
|
||||||
<img src="http://forthebadge.com/images/badges/built-with-love.svg">
|
<img src="http://forthebadge.com/images/badges/built-with-love.svg" alt="built-with-love">
|
||||||
<img src="http://forthebadge.com/images/badges/for-you.svg">
|
<img src="http://forthebadge.com/images/badges/for-you.svg" alt="for-you">
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
|
@ -26,13 +26,16 @@ sayW() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
showHelp() {
|
# TODO: Disabled for now. No default help output needed if just running as
|
||||||
cat << HELP
|
# Woodpecker CI plugin.
|
||||||
🤖 gitea-package Woodpecker-CI Plugin
|
#
|
||||||
|
#showHelp() {
|
||||||
Syntax:
|
# cat << HELP
|
||||||
HELP
|
# 🤖 gitea-package Woodpecker-CI Plugin
|
||||||
}
|
#
|
||||||
|
# Syntax:
|
||||||
|
#HELP
|
||||||
|
#}
|
||||||
|
|
||||||
showENV() {
|
showENV() {
|
||||||
env | sort
|
env | sort
|
||||||
@ -75,41 +78,41 @@ deleteArtifact() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
uploadArtifact() {
|
uploadArtifact() {
|
||||||
say "Testing if the artifact already exists in give package version..." "uploadArtifact"
|
say "Testing if the given artifact already exists in the package registry..." "uploadArtifact"
|
||||||
fexist=$(testArtifact)
|
fexist=$(testArtifact)
|
||||||
if [ "$fexist" = "true" ]; then
|
if [ "$fexist" = "true" ]; then
|
||||||
if [ -n "$PLUGIN_UPDATE" ]; then
|
if [ -n "$PLUGIN_UPDATE" ]; then
|
||||||
sayW "Given file already exists. Updating package file..." "uploadArtifact"
|
sayW "🚧 Given file already exists. Removing remote file..." "uploadArtifact"
|
||||||
deleteArtifact
|
deleteArtifact
|
||||||
else
|
else
|
||||||
sayW "A file with the same name exist already in the package." "uploadArtifact"
|
sayW "🛑 File already exists in the package registry." "uploadArtifact"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
say "Starting file upload..." "uploadArtifact"
|
say "Starting file upload... ($PLUGIN_FILE_SOURCE)" "uploadArtifact"
|
||||||
cout=$(curl --silent --output /dev/null --write-out "%{http_code}" \
|
cout=$(curl --silent --output /dev/null --write-out "%{http_code}" \
|
||||||
--user "$PLUGIN_USER:$PLUGIN_PASSWORD" \
|
--user "$PLUGIN_USER:$PLUGIN_PASSWORD" \
|
||||||
--upload-file "$PLUGIN_FILE_SOURCE" \
|
--upload-file "$PLUGIN_FILE_SOURCE" \
|
||||||
"$CI_FORGE_URL/api/packages/$PLUGIN_OWNER/generic/$PLUGIN_PACKAGE_NAME/$PLUGIN_PACKAGE_VERSION/$PLUGIN_FILE_NAME")
|
"$CI_FORGE_URL/api/packages/$PLUGIN_OWNER/generic/$PLUGIN_PACKAGE_NAME/$PLUGIN_PACKAGE_VERSION/$PLUGIN_FILE_NAME")
|
||||||
say "Curl output is: $cout" "uploadArtifact"
|
say "Curl http response code: $cout" "uploadArtifact"
|
||||||
|
|
||||||
if [ "$cout" = "201" ]; then
|
if [ "$cout" = "201" ]; then
|
||||||
say "Upload sucessfully finished." "uploadArtifact"
|
say "Upload sucessfully finished. ✅" "uploadArtifact"
|
||||||
exit 0
|
exit 0
|
||||||
elif [ "$cout" = "400" ]; then
|
elif [ "$cout" = "400" ]; then
|
||||||
sayE "Upload failed! (Bad Request)" "uploadArtifact"
|
sayE "Upload failed! (Bad Request) 💣" "uploadArtifact"
|
||||||
exit 1
|
exit 1
|
||||||
elif [ "$cout" = "409" ]; then
|
elif [ "$cout" = "409" ]; then
|
||||||
sayE "File already exists in package version!" "uploadArtifact"
|
sayE "File already exists in package version! 🛑" "uploadArtifact"
|
||||||
else
|
else
|
||||||
sayE "Unknown upload response! ($cout)" "uploadArtifact"
|
sayE "Unknown upload response! ($cout) 💣" "uploadArtifact"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
if [ -n "$PLUGIN_DEBUG" ]; then
|
if [ -n "$PLUGIN_DEBUG" ]; then
|
||||||
sayW "Debug mode enabled."
|
sayW "🐞 Debug mode enabled."
|
||||||
showSettings
|
showSettings
|
||||||
#sayW "Available ENV vars:"
|
#sayW "Available ENV vars:"
|
||||||
#showENV
|
#showENV
|
||||||
|
12
renovate.json
Normal file
12
renovate.json
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"dependencyDashboard": true,
|
||||||
|
"docker": {
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
"woodpecker": {
|
||||||
|
"enabled": true,
|
||||||
|
"fileMatch": [
|
||||||
|
"^.woodpecker\/.*.yml$"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user