8 Commits

Author SHA1 Message Date
3791bce7a8 add docker hub to deploy
Some checks failed
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/next Pipeline was successful
ci/woodpecker/push/deploy Pipeline was successful
ci/woodpecker/tag/test Pipeline was successful
ci/woodpecker/tag/next Pipeline was successful
ci/woodpecker/tag/deploy Pipeline failed
2023-09-06 16:29:04 +02:00
a1a4c2b1e9 Update quay.io/linuxserver.io/code-server Docker tag to v4.16.1 (#59)
All checks were successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/next Pipeline was successful
ci/woodpecker/push/deploy Pipeline was successful
ci/woodpecker/tag/test Pipeline was successful
ci/woodpecker/tag/next Pipeline was successful
ci/woodpecker/tag/deploy Pipeline was successful
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [quay.io/linuxserver.io/code-server](https://github.com/linuxserver/docker-code-server) | final | minor | `4.15.0` -> `4.16.1` |

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC40MC4yIiwidXBkYXRlZEluVmVyIjoiMzQuNDAuMiJ9-->

Reviewed-on: CodeServer/arkanum#59
Co-authored-by: renovate-bot <renovate@ocram85.com>
Co-committed-by: renovate-bot <renovate@ocram85.com>
2023-08-03 09:54:32 +02:00
e700e7b477 Extends arkanum command and option structure (#62)
All checks were successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/next Pipeline was successful
ci/woodpecker/push/deploy Pipeline was successful
#### 📖 Summary

- adds nested arguments for arkanum:

```
arkanum <flag> COMMAND OPTION <ARGUMENT>
```

#### 📑 Test Plan

> 💡 Select your test plan for the code changes.

| Choice | Test Method       |
| :----: | :-----------      |
|      | CI pipeline tests |
|        | Custom test       |
|        | No test plan      |

##### Details / Justification

<!-- Add your test details or justification for missing tests here. -->

#### 📚 Additional Notes

- fixes #61

Co-authored-by: OCram85 <marco.blessing@googlemail.com>
Reviewed-on: CodeServer/arkanum#62
2023-08-03 09:51:02 +02:00
26754e83f9 fix pwsh install when called as first command (#60)
All checks were successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/next Pipeline was successful
ci/woodpecker/push/deploy Pipeline was successful
#### 📖 Summary

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

#### 📑 Test Plan

> 💡 Select your test plan for the code changes.

| Choice | Test Method       |
| :----: | :-----------      |
|      | CI pipeline tests |
|        | Custom test       |
|        | No test plan      |

##### Details / Justification

<!-- Add your test details or justification for missing tests here. -->

#### 📚 Additional Notes

<!-- A place for additional detail notes. -->

Co-authored-by: OCram85 <marco.blessing@googlemail.com>
Reviewed-on: CodeServer/arkanum#60
2023-08-01 09:14:21 +02:00
7fe6062a8f Update quay.io/linuxserver.io/code-server Docker tag to v4.15.0 (#57)
All checks were successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/next Pipeline was successful
ci/woodpecker/push/deploy Pipeline was successful
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [quay.io/linuxserver.io/code-server](https://github.com/linuxserver/docker-code-server) | final | minor | `4.14.1` -> `4.15.0` |

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC40MC4yIiwidXBkYXRlZEluVmVyIjoiMzQuNDAuMiJ9-->

Co-authored-by: OCram85 <ocram85@noreply.local>
Reviewed-on: CodeServer/arkanum#57
Co-authored-by: renovate-bot <renovate@ocram85.com>
Co-committed-by: renovate-bot <renovate@ocram85.com>
2023-07-22 16:40:45 +02:00
d18eac86bb fix missing volta command (#58)
All checks were successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/next Pipeline was successful
ci/woodpecker/push/deploy Pipeline was successful
#### 📖 Summary

- reload profil

#### 📑 Test Plan

> 💡 Select your test plan for the code changes.

| Choice | Test Method       |
| :----: | :-----------      |
|      | CI pipeline tests |
|        | Custom test       |
|        | No test plan      |

##### Details / Justification

<!-- Add your test details or justification for missing tests here. -->

#### 📚 Additional Notes

<!-- A place for additional detail notes. -->

Co-authored-by: OCram85 <marco.blessing@googlemail.com>
Reviewed-on: CodeServer/arkanum#58
2023-07-22 16:37:07 +02:00
1ed6a4a7d5 prepare release v0.4.0 (#56)
All checks were successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/next Pipeline was successful
ci/woodpecker/push/deploy Pipeline was successful
ci/woodpecker/tag/test Pipeline was successful
ci/woodpecker/tag/next Pipeline was successful
ci/woodpecker/tag/deploy Pipeline was successful
#### 📖 Summary

- update changelog
- update readme
- update defaut extensions

#### 📑 Test Plan

> 💡 Select your test plan for the code changes.

| Choice | Test Method       |
| :----: | :-----------      |
|      | CI pipeline tests |
|        | Custom test       |
|        | No test plan      |

##### Details / Justification

<!-- Add your test details or justification for missing tests here. -->

#### 📚 Additional Notes

<!-- A place for additional detail notes. -->

Co-authored-by: OCram85 <marco.blessing@googlemail.com>
Reviewed-on: CodeServer/arkanum#56
2023-07-20 09:44:31 +02:00
78c91dceba fix shellcheck issues (#55)
All checks were successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/next Pipeline was successful
ci/woodpecker/push/deploy Pipeline was successful
#### 📖 Summary

- fix shelchek issues in arkanum bash script

#### 📑 Test Plan

> 💡 Select your test plan for the code changes.

| Choice | Test Method       |
| :----: | :-----------      |
|      | CI pipeline tests |
|        | Custom test       |
|        | No test plan      |

##### Details / Justification

<!-- Add your test details or justification for missing tests here. -->

#### 📚 Additional Notes

<!-- A place for additional detail notes. -->

Co-authored-by: OCram85 <marco.blessing@googlemail.com>
Reviewed-on: CodeServer/arkanum#55
2023-07-19 15:53:06 +02:00
6 changed files with 197 additions and 81 deletions

View File

@ -23,14 +23,20 @@ pipeline:
buildTag:
image: woodpeckerci/plugin-docker-buildx
settings:
registry: gitea.ocram85.com
repo: gitea.ocram85.com/codeserver/arkanum
repo: gitea.ocram85.com/codeserver/arkanum,ocram85/arkanum
dockerfile: Dockerfile
auto_tag: true
username:
from_secret: gitea_user
password:
from_secret: gitea_passwd
logins:
- registry: https://gitea.ocram85.com
username:
from_secret: gitea_user
password:
from_secret: gitea_passwd
- registry: https://index.docker.io/v1/
username:
from_secret: docker_user
password:
from_secret: docker_passwd
build_args:
- VERSION=${CI_COMMIT_TAG:-PR ${CI_COMMIT_PULL_REQUEST}}
- TAG=${CI_COMMIT_TAG}

View File

@ -70,3 +70,14 @@
* 🤖 DEPENDENCIES
* Update quay.io/linuxserver.io/code-server Docker tag to v4.14.1 (#47)
## [v0.4.0](https://gitea.ocram85.com/CodeServer/arkanum/releases/tag/v0.4.0) - 2023-07-19
* 🐛 BUGFIXES
* Fix shellcheck issues (#55)
* Disable starship python module (#52)
* ✨ FEATURES
* Add docker-cli (#54)
* Adds Volta as default version manager for NodeJs (#53)
* 🛠️ ENHANCEMENTS
* Bump go version (#49)

View File

@ -1,4 +1,4 @@
FROM quay.io/linuxserver.io/code-server:4.14.1
FROM quay.io/linuxserver.io/code-server:4.16.1
#LABEL build_version=""
LABEL maintainer="OCram85"
@ -40,7 +40,7 @@ RUN \
chmod +x /etc/bash_completion.d/arkanum-completion && \
echo 'source /etc/bash_completion.d/arkanum-completion' >> /etc/bash.bashrc && \
touch "$HOME/enable_motd" && \
echo "if [[ ! -e \"$HOME/data/User/settings.json\" ]]; then arkanum --install-extensions && arkanum --reset-codesetting && \
echo "if [[ ! -e \"$HOME/data/User/settings.json\" ]]; then arkanum config install-extensions && arkanum config reset-codesettings && \
echo -e \"🧙 \\e[32markanum\\e[0m: Please reload Arkanum to finalize the setup...\" && read foo; fi" >> /etc/bash.bashrc && \
echo "if [[ -e \"$HOME/enable_motd\" ]]; then echo -e \"Use 🧙 \\e[32m'arkanum'\\e[0m to install missing runtimes like dotnet or NodeJs.\"; fi" >> /etc/bash.bashrc

View File

@ -55,7 +55,7 @@ Therefore you need
version: "3.8"
services:
arkanum:
image: gitea.ocram85.com/codeserver/arkanum:0.2.0
image: gitea.ocram85.com/codeserver/arkanum:0.4.0
environment:
- PUID=1000
- PGID=1000
@ -77,10 +77,11 @@ services:
volumes:
# store workspace and use config in volume.
- codedata:/config
# mount docker socket to manage host docker
- /var/run/docker.sock:/var/run/docker.sock
# no need to expose the port. traefik acts as reverse proxy and handles the https access.
#ports:
# - 8443:8443
restart: unless-stopped
networks:
- arkanum-sphere
- traefik-public
@ -106,7 +107,7 @@ See their [docs](https://github.com/linuxserver/docker-code-server#parameters) a
version: "3.8"
services:
arkanum:
image: gitea.ocram85.com/codeserver/arkanum:0.2.0
image: gitea.ocram85.com/codeserver/arkanum:0.4.0
container_name: code-server
environment:
- PUID=1000
@ -169,26 +170,39 @@ Added `arkanum` to help installing common runtimes in container.
This helps reducing the image size.
```
🧙 arkanum ✨🌌☄️💥 is used to install optional runtimes for developing in a
🧙 arkanum ✨🌌☄️💥 is used to install optional tools for developing in a
code-server container environment.
Syntax: arkanum RUNTIME ...
RUNTIME [docker-cli|dotnet|gitea|golang|nodejs|volta|powershell]
docker-cli Installs the latest docker-ce cli.
dotnet Installs latest LTS dotnet core sdk + runtime.
gitea Installs gitea tools like the changelog generator.
golang Installs golang 1.19.3.
nodejs Installs latest NodeJs LTS version using Volta.
volta Installs Volta as NodeJs version manager.
powershell Installs latest PowerShell LTS version.
--disable-motd Disables hint in new bash terminal.
--install-extensions Installs predefined recommended extensions.
--reset-codesetting Sets VS Code user setting with basic (Fira Code).
-h Prints this help message.
Syntax: arkanum <flags> COMMAND OPTION ARGUMENT
COMMAND
config The config command is used to modify arkanum itself.
git The git command is a wrapper for git helpers.
install The install command is used to add different tools
help Shows this help text.
Example 1: arkanum dotnet
Example 2: arkanum golang nodejs
Example 3: arkanum --disable-motd
OPTION
config:
disable-motd Disables hint in new bash terminal.
install extensions Installs predefined recommended extensions.
reset-codesettings Sets VS Code user setting with basic (Fira Code).
git:
setup Takes two arguments to setup the git client:
1) Username
2) Email address
install:
docker-cli Installs the latest docker-cli.
dotnet Installs latest LTS dotnet core sdk + runtime.
gitea Installs gitea tools like the changelog generator.
golang Installs golang 1.19.3.
nodejs Installs latest NodeJs LTS version using Volta.
volta Installs Volta as NodeJS version manager.
powershell Installs latest PowerShell LTS version.
Example 1: arkanum git setup "my-name" "my-email"
Example 2: arkanum install golang
Example 3: arkanum config disable-motd
```
### 📝 Fira Code (NerdFont patched)

151
arkanum
View File

@ -4,26 +4,39 @@ set -e
function showHelp() {
cat << HELP
🧙 arkanum ✨🌌☄️💥 is used to install optional runtimes for developing in a
🧙 arkanum ✨🌌☄️💥 is used to install optional tools for developing in a
code-server container environment.
Syntax: arkanum RUNTIME ...
RUNTIME [docker-cli|dotnet|gitea|golang|nodejs|volta|powershell]
docker-cli Installs the latest docker-cli.
dotnet Installs latest LTS dotnet core sdk + runtime.
gitea Installs gitea tools like the changelog generator.
golang Installs golang 1.19.3.
nodejs Installs latest NodeJs LTS version using Volta.
volta Installs Volta as NodeJS version manager.
powershell Installs latest PowerShell LTS version.
--disable-motd Disables hint in new bash terminal.
--install-extensions Installs predefined recommended extensions.
--reset-codesetting Sets VS Code user setting with basic (Fira Code).
-h Prints this help message.
Syntax: arkanum <flags> COMMAND OPTION ARGUMENT
COMMAND
config The config command is used to modify arkanum itself.
git The git command is a wrapper for git helpers.
install The install command is used to add different tools
help Shows this help text.
Example 1: arkanum dotnet
Example 2: arkanum golang nodejs
Example 3: arkanum --disable-motd
OPTION
config:
disable-motd Disables hint in new bash terminal.
install extensions Installs predefined recommended extensions.
reset-codesettings Sets VS Code user setting with basic (Fira Code).
git:
setup Takes two arguments to setup the git client:
1) Username
2) Email address
install:
docker-cli Installs the latest docker-cli.
dotnet Installs latest LTS dotnet core sdk + runtime.
gitea Installs gitea tools like the changelog generator.
golang Installs golang 1.19.3.
nodejs Installs latest NodeJs LTS version using Volta.
volta Installs Volta as NodeJS version manager.
powershell Installs latest PowerShell LTS version.
Example 1: arkanum git setup "my-name" "my-email"
Example 2: arkanum install golang
Example 3: arkanum config disable-motd
HELP
}
@ -31,6 +44,8 @@ function disableMotd() {
if [[ -e "$HOME/enable_motd" ]]; then
say "Disabling 'arkanum' motd..." "disableMotd"
rm -f "$HOME/enable_motd"
else
sayW "Arkanum Motd already disabled" "disableMotd"
fi
}
@ -67,6 +82,7 @@ function instDockerCLI() {
sudo -E install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo -E gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo -E chmod a+r /etc/apt/keyrings/docker.gpg
# shellcheck disable=SC2046,SC2027
echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
@ -90,6 +106,7 @@ function instDotNet() {
say "Installing latest .NET Core LTS release..." "dotnet"
/tmp/dotnet-install.sh --channel LTS
# shellcheck disable=SC2016
echo 'export PATH=$PATH:/config/.dotnet' | sudo tee -a /etc/bash.bashrc > /dev/null
say "Cleaning up..." "dotnet"
@ -113,6 +130,7 @@ function instGoLang() {
say "Installing golang ($GOVERSION)...." "GoLang"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf /tmp/golang.tar.gz
# shellcheck disable=SC2016
echo 'export PATH=$PATH:/usr/local/go/bin' | sudo tee -a /etc/bash.bashrc > /dev/null
say "Cleaning up..." "GoLang"
rm -f /tmp/golang.tar.gz
@ -146,11 +164,14 @@ function instNodeJS2() {
function instVolta() {
say "Installing Volta as NodeJS version manager..." "Volta"
curl -#fSl https://get.volta.sh | bash
# shellcheck disable=SC1090
source ~/.profile
say "done." "Volta"
}
function instPwsh() {
say "Installing PowerShell requirements..." "PowerShell"
sudo -E apt-get update > /dev/null
sudo -E apt-get install --no-install-recommends -y \
apt-transport-https \
software-properties-common
@ -192,7 +213,7 @@ function instCodeExtension() {
say "Downloading required extensions...." "Extension"
# Gitlens
say "Downloading 'gitlens'..." "Extension"
curl -#fSL https://open-vsx.org/api/eamodio/gitlens/13.1.1/file/eamodio.gitlens-13.1.1.vsix -o /tmp/eamodio.gitlens-13.1.1.vsix
curl -#fSL https://open-vsx.org/api/eamodio/gitlens/14.0.1/file/eamodio.gitlens-14.0.1.vsix -o /tmp/eamodio.gitlens-13.1.1.vsix
say "Installing 'gitlens'..." "Extension"
install-extension /tmp/eamodio.gitlens-13.1.1.vsix
say "Cleaning up 'gitlens' install files" "Extension"
@ -200,7 +221,7 @@ function instCodeExtension() {
# OneDarkPro
say "Downloading 'One Dark Pro' theme..." "Extension"
curl -#fSL https://open-vsx.org/api/zhuangtongfa/material-theme/3.15.6/file/zhuangtongfa.material-theme-3.15.6.vsix -o /tmp/zhuangtongfa.material-theme-3.15.6.vsix
curl -#fSL https://open-vsx.org/api/zhuangtongfa/material-theme/3.15.18/file/zhuangtongfa.material-theme-3.15.18.vsix -o /tmp/zhuangtongfa.material-theme-3.15.6.vsix
say "Installing 'One Dark Pro' theme..." "Extension"
install-extension /tmp/zhuangtongfa.material-theme-3.15.6.vsix
say "Cleaning up 'One Dark Pro' install files" "Extension"
@ -208,7 +229,7 @@ function instCodeExtension() {
# vscode-icons
say "Downloading 'vscode-icons' theme..." "Extension"
curl -#fSL https://open-vsx.org/api/vscode-icons-team/vscode-icons/12.0.1/file/vscode-icons-team.vscode-icons-12.0.1.vsix -o /tmp/vscode-icons-team.vscode-icons-12.0.1.vsix
curl -#fSL https://open-vsx.org/api/vscode-icons-team/vscode-icons/12.4.0/file/vscode-icons-team.vscode-icons-12.4.0.vsix -o /tmp/vscode-icons-team.vscode-icons-12.0.1.vsix
say "Installing 'vscode-icons' theme..." "Extension"
install-extension /tmp/vscode-icons-team.vscode-icons-12.0.1.vsix
say "Cleaning up 'vscode-icons' install files" "Extension"
@ -238,51 +259,79 @@ EOF
say "done." "VSCode"
}
function setGitConfig() {
if [[ "$#" != "2" ]]; then
sayE "Invalid arguments given. Please provide '<user>' and 'email'!" "Git"
exit 1
fi
say "Setting global git config..." "Git"
git config --global user.name "$1"
git config --global user.email "$2"
say "Returning global config:" "Git"
git config --list --global
}
function main() {
if [[ "$#" == "0" ]]; then
showHelp
exit 0
fi
for i in $@; do
if [[ "$1" == "-h" ]]; then
showHelp
exit 0
elif [[ "$i" == "docker-cli" ]]; then
instDockerCLI
elif [[ "$i" == "dotnet" ]]; then
instDotNet
elif [[ "$i" == "golang" ]]; then
instGoLang
elif [[ "$i" == "nodejs" ]]; then
if [[ "$2" == "--legacy" ]]; then
sayW "Installing NodeJS with legacy function" "Arkanum"
instNodeJs
else
instVolta
instNodeJS2
fi
elif [[ "$i" == "volta" ]]; then
instVolta
elif [[ "$i" == "powershell" ]]; then
instPwsh
elif [[ "$i" == "gitea" ]]; then
instGiteaTools
elif [[ "$i" == "--disable-motd" ]]; then
# Command filter
if [[ "$1" =~ ^help|-h|--h$ ]]; then
showHelp
exit 0
fi
# CONFIG command
if [[ "$1" == "config" ]]; then
# disable-motd option
if [[ "$2" == "disable-motd" ]]; then
disableMotd
exit 0
elif [[ "$i" == "--install-extensions" ]]; then
# install-extensions option
elif [[ "$2" == "install-extensions" ]]; then
instCodeExtension
exit 0
elif [[ "$i" == "--reset-codesetting" ]]; then
# reset-codesetting option
elif [[ "$2" == "reset-codesettings" ]]; then
setCodeSettings
exit 0
else
sayE "Unknown parameter value given!($i)."
sayE "Unknown option ($2) given for command 'config'!"
fi
# GIT command
elif [[ "$1" == "git" ]]; then
# setup option
if [[ "$2" == "setup" ]]; then
setGitConfig "$3" "$4"
else
sayE "Unknown option ($2) given for command 'git'!"
fi
# INSTALL command
elif [[ "$1" == "install" ]]; then
# docker-cli option
if [[ "$2" == "docker-cli" ]]; then
instDockerCLI
elif [[ "$2" == "dotnet" ]]; then
instDotNet
elif [[ "$2" == "golang" ]]; then
instGoLang "$3"
elif [[ "$2" == "nodejs" ]]; then
instVolta
instNodeJs
elif [[ "$2" == "volta" ]]; then
instVolta
elif [[ "$2" == "powershell" ]]; then
instPwsh
elif [[ "$2" == "gitea" ]]; then
instGiteaTools
fi
else
sayE "Unknown parameter value given!($1)."
showHelp
exit 1
fi
done
fi
}
main $@
main "$@"

View File

@ -1,3 +1,39 @@
#!/bin/bash
#!/bin/env bash
complete -W "--disable-motd --install-extensions --reset-codesetting docker-cli dotnet gitea golang nodejs volta powershell -h" arkanum
#complete -W "--disable-motd --install-extensions --reset-codesetting docker-cli dotnet gitea golang nodejs volta powershell -h" arkanum
function _command_completions() {
local cur prev
cur=${COMP_WORDS[COMP_CWORD]}
prev=${COMP_WORDS[COMP_CWORD-1]}
case ${COMP_CWORD} in
1)
# shellcheck disable=2207,SC2086
COMPREPLY=($(compgen -W "config git install help" -- ${cur}))
;;
2)
case ${prev} in
config)
# shellcheck disable=2207,SC2086
COMPREPLY=($(compgen -W "disable-motd install-extensions reset-codesettings" -- ${cur}))
;;
git)
# shellcheck disable=2207,SC2086
COMPREPLY=($(compgen -W "setup" -- ${cur}))
;;
install)
# shellcheck disable=2207,SC2086
COMPREPLY=($(compgen -W "docker-cli dotnet golang nodejs volta powershell gitea" -- ${cur}))
;;
help)
;;
esac
;;
*)
COMPREPLY=()
;;
esac
}
complete -F _command_completions arkanum