mirror of
https://github.com/linuxserver/docker-kasm.git
synced 2026-03-09 00:09:44 +08:00
Compare commits
278 Commits
master
...
develop-1.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7e7134f286 | ||
|
|
f7b04a3271 | ||
|
|
811664e570 | ||
|
|
8ad2d6b856 | ||
|
|
0ad72cba9a | ||
|
|
b568561059 | ||
|
|
5e4eb12845 | ||
|
|
294e210822 | ||
|
|
9571e6d1c0 | ||
|
|
12d7e636ab | ||
|
|
d239e1c872 | ||
|
|
4a333fad5d | ||
|
|
44ea47d8d9 | ||
|
|
6fa36c9f06 | ||
|
|
9ed2ca4c25 | ||
|
|
eb00aded51 | ||
|
|
cdafc0a785 | ||
|
|
c7504da9a6 | ||
|
|
5bb49a1762 | ||
|
|
a254195692 | ||
|
|
090fbc05ec | ||
|
|
a5d67a05f5 | ||
|
|
261e95636d | ||
|
|
f37feb3ffd | ||
|
|
129f437aff | ||
|
|
41fd7c2319 | ||
|
|
aacdddd527 | ||
|
|
0d4cc7a926 | ||
|
|
6493c641f0 | ||
|
|
15fbd99ed9 | ||
|
|
7cd24c8c51 | ||
|
|
9afce09b1f | ||
|
|
4bc46a7d8c | ||
|
|
33cad90ee7 | ||
|
|
d118fd922c | ||
|
|
6c7e9cf7f2 | ||
|
|
f96a50b2e8 | ||
|
|
1932a6bfc2 | ||
|
|
156dab2729 | ||
|
|
eeee9de950 | ||
|
|
462c8250c9 | ||
|
|
61b647d587 | ||
|
|
bd2cb954ea | ||
|
|
004ad84efa | ||
|
|
b334e6c823 | ||
|
|
79c1d306a5 | ||
|
|
20d4962bd1 | ||
|
|
3ebfac4665 | ||
|
|
82dcd24d8d | ||
|
|
e615ac72b9 | ||
|
|
370ea1b07a | ||
|
|
5029c07086 | ||
|
|
1e0ec4e6bd | ||
|
|
cd2e670d69 | ||
|
|
5abeff2c52 | ||
|
|
c22fe34cc1 | ||
|
|
705f6730de | ||
|
|
9e885b0a00 | ||
|
|
e7ee46e478 | ||
|
|
f031f49f0e | ||
|
|
1e8cf35844 | ||
|
|
1a21b350a3 | ||
|
|
b7f7714a43 | ||
|
|
e513afa4b5 | ||
|
|
9df6fe7944 | ||
|
|
f682b6fb00 | ||
|
|
5dcbb2fba5 | ||
|
|
e30a66d14d | ||
|
|
2c8799abab | ||
|
|
beb78a348d | ||
|
|
6bc959dede | ||
|
|
25c6e79946 | ||
|
|
acc650759c | ||
|
|
90b9e3c5c3 | ||
|
|
2e4601bd45 | ||
|
|
ee3ea10c5a | ||
|
|
f3bf3e1381 | ||
|
|
168dc3fcae | ||
|
|
c511a69bf8 | ||
|
|
27af739a1b | ||
|
|
0b63895275 | ||
|
|
cb5e17fb77 | ||
|
|
3540cc64b2 | ||
|
|
20ed720e74 | ||
|
|
c4194a3884 | ||
|
|
3851d3aebd | ||
|
|
dca450b071 | ||
|
|
c9dda32e96 | ||
|
|
912d7a5710 | ||
|
|
082f8c2da0 | ||
|
|
0c67272bd6 | ||
|
|
9b8c58fcfc | ||
|
|
d1f483218d | ||
|
|
a65b5b6943 | ||
|
|
2a1c5efbcb | ||
|
|
254511dbd6 | ||
|
|
1f51fa3c09 | ||
|
|
db0ccd4e7c | ||
|
|
484728d979 | ||
|
|
3131409615 | ||
|
|
34b5fe4d05 | ||
|
|
3bd094ce70 | ||
|
|
df218bff43 | ||
|
|
36e41a3bab | ||
|
|
53743f7905 | ||
|
|
2499293c5d | ||
|
|
da69081208 | ||
|
|
10c47f84dc | ||
|
|
c43ce9541b | ||
|
|
ec5c1aeddc | ||
|
|
f7f03998ed | ||
|
|
b354a5f890 | ||
|
|
23b3ef6e73 | ||
|
|
8520bf2465 | ||
|
|
c850e3cc32 | ||
|
|
6e9799cfd2 | ||
|
|
25ca678db7 | ||
|
|
4647fa9d02 | ||
|
|
4a35602f13 | ||
|
|
8acd73f9cb | ||
|
|
a35af113fd | ||
|
|
077cad133c | ||
|
|
b1c895b1a4 | ||
|
|
553bf88fe6 | ||
|
|
5edcd6bac9 | ||
|
|
df4d448c9c | ||
|
|
ca8ec53e2e | ||
|
|
785378c623 | ||
|
|
10c7477b19 | ||
|
|
83ac21c8ae | ||
|
|
2a8af5d442 | ||
|
|
46c6dc2404 | ||
|
|
67b0dfd7f7 | ||
|
|
ca9e45c970 | ||
|
|
fb4e0345bf | ||
|
|
3ec798b128 | ||
|
|
49c346cdb2 | ||
|
|
262f2424c0 | ||
|
|
5fd8a5c4b0 | ||
|
|
611cd3bb55 | ||
|
|
4ca6bb4497 | ||
|
|
20a216220c | ||
|
|
84bb44665f | ||
|
|
33a6592ce3 | ||
|
|
c5d0ee973e | ||
|
|
468bcb5122 | ||
|
|
20542ccf48 | ||
|
|
53109f2b69 | ||
|
|
92ea47518d | ||
|
|
1dcb34824e | ||
|
|
a8c4049a23 | ||
|
|
1d8dceb178 | ||
|
|
ed926ad452 | ||
|
|
f531e06c2e | ||
|
|
d25562908e | ||
|
|
e8e24fa729 | ||
|
|
396469d902 | ||
|
|
1c2202f1fb | ||
|
|
4196db56fc | ||
|
|
2424c63c14 | ||
|
|
b4445413e2 | ||
|
|
62b6fb51dd | ||
|
|
07871deb1c | ||
|
|
9ce2952d49 | ||
|
|
4a5040f809 | ||
|
|
6bc476072e | ||
|
|
c2c7f6591d | ||
|
|
6a1f8e6de9 | ||
|
|
a6b1daa57d | ||
|
|
9eb3bddae1 | ||
|
|
bcedd8248f | ||
|
|
6d297d4949 | ||
|
|
fe2d85a3fd | ||
|
|
3e7828e6cf | ||
|
|
78049a078a | ||
|
|
61349ae648 | ||
|
|
c369ccfe86 | ||
|
|
1fde8e17a7 | ||
|
|
3bf0387a5f | ||
|
|
305dfa9b0b | ||
|
|
af6ef6e702 | ||
|
|
d107f1352b | ||
|
|
f0400f854c | ||
|
|
151a8cb05a | ||
|
|
86f38a3829 | ||
|
|
b7d0d13e5b | ||
|
|
8cee0bc20e | ||
|
|
3c4932fb3a | ||
|
|
6a14e66d0d | ||
|
|
28588a7e25 | ||
|
|
4680f126e7 | ||
|
|
72bcbd06f1 | ||
|
|
b8200da76d | ||
|
|
1589c35808 | ||
|
|
05c031dd17 | ||
|
|
4d5f4ae498 | ||
|
|
b15bea0ad9 | ||
|
|
922316d5c4 | ||
|
|
3384a04f77 | ||
|
|
a9947f55da | ||
|
|
e2bd297a87 | ||
|
|
3b769215db | ||
|
|
c4e595d3a6 | ||
|
|
7d33418989 | ||
|
|
2be26a11fb | ||
|
|
be40e569df | ||
|
|
cb5cd9bc54 | ||
|
|
1e00482b8b | ||
|
|
81bc32b95e | ||
|
|
5de237b0d0 | ||
|
|
91d1f7d868 | ||
|
|
2ac8c9ad58 | ||
|
|
c4f0e29aae | ||
|
|
b706c75bba | ||
|
|
8b217bec10 | ||
|
|
20a5558c1c | ||
|
|
93abaa69d0 | ||
|
|
528827e82c | ||
|
|
8773ba31ca | ||
|
|
322404ceb8 | ||
|
|
6d193ec70e | ||
|
|
413f539d47 | ||
|
|
5e0af0fe14 | ||
|
|
bb78bc724e | ||
|
|
298851db8b | ||
|
|
7e1c5c6a9d | ||
|
|
3fde5c812a | ||
|
|
0a8d47bb5e | ||
|
|
96deeebaab | ||
|
|
9ebd2e1ef5 | ||
|
|
cc152c39c9 | ||
|
|
7c9d9bcaba | ||
|
|
3e9acb1ae0 | ||
|
|
1133cbc516 | ||
|
|
62a4b95cc4 | ||
|
|
9a7cace9ac | ||
|
|
5715ae0f65 | ||
|
|
efd36861bf | ||
|
|
2a4243a6d6 | ||
|
|
13a2acb91f | ||
|
|
1a5fcda940 | ||
|
|
85e0bcb212 | ||
|
|
a437f24d21 | ||
|
|
95981a48ae | ||
|
|
9d746de3a6 | ||
|
|
d40847b328 | ||
|
|
1946bbb92f | ||
|
|
dcd3651ebf | ||
|
|
deced70ed6 | ||
|
|
04db9aed9f | ||
|
|
ae19bc06f4 | ||
|
|
7469071033 | ||
|
|
bbd0416112 | ||
|
|
0ea51e8255 | ||
|
|
d275d03f20 | ||
|
|
76eb94fb82 | ||
|
|
f7d100fdef | ||
|
|
340928388c | ||
|
|
1081009607 | ||
|
|
c64c9792e5 | ||
|
|
1bba57eba0 | ||
|
|
b6c2f7e645 | ||
|
|
5abf50c4f0 | ||
|
|
dee8e47d0e | ||
|
|
404cd56274 | ||
|
|
7738942a83 | ||
|
|
141cee8f80 | ||
|
|
736d85c718 | ||
|
|
355e9f2050 | ||
|
|
a3ecfd8044 | ||
|
|
e06c72f169 | ||
|
|
4f9a2a5d36 | ||
|
|
13ea576437 | ||
|
|
e815ad79d5 | ||
|
|
c3034be8d0 | ||
|
|
4801d37e72 | ||
|
|
ba86be3cca | ||
|
|
3c52c48a59 |
12
.github/CONTRIBUTING.md
vendored
12
.github/CONTRIBUTING.md
vendored
@ -6,7 +6,7 @@
|
|||||||
* Read, and fill the Pull Request template
|
* Read, and fill the Pull Request template
|
||||||
* If this is a fix for a typo (in code, documentation, or the README) please file an issue and let us sort it out. We do not need a PR
|
* If this is a fix for a typo (in code, documentation, or the README) please file an issue and let us sort it out. We do not need a PR
|
||||||
* If the PR is addressing an existing issue include, closes #\<issue number>, in the body of the PR commit message
|
* If the PR is addressing an existing issue include, closes #\<issue number>, in the body of the PR commit message
|
||||||
* If you want to discuss changes, you can also bring it up in [#dev-talk](https://discordapp.com/channels/354974912613449730/757585807061155840) in our [Discord server](https://linuxserver.io/discord)
|
* If you want to discuss changes, you can also bring it up in [#dev-talk](https://discordapp.com/channels/354974912613449730/757585807061155840) in our [Discord server](https://discord.gg/YWrKVTn)
|
||||||
|
|
||||||
## Common files
|
## Common files
|
||||||
|
|
||||||
@ -24,10 +24,10 @@
|
|||||||
## Readme
|
## Readme
|
||||||
|
|
||||||
If you would like to change our readme, please __**do not**__ directly edit the readme, as it is auto-generated on each commit.
|
If you would like to change our readme, please __**do not**__ directly edit the readme, as it is auto-generated on each commit.
|
||||||
Instead edit the [readme-vars.yml](https://github.com/linuxserver/docker-kasm/edit/master/readme-vars.yml).
|
Instead edit the [readme-vars.yml](https://github.com/linuxserver/docker-kasm/edit/develop/readme-vars.yml).
|
||||||
|
|
||||||
These variables are used in a template for our [Jenkins Builder](https://github.com/linuxserver/docker-jenkins-builder) as part of an ansible play.
|
These variables are used in a template for our [Jenkins Builder](https://github.com/linuxserver/docker-jenkins-builder) as part of an ansible play.
|
||||||
Most of these variables are also carried over to [docs.linuxserver.io](https://docs.linuxserver.io/images/docker-kasm)
|
Most of these variables are also carried over to [docs.linuxserver.io](https://docs.linuxserver.io)
|
||||||
|
|
||||||
### Fixing typos or clarify the text in the readme
|
### Fixing typos or clarify the text in the readme
|
||||||
|
|
||||||
@ -105,17 +105,17 @@ docker build \
|
|||||||
-t linuxserver/kasm:latest .
|
-t linuxserver/kasm:latest .
|
||||||
```
|
```
|
||||||
|
|
||||||
The ARM variants can be built on x86_64 hardware and vice versa using `lscr.io/linuxserver/qemu-static`
|
The ARM variants can be built on x86_64 hardware using `multiarch/qemu-user-static`
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run --rm --privileged lscr.io/linuxserver/qemu-static --reset
|
docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
||||||
```
|
```
|
||||||
|
|
||||||
Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64`.
|
Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64`.
|
||||||
|
|
||||||
## Update the changelog
|
## Update the changelog
|
||||||
|
|
||||||
If you are modifying the Dockerfiles or any of the startup scripts in [root](https://github.com/linuxserver/docker-kasm/tree/master/root), add an entry to the changelog
|
If you are modifying the Dockerfiles or any of the startup scripts in [root](https://github.com/linuxserver/docker-kasm/tree/develop/root), add an entry to the changelog
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
changelogs:
|
changelogs:
|
||||||
|
|||||||
4
.github/ISSUE_TEMPLATE/config.yml
vendored
4
.github/ISSUE_TEMPLATE/config.yml
vendored
@ -1,7 +1,7 @@
|
|||||||
blank_issues_enabled: false
|
blank_issues_enabled: false
|
||||||
contact_links:
|
contact_links:
|
||||||
- name: Discord chat support
|
- name: Discord chat support
|
||||||
url: https://linuxserver.io/discord
|
url: https://discord.gg/YWrKVTn
|
||||||
about: Realtime support / chat with the community and the team.
|
about: Realtime support / chat with the community and the team.
|
||||||
|
|
||||||
- name: Discourse discussion forum
|
- name: Discourse discussion forum
|
||||||
@ -9,5 +9,5 @@ contact_links:
|
|||||||
about: Post on our community forum.
|
about: Post on our community forum.
|
||||||
|
|
||||||
- name: Documentation
|
- name: Documentation
|
||||||
url: https://docs.linuxserver.io/images/docker-kasm
|
url: https://docs.linuxserver.io
|
||||||
about: Documentation - information about all of our containers.
|
about: Documentation - information about all of our containers.
|
||||||
|
|||||||
8
.github/ISSUE_TEMPLATE/issue.bug.yml
vendored
Normal file → Executable file
8
.github/ISSUE_TEMPLATE/issue.bug.yml
vendored
Normal file → Executable file
@ -47,14 +47,6 @@ body:
|
|||||||
render: markdown
|
render: markdown
|
||||||
validations:
|
validations:
|
||||||
required: false
|
required: false
|
||||||
- type: dropdown
|
|
||||||
attributes:
|
|
||||||
label: CPU architecture
|
|
||||||
options:
|
|
||||||
- x86-64
|
|
||||||
- arm64
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
label: Docker creation
|
label: Docker creation
|
||||||
|
|||||||
0
.github/ISSUE_TEMPLATE/issue.feature.yml
vendored
Normal file → Executable file
0
.github/ISSUE_TEMPLATE/issue.feature.yml
vendored
Normal file → Executable file
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|
||||||
- [ ] I have read the [contributing](https://github.com/linuxserver/docker-kasm/blob/master/.github/CONTRIBUTING.md) guideline and understand that I have made the correct modifications
|
- [ ] I have read the [contributing](https://github.com/linuxserver/docker-kasm/blob/develop/.github/CONTRIBUTING.md) guideline and understand that I have made the correct modifications
|
||||||
|
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|
||||||
|
|||||||
3
.github/workflows/call_issue_pr_tracker.yml
vendored
Normal file → Executable file
3
.github/workflows/call_issue_pr_tracker.yml
vendored
Normal file → Executable file
@ -8,9 +8,6 @@ on:
|
|||||||
pull_request_review:
|
pull_request_review:
|
||||||
types: [submitted,edited,dismissed]
|
types: [submitted,edited,dismissed]
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
manage-project:
|
manage-project:
|
||||||
permissions:
|
permissions:
|
||||||
|
|||||||
3
.github/workflows/call_issues_cron.yml
vendored
Normal file → Executable file
3
.github/workflows/call_issues_cron.yml
vendored
Normal file → Executable file
@ -4,9 +4,6 @@ on:
|
|||||||
- cron: '16 9 * * *'
|
- cron: '16 9 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
stale:
|
stale:
|
||||||
permissions:
|
permissions:
|
||||||
|
|||||||
86
.github/workflows/external_trigger.yml
vendored
86
.github/workflows/external_trigger.yml
vendored
@ -3,86 +3,56 @@ name: External Trigger Main
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
external-trigger-master:
|
external-trigger-develop:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4.1.1
|
- uses: actions/checkout@v4.1.1
|
||||||
|
|
||||||
- name: External Trigger
|
- name: External Trigger
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/develop'
|
||||||
env:
|
env:
|
||||||
SKIP_EXTERNAL_TRIGGER: ${{ vars.SKIP_EXTERNAL_TRIGGER }}
|
SKIP_EXTERNAL_TRIGGER: ${{ vars.SKIP_EXTERNAL_TRIGGER }}
|
||||||
run: |
|
run: |
|
||||||
printf "# External trigger for docker-kasm\n\n" >> $GITHUB_STEP_SUMMARY
|
printf "# External trigger for docker-kasm\n\n" >> $GITHUB_STEP_SUMMARY
|
||||||
if grep -q "^kasm_master_" <<< "${SKIP_EXTERNAL_TRIGGER}"; then
|
if grep -q "^kasm_develop" <<< "${SKIP_EXTERNAL_TRIGGER}"; then
|
||||||
echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY
|
|
||||||
echo "> Github organizational variable \`SKIP_EXTERNAL_TRIGGER\` contains \`kasm_master_\`; will skip trigger if version matches." >> $GITHUB_STEP_SUMMARY
|
|
||||||
elif grep -q "^kasm_master" <<< "${SKIP_EXTERNAL_TRIGGER}"; then
|
|
||||||
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "> Github organizational variable \`SKIP_EXTERNAL_TRIGGER\` contains \`kasm_master\`; skipping trigger." >> $GITHUB_STEP_SUMMARY
|
echo "> Github organizational variable \`SKIP_EXTERNAL_TRIGGER\` contains \`kasm_develop\`; skipping trigger." >> $GITHUB_STEP_SUMMARY
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY
|
echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "> External trigger running off of master branch. To disable this trigger, add \`kasm_master\` into the Github organizational variable \`SKIP_EXTERNAL_TRIGGER\`." >> $GITHUB_STEP_SUMMARY
|
echo "> External trigger running off of develop branch. To disable this trigger, add \`kasm_develop\` into the Github organizational variable \`SKIP_EXTERNAL_TRIGGER\`." >> $GITHUB_STEP_SUMMARY
|
||||||
printf "\n## Retrieving external version\n\n" >> $GITHUB_STEP_SUMMARY
|
printf "\n## Retrieving external version\n\n" >> $GITHUB_STEP_SUMMARY
|
||||||
EXT_RELEASE=$(curl -u "${{ secrets.CR_USER }}:${{ secrets.CR_PAT }}" -sX GET "https://api.github.com/repos/kasmtech/kasm-install-wizard/releases/latest" | jq -r '. | .tag_name')
|
EXT_RELEASE=$(curl -sX GET https://kasm-ci.s3.amazonaws.com/dev-version.txt)
|
||||||
echo "Type is \`github_stable\`" >> $GITHUB_STEP_SUMMARY
|
echo "Type is \`custom_version_command\`" >> $GITHUB_STEP_SUMMARY
|
||||||
if grep -q "^kasm_master_${EXT_RELEASE}" <<< "${SKIP_EXTERNAL_TRIGGER}"; then
|
|
||||||
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
|
||||||
echo "> Github organizational variable \`SKIP_EXTERNAL_TRIGGER\` matches current external release; skipping trigger." >> $GITHUB_STEP_SUMMARY
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
|
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
|
||||||
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "> Can't retrieve external version, exiting" >> $GITHUB_STEP_SUMMARY
|
echo "> Can't retrieve external version, exiting" >> $GITHUB_STEP_SUMMARY
|
||||||
FAILURE_REASON="Can't retrieve external version for kasm branch master"
|
FAILURE_REASON="Can't retrieve external version for kasm branch develop"
|
||||||
GHA_TRIGGER_URL="https://github.com/linuxserver/docker-kasm/actions/runs/${{ github.run_id }}"
|
GHA_TRIGGER_URL="https://github.com/linuxserver/docker-kasm/actions/runs/${{ github.run_id }}"
|
||||||
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 16711680,
|
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 16711680,
|
||||||
"description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n**Trigger URL:** '"${GHA_TRIGGER_URL}"' \n"}],
|
"description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n**Trigger URL:** '"${GHA_TRIGGER_URL}"' \n"}],
|
||||||
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
|
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
EXT_RELEASE_SANITIZED=$(echo ${EXT_RELEASE} | sed 's/[~,%@+;:/]//g')
|
EXT_RELEASE=$(echo ${EXT_RELEASE} | sed 's/[~,%@+;:/]//g')
|
||||||
echo "Sanitized external version: \`${EXT_RELEASE_SANITIZED}\`" >> $GITHUB_STEP_SUMMARY
|
echo "External version: \`${EXT_RELEASE}\`" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "Retrieving last pushed version" >> $GITHUB_STEP_SUMMARY
|
echo "Retrieving last pushed version" >> $GITHUB_STEP_SUMMARY
|
||||||
image="linuxserver/kasm"
|
image="linuxserver/kasm"
|
||||||
tag="latest"
|
tag="develop"
|
||||||
token=$(curl -sX GET \
|
token=$(curl -sX GET \
|
||||||
"https://ghcr.io/token?scope=repository%3Alinuxserver%2Fkasm%3Apull" \
|
"https://ghcr.io/token?scope=repository%3Alinuxserver%2Fkasm%3Apull" \
|
||||||
| jq -r '.token')
|
| jq -r '.token')
|
||||||
multidigest=$(curl -s \
|
multidigest=$(curl -s \
|
||||||
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
|
|
||||||
--header "Accept: application/vnd.oci.image.index.v1+json" \
|
|
||||||
--header "Authorization: Bearer ${token}" \
|
|
||||||
"https://ghcr.io/v2/${image}/manifests/${tag}")
|
|
||||||
if jq -e '.layers // empty' <<< "${multidigest}" >/dev/null 2>&1; then
|
|
||||||
# If there's a layer element it's a single-arch manifest so just get that digest
|
|
||||||
digest=$(jq -r '.config.digest' <<< "${multidigest}")
|
|
||||||
else
|
|
||||||
# Otherwise it's multi-arch or has manifest annotations
|
|
||||||
if jq -e '.manifests[]?.annotations // empty' <<< "${multidigest}" >/dev/null 2>&1; then
|
|
||||||
# Check for manifest annotations and delete if found
|
|
||||||
multidigest=$(jq 'del(.manifests[] | select(.annotations))' <<< "${multidigest}")
|
|
||||||
fi
|
|
||||||
if [[ $(jq '.manifests | length' <<< "${multidigest}") -gt 1 ]]; then
|
|
||||||
# If there's still more than one digest, it's multi-arch
|
|
||||||
multidigest=$(jq -r ".manifests[] | select(.platform.architecture == \"amd64\").digest?" <<< "${multidigest}")
|
|
||||||
else
|
|
||||||
# Otherwise it's single arch
|
|
||||||
multidigest=$(jq -r ".manifests[].digest?" <<< "${multidigest}")
|
|
||||||
fi
|
|
||||||
if digest=$(curl -s \
|
|
||||||
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
|
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
|
||||||
--header "Accept: application/vnd.oci.image.manifest.v1+json" \
|
|
||||||
--header "Authorization: Bearer ${token}" \
|
--header "Authorization: Bearer ${token}" \
|
||||||
"https://ghcr.io/v2/${image}/manifests/${multidigest}"); then
|
"https://ghcr.io/v2/${image}/manifests/${tag}" \
|
||||||
digest=$(jq -r '.config.digest' <<< "${digest}");
|
| jq -r 'first(.manifests[].digest)')
|
||||||
fi
|
digest=$(curl -s \
|
||||||
fi
|
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
|
||||||
|
--header "Authorization: Bearer ${token}" \
|
||||||
|
"https://ghcr.io/v2/${image}/manifests/${multidigest}" \
|
||||||
|
| jq -r '.config.digest')
|
||||||
image_info=$(curl -sL \
|
image_info=$(curl -sL \
|
||||||
--header "Authorization: Bearer ${token}" \
|
--header "Authorization: Bearer ${token}" \
|
||||||
"https://ghcr.io/v2/${image}/blobs/${digest}")
|
"https://ghcr.io/v2/${image}/blobs/${digest}")
|
||||||
@ -96,35 +66,35 @@ jobs:
|
|||||||
if [ -z "${IMAGE_VERSION}" ]; then
|
if [ -z "${IMAGE_VERSION}" ]; then
|
||||||
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "Can't retrieve last pushed version, exiting" >> $GITHUB_STEP_SUMMARY
|
echo "Can't retrieve last pushed version, exiting" >> $GITHUB_STEP_SUMMARY
|
||||||
FAILURE_REASON="Can't retrieve last pushed version for kasm tag latest"
|
FAILURE_REASON="Can't retrieve last pushed version for kasm tag develop"
|
||||||
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 16711680,
|
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 16711680,
|
||||||
"description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n"}],
|
"description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n"}],
|
||||||
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
|
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "Last pushed version: \`${IMAGE_VERSION}\`" >> $GITHUB_STEP_SUMMARY
|
echo "Last pushed version: \`${IMAGE_VERSION}\`" >> $GITHUB_STEP_SUMMARY
|
||||||
if [ "${EXT_RELEASE_SANITIZED}" == "${IMAGE_VERSION}" ]; then
|
if [ "${EXT_RELEASE}" == "${IMAGE_VERSION}" ]; then
|
||||||
echo "Sanitized version \`${EXT_RELEASE_SANITIZED}\` already pushed, exiting" >> $GITHUB_STEP_SUMMARY
|
echo "Version \`${EXT_RELEASE}\` already pushed, exiting" >> $GITHUB_STEP_SUMMARY
|
||||||
exit 0
|
exit 0
|
||||||
elif [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-kasm/job/master/lastBuild/api/json | jq -r '.building') == "true" ]; then
|
elif [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-kasm/job/develop/lastBuild/api/json | jq -r '.building') == "true" ]; then
|
||||||
echo "New version \`${EXT_RELEASE}\` found; but there already seems to be an active build on Jenkins; exiting" >> $GITHUB_STEP_SUMMARY
|
echo "New version \`${EXT_RELEASE}\` found; but there already seems to be an active build on Jenkins; exiting" >> $GITHUB_STEP_SUMMARY
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
if [[ "${artifacts_found}" == "false" ]]; then
|
if [[ "${artifacts_found}" == "false" ]]; then
|
||||||
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "> New version detected, but not all artifacts are published yet; skipping trigger" >> $GITHUB_STEP_SUMMARY
|
echo "> New version detected, but not all artifacts are published yet; skipping trigger" >> $GITHUB_STEP_SUMMARY
|
||||||
FAILURE_REASON="New version ${EXT_RELEASE} for kasm tag latest is detected, however not all artifacts are uploaded to upstream release yet. Will try again later."
|
FAILURE_REASON="New version ${EXT_RELEASE} for kasm tag develop is detected, however not all artifacts are uploaded to upstream release yet. Will try again later."
|
||||||
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903,
|
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903,
|
||||||
"description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n"}],
|
"description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n"}],
|
||||||
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
|
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
|
||||||
else
|
else
|
||||||
printf "\n## Trigger new build\n\n" >> $GITHUB_STEP_SUMMARY
|
printf "\n## Trigger new build\n\n" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "New sanitized version \`${EXT_RELEASE_SANITIZED}\` found; old version was \`${IMAGE_VERSION}\`. Triggering new build" >> $GITHUB_STEP_SUMMARY
|
echo "New version \`${EXT_RELEASE}\` found; old version was \`${IMAGE_VERSION}\`. Triggering new build" >> $GITHUB_STEP_SUMMARY
|
||||||
if [[ "${artifacts_found}" == "true" ]]; then
|
if "${artifacts_found}" == "true" ]]; then
|
||||||
echo "All artifacts seem to be uploaded." >> $GITHUB_STEP_SUMMARY
|
echo "All artifacts seem to be uploaded." >> $GITHUB_STEP_SUMMARY
|
||||||
fi
|
fi
|
||||||
response=$(curl -iX POST \
|
response=$(curl -iX POST \
|
||||||
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-kasm/job/master/buildWithParameters?PACKAGE_CHECK=false \
|
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-kasm/job/develop/buildWithParameters?PACKAGE_CHECK=false \
|
||||||
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
|
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
|
||||||
echo "Jenkins [job queue url](${response%$'\r'})" >> $GITHUB_STEP_SUMMARY
|
echo "Jenkins [job queue url](${response%$'\r'})" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "Sleeping 10 seconds until job starts" >> $GITHUB_STEP_SUMMARY
|
echo "Sleeping 10 seconds until job starts" >> $GITHUB_STEP_SUMMARY
|
||||||
@ -139,7 +109,7 @@ jobs:
|
|||||||
--data-urlencode "description=GHA external trigger https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
|
--data-urlencode "description=GHA external trigger https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
|
||||||
--data-urlencode "Submit=Submit"
|
--data-urlencode "Submit=Submit"
|
||||||
echo "**** Notifying Discord ****"
|
echo "**** Notifying Discord ****"
|
||||||
TRIGGER_REASON="A version change was detected for kasm tag latest. Old version:${IMAGE_VERSION} New version:${EXT_RELEASE_SANITIZED}"
|
TRIGGER_REASON="A version change was detected for kasm tag develop. Old version:${IMAGE_VERSION} New version:${EXT_RELEASE}"
|
||||||
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903,
|
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903,
|
||||||
"description": "**Build Triggered** \n**Reason:** '"${TRIGGER_REASON}"' \n**Build URL:** '"${buildurl}display/redirect"' \n"}],
|
"description": "**Build Triggered** \n**Reason:** '"${TRIGGER_REASON}"' \n**Build URL:** '"${buildurl}display/redirect"' \n"}],
|
||||||
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
|
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
|
||||||
|
|||||||
@ -5,9 +5,6 @@ on:
|
|||||||
- cron: '33 * * * *'
|
- cron: '33 * * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
external-trigger-scheduler:
|
external-trigger-scheduler:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
8
.github/workflows/greetings.yml
vendored
8
.github/workflows/greetings.yml
vendored
@ -2,18 +2,12 @@ name: Greetings
|
|||||||
|
|
||||||
on: [pull_request_target, issues]
|
on: [pull_request_target, issues]
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
greeting:
|
greeting:
|
||||||
permissions:
|
|
||||||
issues: write
|
|
||||||
pull-requests: write
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/first-interaction@v1
|
- uses: actions/first-interaction@v1
|
||||||
with:
|
with:
|
||||||
issue-message: 'Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.'
|
issue-message: 'Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.'
|
||||||
pr-message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/linuxserver/docker-kasm/blob/master/.github/PULL_REQUEST_TEMPLATE.md)!'
|
pr-message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/linuxserver/docker-kasm/blob/develop/.github/PULL_REQUEST_TEMPLATE.md)!'
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
35
.github/workflows/package_trigger_scheduler.yml
vendored
35
.github/workflows/package_trigger_scheduler.yml
vendored
@ -5,9 +5,6 @@ on:
|
|||||||
- cron: '31 21 * * 2'
|
- cron: '31 21 * * 2'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
package-trigger-scheduler:
|
package-trigger-scheduler:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -30,18 +27,9 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
printf "\n## Evaluating \`%s\`\n\n" ${br} >> $GITHUB_STEP_SUMMARY
|
printf "\n## Evaluating \`%s\`\n\n" ${br} >> $GITHUB_STEP_SUMMARY
|
||||||
JENKINS_VARS=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-kasm/${br}/jenkins-vars.yml)
|
JENKINS_VARS=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-kasm/${br}/jenkins-vars.yml)
|
||||||
if ! curl -sfX GET https://raw.githubusercontent.com/linuxserver/docker-kasm/${br}/Jenkinsfile >/dev/null 2>&1; then
|
if [[ "${br}" == $(yq -r '.ls_branch' <<< "${JENKINS_VARS}") ]]; then
|
||||||
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
|
||||||
echo "> No Jenkinsfile found. Branch is either deprecated or is an early dev branch." >> $GITHUB_STEP_SUMMARY
|
|
||||||
skipped_branches="${skipped_branches}${br} "
|
|
||||||
elif [[ "${br}" == $(yq -r '.ls_branch' <<< "${JENKINS_VARS}") ]]; then
|
|
||||||
echo "Branch appears to be live; checking workflow." >> $GITHUB_STEP_SUMMARY
|
echo "Branch appears to be live; checking workflow." >> $GITHUB_STEP_SUMMARY
|
||||||
README_VARS=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-kasm/${br}/readme-vars.yml)
|
if [[ $(yq -r '.skip_package_check' <<< "${JENKINS_VARS}") == "true" ]]; then
|
||||||
if [[ $(yq -r '.project_deprecation_status' <<< "${README_VARS}") == "true" ]]; then
|
|
||||||
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
|
||||||
echo "> Branch appears to be deprecated; skipping trigger." >> $GITHUB_STEP_SUMMARY
|
|
||||||
skipped_branches="${skipped_branches}${br} "
|
|
||||||
elif [[ $(yq -r '.skip_package_check' <<< "${JENKINS_VARS}") == "true" ]]; then
|
|
||||||
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "> Skipping branch ${br} due to \`skip_package_check\` being set in \`jenkins-vars.yml\`." >> $GITHUB_STEP_SUMMARY
|
echo "> Skipping branch ${br} due to \`skip_package_check\` being set in \`jenkins-vars.yml\`." >> $GITHUB_STEP_SUMMARY
|
||||||
skipped_branches="${skipped_branches}${br} "
|
skipped_branches="${skipped_branches}${br} "
|
||||||
@ -49,7 +37,7 @@ jobs:
|
|||||||
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "> Github organizational variable \`SKIP_PACKAGE_TRIGGER\` contains \`kasm_${br}\`; skipping trigger." >> $GITHUB_STEP_SUMMARY
|
echo "> Github organizational variable \`SKIP_PACKAGE_TRIGGER\` contains \`kasm_${br}\`; skipping trigger." >> $GITHUB_STEP_SUMMARY
|
||||||
skipped_branches="${skipped_branches}${br} "
|
skipped_branches="${skipped_branches}${br} "
|
||||||
elif [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-kasm/job/${br}/lastBuild/api/json | jq -r '.building' 2>/dev/null) == "true" ]; then
|
elif [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-kasm/job/${br}/lastBuild/api/json | jq -r '.building') == "true" ]; then
|
||||||
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "> There already seems to be an active build on Jenkins; skipping package trigger for ${br}" >> $GITHUB_STEP_SUMMARY
|
echo "> There already seems to be an active build on Jenkins; skipping package trigger for ${br}" >> $GITHUB_STEP_SUMMARY
|
||||||
skipped_branches="${skipped_branches}${br} "
|
skipped_branches="${skipped_branches}${br} "
|
||||||
@ -61,11 +49,6 @@ jobs:
|
|||||||
response=$(curl -iX POST \
|
response=$(curl -iX POST \
|
||||||
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-kasm/job/${br}/buildWithParameters?PACKAGE_CHECK=true \
|
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-kasm/job/${br}/buildWithParameters?PACKAGE_CHECK=true \
|
||||||
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
|
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
|
||||||
if [[ -z "${response}" ]]; then
|
|
||||||
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
|
||||||
echo "> Jenkins build could not be triggered. Skipping branch."
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
echo "Jenkins [job queue url](${response%$'\r'})" >> $GITHUB_STEP_SUMMARY
|
echo "Jenkins [job queue url](${response%$'\r'})" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "Sleeping 10 seconds until job starts" >> $GITHUB_STEP_SUMMARY
|
echo "Sleeping 10 seconds until job starts" >> $GITHUB_STEP_SUMMARY
|
||||||
sleep 10
|
sleep 10
|
||||||
@ -73,14 +56,11 @@ jobs:
|
|||||||
buildurl="${buildurl%$'\r'}"
|
buildurl="${buildurl%$'\r'}"
|
||||||
echo "Jenkins job [build url](${buildurl})" >> $GITHUB_STEP_SUMMARY
|
echo "Jenkins job [build url](${buildurl})" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "Attempting to change the Jenkins job description" >> $GITHUB_STEP_SUMMARY
|
echo "Attempting to change the Jenkins job description" >> $GITHUB_STEP_SUMMARY
|
||||||
if ! curl -ifX POST \
|
curl -iX POST \
|
||||||
"${buildurl}submitDescription" \
|
"${buildurl}submitDescription" \
|
||||||
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} \
|
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} \
|
||||||
--data-urlencode "description=GHA package trigger https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
|
--data-urlencode "description=GHA package trigger https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
|
||||||
--data-urlencode "Submit=Submit"; then
|
--data-urlencode "Submit=Submit"
|
||||||
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
|
||||||
echo "> Unable to change the Jenkins job description."
|
|
||||||
fi
|
|
||||||
sleep 20
|
sleep 20
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
@ -90,14 +70,13 @@ jobs:
|
|||||||
if [[ -n "${triggered_branches}" ]] || [[ -n "${skipped_branches}" ]]; then
|
if [[ -n "${triggered_branches}" ]] || [[ -n "${skipped_branches}" ]]; then
|
||||||
if [[ -n "${triggered_branches}" ]]; then
|
if [[ -n "${triggered_branches}" ]]; then
|
||||||
NOTIFY_BRANCHES="**Triggered:** ${triggered_branches} \n"
|
NOTIFY_BRANCHES="**Triggered:** ${triggered_branches} \n"
|
||||||
NOTIFY_BUILD_URL="**Build URL:** https://ci.linuxserver.io/blue/organizations/jenkins/Docker-Pipeline-Builders%2Fdocker-kasm/activity/ \n"
|
|
||||||
echo "**** Package check build(s) triggered for branch(es): ${triggered_branches} ****"
|
|
||||||
fi
|
fi
|
||||||
if [[ -n "${skipped_branches}" ]]; then
|
if [[ -n "${skipped_branches}" ]]; then
|
||||||
NOTIFY_BRANCHES="${NOTIFY_BRANCHES}**Skipped:** ${skipped_branches} \n"
|
NOTIFY_BRANCHES="${NOTIFY_BRANCHES}**Skipped:** ${skipped_branches} \n"
|
||||||
fi
|
fi
|
||||||
|
echo "**** Package check build(s) triggered for branch(es): ${triggered_branches} ****"
|
||||||
echo "**** Notifying Discord ****"
|
echo "**** Notifying Discord ****"
|
||||||
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903,
|
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903,
|
||||||
"description": "**Package Check Build(s) for kasm** \n'"${NOTIFY_BRANCHES}"''"${NOTIFY_BUILD_URL}"'"}],
|
"description": "**Package Check Build(s) Triggered for kasm** \n'"${NOTIFY_BRANCHES}"'**Build URL:** '"https://ci.linuxserver.io/blue/organizations/jenkins/Docker-Pipeline-Builders%2Fdocker-kasm/activity/"' \n"}],
|
||||||
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
|
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
|
||||||
fi
|
fi
|
||||||
|
|||||||
0
.github/workflows/permissions.yml
vendored
Normal file → Executable file
0
.github/workflows/permissions.yml
vendored
Normal file → Executable file
42
Dockerfile
42
Dockerfile
@ -1,53 +1,63 @@
|
|||||||
# syntax=docker/dockerfile:1
|
# syntax=docker/dockerfile:1
|
||||||
|
|
||||||
FROM ghcr.io/linuxserver/baseimage-ubuntu:noble
|
FROM ghcr.io/linuxserver/baseimage-ubuntu:jammy
|
||||||
|
|
||||||
# set version label
|
# set version label
|
||||||
ARG BUILD_DATE
|
ARG BUILD_DATE
|
||||||
ARG KASM_VERSION
|
ARG KASM_VERSION
|
||||||
ARG VERSION
|
ARG VERSION
|
||||||
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
||||||
LABEL maintainer="thespad"
|
LABEL maintainer="thelamer"
|
||||||
|
|
||||||
# Env
|
# Env
|
||||||
ENV DOCKER_TLS_CERTDIR=""
|
ENV DOCKER_TLS_CERTDIR=""
|
||||||
ENV TINI_SUBREAPER=true
|
ENV TINI_SUBREAPER=true
|
||||||
|
|
||||||
#Add needed nvidia environment variables for https://github.com/NVIDIA/nvidia-docker
|
#Add needed nvidia environment variables for https://github.com/NVIDIA/nvidia-docker
|
||||||
ENV NVIDIA_DRIVER_CAPABILITIES="compute,graphics,video,utility"
|
ENV NVIDIA_DRIVER_CAPABILITIES="compute,graphics,video,utility" \
|
||||||
|
VERSION="develop"
|
||||||
|
|
||||||
# Container setup
|
# Container setup
|
||||||
RUN \
|
RUN \
|
||||||
echo "**** install packages ****" && \
|
echo "**** install packages ****" && \
|
||||||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - && \
|
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - && \
|
||||||
echo "deb [arch=amd64] https://download.docker.com/linux/ubuntu noble stable" > \
|
echo "deb [arch=amd64] https://download.docker.com/linux/ubuntu jammy stable" > \
|
||||||
/etc/apt/sources.list.d/docker.list && \
|
/etc/apt/sources.list.d/docker.list && \
|
||||||
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \
|
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | \
|
||||||
&& curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \
|
gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg && \
|
||||||
sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
|
curl -s -L https://nvidia.github.io/libnvidia-container/ubuntu22.04/libnvidia-container.list | \
|
||||||
tee /etc/apt/sources.list.d/nvidia-container-toolkit.list && \
|
sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
|
||||||
curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
|
tee /etc/apt/sources.list.d/nvidia-container-toolkit.list && \
|
||||||
printf "Package: docker-ce docker-ce-cli docker-ce-rootless-extras\nPin: version 5:28.* \nPin-Priority: 1001" > /etc/apt/preferences.d/docker && \
|
curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
|
||||||
apt-get install -y --no-install-recommends \
|
apt-get install -y --no-install-recommends \
|
||||||
btrfs-progs \
|
btrfs-progs \
|
||||||
build-essential \
|
|
||||||
containerd.io \
|
containerd.io \
|
||||||
docker-ce \
|
docker-ce \
|
||||||
docker-ce-cli \
|
docker-ce-cli \
|
||||||
docker-compose-plugin \
|
|
||||||
e2fsprogs \
|
e2fsprogs \
|
||||||
fuse-overlayfs \
|
fuse-overlayfs \
|
||||||
|
g++ \
|
||||||
|
gcc \
|
||||||
iproute2 \
|
iproute2 \
|
||||||
iptables \
|
iptables \
|
||||||
|
jq \
|
||||||
lsof \
|
lsof \
|
||||||
|
make \
|
||||||
nodejs \
|
nodejs \
|
||||||
nvidia-container-toolkit \
|
nvidia-container-toolkit \
|
||||||
|
nvidia-docker2 \
|
||||||
openssl \
|
openssl \
|
||||||
pigz \
|
pigz \
|
||||||
python3 \
|
python3 \
|
||||||
sudo \
|
sudo \
|
||||||
uidmap \
|
uidmap \
|
||||||
xfsprogs && \
|
xfsprogs && \
|
||||||
|
echo "**** compose install ****" && \
|
||||||
|
mkdir -p /usr/local/lib/docker/cli-plugins && \
|
||||||
|
curl -L \
|
||||||
|
https://github.com/docker/compose/releases/download/v2.5.0/docker-compose-$(uname -s)-$(uname -m) -o \
|
||||||
|
/usr/local/lib/docker/cli-plugins/docker-compose && \
|
||||||
|
chmod +x /usr/local/lib/docker/cli-plugins/docker-compose && \
|
||||||
echo "**** dind setup ****" && \
|
echo "**** dind setup ****" && \
|
||||||
useradd -U dockremap && \
|
useradd -U dockremap && \
|
||||||
usermod -G dockremap dockremap && \
|
usermod -G dockremap dockremap && \
|
||||||
@ -61,8 +71,7 @@ RUN \
|
|||||||
echo "**** setup wizard ****" && \
|
echo "**** setup wizard ****" && \
|
||||||
mkdir -p /wizard && \
|
mkdir -p /wizard && \
|
||||||
if [ -z ${KASM_VERSION+x} ]; then \
|
if [ -z ${KASM_VERSION+x} ]; then \
|
||||||
KASM_VERSION=$(curl -sX GET 'https://api.github.com/repos/kasmtech/kasm-install-wizard/releases/latest' \
|
KASM_VERSION=$(curl -sX GET https://kasm-ci.s3.amazonaws.com/dev-version.txt); \
|
||||||
| jq -r '.name'); \
|
|
||||||
fi && \
|
fi && \
|
||||||
echo "${KASM_VERSION}" > /version.txt && \
|
echo "${KASM_VERSION}" > /version.txt && \
|
||||||
curl -o \
|
curl -o \
|
||||||
@ -83,7 +92,7 @@ RUN \
|
|||||||
ALVERSION=$(cat /kasm_release/conf/database/seed_data/default_properties.yaml |awk '/alembic_version/ {print $2}') && \
|
ALVERSION=$(cat /kasm_release/conf/database/seed_data/default_properties.yaml |awk '/alembic_version/ {print $2}') && \
|
||||||
curl -o \
|
curl -o \
|
||||||
/tmp/images.tar.gz -L \
|
/tmp/images.tar.gz -L \
|
||||||
"https://kasm-ci.s3.amazonaws.com/${KASM_VERSION}-images-combined.tar.gz" && \
|
"https://kasm-ci.s3.amazonaws.com/1.16.0-images-combined.tar.gz" && \
|
||||||
tar xf \
|
tar xf \
|
||||||
/tmp/images.tar.gz -C \
|
/tmp/images.tar.gz -C \
|
||||||
/ && \
|
/ && \
|
||||||
@ -102,9 +111,6 @@ RUN \
|
|||||||
cp \
|
cp \
|
||||||
/kasm_release/conf/database/seed_data/default_images_a* \
|
/kasm_release/conf/database/seed_data/default_images_a* \
|
||||||
/wizard/ && \
|
/wizard/ && \
|
||||||
useradd -u 70 kasm_db && \
|
|
||||||
useradd kasm && \
|
|
||||||
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
|
|
||||||
echo "**** cleanup ****" && \
|
echo "**** cleanup ****" && \
|
||||||
apt-get remove -y g++ gcc make && \
|
apt-get remove -y g++ gcc make && \
|
||||||
apt-get -y autoremove && \
|
apt-get -y autoremove && \
|
||||||
|
|||||||
@ -1,53 +1,63 @@
|
|||||||
# syntax=docker/dockerfile:1
|
# syntax=docker/dockerfile:1
|
||||||
|
|
||||||
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-noble
|
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-jammy
|
||||||
|
|
||||||
# set version label
|
# set version label
|
||||||
ARG BUILD_DATE
|
ARG BUILD_DATE
|
||||||
ARG KASM_VERSION
|
ARG KASM_VERSION
|
||||||
ARG VERSION
|
ARG VERSION
|
||||||
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
||||||
LABEL maintainer="thespad"
|
LABEL maintainer="thelamer"
|
||||||
|
|
||||||
# Env
|
# Env
|
||||||
ENV DOCKER_TLS_CERTDIR=""
|
ENV DOCKER_TLS_CERTDIR=""
|
||||||
ENV TINI_SUBREAPER=true
|
ENV TINI_SUBREAPER=true
|
||||||
|
|
||||||
#Add needed nvidia environment variables for https://github.com/NVIDIA/nvidia-docker
|
#Add needed nvidia environment variables for https://github.com/NVIDIA/nvidia-docker
|
||||||
ENV NVIDIA_DRIVER_CAPABILITIES="compute,graphics,video,utility"
|
ENV NVIDIA_DRIVER_CAPABILITIES="compute,graphics,video,utility" \
|
||||||
|
VERSION="develop"
|
||||||
|
|
||||||
# Container setup
|
# Container setup
|
||||||
RUN \
|
RUN \
|
||||||
echo "**** install packages ****" && \
|
echo "**** install packages ****" && \
|
||||||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - && \
|
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - && \
|
||||||
echo "deb [arch=arm64] https://download.docker.com/linux/ubuntu noble stable" > \
|
echo "deb [arch=arm64] https://download.docker.com/linux/ubuntu jammy stable" > \
|
||||||
/etc/apt/sources.list.d/docker.list && \
|
/etc/apt/sources.list.d/docker.list && \
|
||||||
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \
|
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | \
|
||||||
&& curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \
|
gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg && \
|
||||||
sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
|
curl -s -L https://nvidia.github.io/libnvidia-container/ubuntu22.04/libnvidia-container.list | \
|
||||||
tee /etc/apt/sources.list.d/nvidia-container-toolkit.list && \
|
sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
|
||||||
curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
|
tee /etc/apt/sources.list.d/nvidia-container-toolkit.list && \
|
||||||
printf "Package: docker-ce docker-ce-cli docker-ce-rootless-extras\nPin: version 5:28.* \nPin-Priority: 1001" > /etc/apt/preferences.d/docker && \
|
curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
|
||||||
apt-get install -y --no-install-recommends \
|
apt-get install -y --no-install-recommends \
|
||||||
btrfs-progs \
|
btrfs-progs \
|
||||||
build-essential \
|
|
||||||
containerd.io \
|
containerd.io \
|
||||||
docker-ce \
|
docker-ce \
|
||||||
docker-ce-cli \
|
docker-ce-cli \
|
||||||
docker-compose-plugin \
|
|
||||||
e2fsprogs \
|
e2fsprogs \
|
||||||
fuse-overlayfs \
|
fuse-overlayfs \
|
||||||
|
g++ \
|
||||||
|
gcc \
|
||||||
iproute2 \
|
iproute2 \
|
||||||
iptables \
|
iptables \
|
||||||
|
jq \
|
||||||
lsof \
|
lsof \
|
||||||
|
make \
|
||||||
nodejs \
|
nodejs \
|
||||||
nvidia-container-toolkit \
|
nvidia-container-toolkit \
|
||||||
|
nvidia-docker2 \
|
||||||
openssl \
|
openssl \
|
||||||
pigz \
|
pigz \
|
||||||
python3 \
|
python3 \
|
||||||
sudo \
|
sudo \
|
||||||
uidmap \
|
uidmap \
|
||||||
xfsprogs && \
|
xfsprogs && \
|
||||||
|
echo "**** compose install ****" && \
|
||||||
|
mkdir -p /usr/local/lib/docker/cli-plugins && \
|
||||||
|
curl -L \
|
||||||
|
https://github.com/docker/compose/releases/download/v2.5.0/docker-compose-$(uname -s)-$(uname -m) -o \
|
||||||
|
/usr/local/lib/docker/cli-plugins/docker-compose && \
|
||||||
|
chmod +x /usr/local/lib/docker/cli-plugins/docker-compose && \
|
||||||
echo "**** dind setup ****" && \
|
echo "**** dind setup ****" && \
|
||||||
useradd -U dockremap && \
|
useradd -U dockremap && \
|
||||||
usermod -G dockremap dockremap && \
|
usermod -G dockremap dockremap && \
|
||||||
@ -61,8 +71,7 @@ RUN \
|
|||||||
echo "**** setup wizard ****" && \
|
echo "**** setup wizard ****" && \
|
||||||
mkdir -p /wizard && \
|
mkdir -p /wizard && \
|
||||||
if [ -z ${KASM_VERSION+x} ]; then \
|
if [ -z ${KASM_VERSION+x} ]; then \
|
||||||
KASM_VERSION=$(curl -sX GET 'https://api.github.com/repos/kasmtech/kasm-install-wizard/releases/latest' \
|
KASM_VERSION=$(curl -sX GET https://kasm-ci.s3.amazonaws.com/dev-version.txt); \
|
||||||
| jq -r '.name'); \
|
|
||||||
fi && \
|
fi && \
|
||||||
echo "${KASM_VERSION}" > /version.txt && \
|
echo "${KASM_VERSION}" > /version.txt && \
|
||||||
curl -o \
|
curl -o \
|
||||||
@ -83,7 +92,7 @@ RUN \
|
|||||||
ALVERSION=$(cat /kasm_release/conf/database/seed_data/default_properties.yaml |awk '/alembic_version/ {print $2}') && \
|
ALVERSION=$(cat /kasm_release/conf/database/seed_data/default_properties.yaml |awk '/alembic_version/ {print $2}') && \
|
||||||
curl -o \
|
curl -o \
|
||||||
/tmp/images.tar.gz -L \
|
/tmp/images.tar.gz -L \
|
||||||
"https://kasm-ci.s3.amazonaws.com/${KASM_VERSION}-images-combined.tar.gz" && \
|
"https://kasm-ci.s3.amazonaws.com/1.16.0-images-combined.tar.gz" && \
|
||||||
tar xf \
|
tar xf \
|
||||||
/tmp/images.tar.gz -C \
|
/tmp/images.tar.gz -C \
|
||||||
/ && \
|
/ && \
|
||||||
@ -102,9 +111,6 @@ RUN \
|
|||||||
cp \
|
cp \
|
||||||
/kasm_release/conf/database/seed_data/default_images_a* \
|
/kasm_release/conf/database/seed_data/default_images_a* \
|
||||||
/wizard/ && \
|
/wizard/ && \
|
||||||
useradd -u 70 kasm_db && \
|
|
||||||
useradd kasm && \
|
|
||||||
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
|
|
||||||
echo "**** cleanup ****" && \
|
echo "**** cleanup ****" && \
|
||||||
apt-get remove -y g++ gcc make && \
|
apt-get remove -y g++ gcc make && \
|
||||||
apt-get -y autoremove && \
|
apt-get -y autoremove && \
|
||||||
|
|||||||
523
Jenkinsfile
vendored
523
Jenkinsfile
vendored
@ -8,7 +8,7 @@ pipeline {
|
|||||||
}
|
}
|
||||||
// Input to determine if this is a package check
|
// Input to determine if this is a package check
|
||||||
parameters {
|
parameters {
|
||||||
string(defaultValue: 'false', description: 'package check run', name: 'PACKAGE_CHECK')
|
string(defaultValue: 'false', description: 'package check run', name: 'PACKAGE_CHECK')
|
||||||
}
|
}
|
||||||
// Configuration for the variables used for this specific repo
|
// Configuration for the variables used for this specific repo
|
||||||
environment {
|
environment {
|
||||||
@ -19,8 +19,6 @@ pipeline {
|
|||||||
DOCKERHUB_TOKEN=credentials('docker-hub-ci-pat')
|
DOCKERHUB_TOKEN=credentials('docker-hub-ci-pat')
|
||||||
QUAYIO_API_TOKEN=credentials('quayio-repo-api-token')
|
QUAYIO_API_TOKEN=credentials('quayio-repo-api-token')
|
||||||
GIT_SIGNING_KEY=credentials('484fbca6-9a4f-455e-b9e3-97ac98785f5f')
|
GIT_SIGNING_KEY=credentials('484fbca6-9a4f-455e-b9e3-97ac98785f5f')
|
||||||
EXT_USER = 'kasmtech'
|
|
||||||
EXT_REPO = 'kasm-install-wizard'
|
|
||||||
BUILD_VERSION_ARG = 'KASM_VERSION'
|
BUILD_VERSION_ARG = 'KASM_VERSION'
|
||||||
LS_USER = 'linuxserver'
|
LS_USER = 'linuxserver'
|
||||||
LS_REPO = 'docker-kasm'
|
LS_REPO = 'docker-kasm'
|
||||||
@ -35,8 +33,8 @@ pipeline {
|
|||||||
CI_PORT='3000'
|
CI_PORT='3000'
|
||||||
CI_SSL='true'
|
CI_SSL='true'
|
||||||
CI_DELAY='120'
|
CI_DELAY='120'
|
||||||
CI_DOCKERENV=''
|
CI_DOCKERENV='TEST=true'
|
||||||
CI_AUTH=''
|
CI_AUTH='user:password'
|
||||||
CI_WEBPATH=''
|
CI_WEBPATH=''
|
||||||
}
|
}
|
||||||
stages {
|
stages {
|
||||||
@ -58,27 +56,15 @@ pipeline {
|
|||||||
steps{
|
steps{
|
||||||
echo "Running on node: ${NODE_NAME}"
|
echo "Running on node: ${NODE_NAME}"
|
||||||
sh '''#! /bin/bash
|
sh '''#! /bin/bash
|
||||||
echo "Pruning builder"
|
containers=$(docker ps -aq)
|
||||||
docker builder prune -f --builder container || :
|
|
||||||
containers=$(docker ps -q)
|
|
||||||
if [[ -n "${containers}" ]]; then
|
if [[ -n "${containers}" ]]; then
|
||||||
BUILDX_CONTAINER_ID=$(docker ps -qf 'name=buildx_buildkit')
|
docker stop ${containers}
|
||||||
for container in ${containers}; do
|
|
||||||
if [[ "${container}" == "${BUILDX_CONTAINER_ID}" ]]; then
|
|
||||||
echo "skipping buildx container in docker stop"
|
|
||||||
else
|
|
||||||
echo "Stopping container ${container}"
|
|
||||||
docker stop ${container}
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
fi
|
||||||
docker system prune -f --volumes || :
|
docker system prune -af --volumes || : '''
|
||||||
docker image prune -af || :
|
|
||||||
'''
|
|
||||||
script{
|
script{
|
||||||
env.EXIT_STATUS = ''
|
env.EXIT_STATUS = ''
|
||||||
env.LS_RELEASE = sh(
|
env.LS_RELEASE = sh(
|
||||||
script: '''docker run --rm quay.io/skopeo/stable:v1 inspect docker://ghcr.io/${LS_USER}/${CONTAINER_NAME}:latest 2>/dev/null | jq -r '.Labels.build_version' | awk '{print $3}' | grep '\\-ls' || : ''',
|
script: '''docker run --rm quay.io/skopeo/stable:v1 inspect docker://ghcr.io/${LS_USER}/${CONTAINER_NAME}:develop 2>/dev/null | jq -r '.Labels.build_version' | awk '{print $3}' | grep '\\-ls' || : ''',
|
||||||
returnStdout: true).trim()
|
returnStdout: true).trim()
|
||||||
env.LS_RELEASE_NOTES = sh(
|
env.LS_RELEASE_NOTES = sh(
|
||||||
script: '''cat readme-vars.yml | awk -F \\" '/date: "[0-9][0-9].[0-9][0-9].[0-9][0-9]:/ {print $4;exit;}' | sed -E ':a;N;$!ba;s/\\r{0,1}\\n/\\\\n/g' ''',
|
script: '''cat readme-vars.yml | awk -F \\" '/date: "[0-9][0-9].[0-9][0-9].[0-9][0-9]:/ {print $4;exit;}' | sed -E ':a;N;$!ba;s/\\r{0,1}\\n/\\\\n/g' ''',
|
||||||
@ -96,11 +82,7 @@ pipeline {
|
|||||||
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DOCKERHUB_IMAGE + '/tags/'
|
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DOCKERHUB_IMAGE + '/tags/'
|
||||||
env.PULL_REQUEST = env.CHANGE_ID
|
env.PULL_REQUEST = env.CHANGE_ID
|
||||||
env.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE .editorconfig ./.github/CONTRIBUTING.md ./.github/FUNDING.yml ./.github/ISSUE_TEMPLATE/config.yml ./.github/ISSUE_TEMPLATE/issue.bug.yml ./.github/ISSUE_TEMPLATE/issue.feature.yml ./.github/PULL_REQUEST_TEMPLATE.md ./.github/workflows/external_trigger_scheduler.yml ./.github/workflows/greetings.yml ./.github/workflows/package_trigger_scheduler.yml ./.github/workflows/call_issue_pr_tracker.yml ./.github/workflows/call_issues_cron.yml ./.github/workflows/permissions.yml ./.github/workflows/external_trigger.yml'
|
env.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE .editorconfig ./.github/CONTRIBUTING.md ./.github/FUNDING.yml ./.github/ISSUE_TEMPLATE/config.yml ./.github/ISSUE_TEMPLATE/issue.bug.yml ./.github/ISSUE_TEMPLATE/issue.feature.yml ./.github/PULL_REQUEST_TEMPLATE.md ./.github/workflows/external_trigger_scheduler.yml ./.github/workflows/greetings.yml ./.github/workflows/package_trigger_scheduler.yml ./.github/workflows/call_issue_pr_tracker.yml ./.github/workflows/call_issues_cron.yml ./.github/workflows/permissions.yml ./.github/workflows/external_trigger.yml'
|
||||||
if ( env.SYFT_IMAGE_TAG == null ) {
|
|
||||||
env.SYFT_IMAGE_TAG = 'latest'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
echo "Using syft image tag ${SYFT_IMAGE_TAG}"
|
|
||||||
sh '''#! /bin/bash
|
sh '''#! /bin/bash
|
||||||
echo "The default github branch detected as ${GH_DEFAULT_BRANCH}" '''
|
echo "The default github branch detected as ${GH_DEFAULT_BRANCH}" '''
|
||||||
script{
|
script{
|
||||||
@ -111,7 +93,7 @@ pipeline {
|
|||||||
script{
|
script{
|
||||||
env.LS_TAG_NUMBER = sh(
|
env.LS_TAG_NUMBER = sh(
|
||||||
script: '''#! /bin/bash
|
script: '''#! /bin/bash
|
||||||
tagsha=$(git rev-list -n 1 ${LS_RELEASE} 2>/dev/null)
|
tagsha=$(git rev-list -n 1 develop-${LS_RELEASE} 2>/dev/null)
|
||||||
if [ "${tagsha}" == "${COMMIT_SHA}" ]; then
|
if [ "${tagsha}" == "${COMMIT_SHA}" ]; then
|
||||||
echo ${LS_RELEASE_NUMBER}
|
echo ${LS_RELEASE_NUMBER}
|
||||||
elif [ -z "${GIT_COMMIT}" ]; then
|
elif [ -z "${GIT_COMMIT}" ]; then
|
||||||
@ -144,23 +126,16 @@ pipeline {
|
|||||||
/* ########################
|
/* ########################
|
||||||
External Release Tagging
|
External Release Tagging
|
||||||
######################## */
|
######################## */
|
||||||
// If this is a stable github release use the latest endpoint from github to determine the ext tag
|
// If this is a custom command to determine version use that command
|
||||||
stage("Set ENV github_stable"){
|
stage("Set tag custom bash"){
|
||||||
steps{
|
steps{
|
||||||
script{
|
script{
|
||||||
env.EXT_RELEASE = sh(
|
env.EXT_RELEASE = sh(
|
||||||
script: '''curl -H "Authorization: token ${GITHUB_TOKEN}" -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq -r '. | .tag_name' ''',
|
script: ''' curl -sX GET https://kasm-ci.s3.amazonaws.com/dev-version.txt ''',
|
||||||
returnStdout: true).trim()
|
returnStdout: true).trim()
|
||||||
}
|
env.RELEASE_LINK = 'custom_command'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// If this is a stable or devel github release generate the link for the build message
|
|
||||||
stage("Set ENV github_link"){
|
|
||||||
steps{
|
|
||||||
script{
|
|
||||||
env.RELEASE_LINK = 'https://github.com/' + env.EXT_USER + '/' + env.EXT_REPO + '/releases/tag/' + env.EXT_RELEASE
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// Sanitize the release tag and strip illegal docker or github characters
|
// Sanitize the release tag and strip illegal docker or github characters
|
||||||
stage("Sanitize tag"){
|
stage("Sanitize tag"){
|
||||||
@ -196,10 +171,10 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// If this is a master build use live docker endpoints
|
// If this is a develop build use live docker endpoints
|
||||||
stage("Set ENV live build"){
|
stage("Set ENV live build"){
|
||||||
when {
|
when {
|
||||||
branch "master"
|
branch "develop"
|
||||||
environment name: 'CHANGE_ID', value: ''
|
environment name: 'CHANGE_ID', value: ''
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
@ -209,22 +184,20 @@ pipeline {
|
|||||||
env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/' + env.CONTAINER_NAME
|
env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/' + env.CONTAINER_NAME
|
||||||
env.QUAYIMAGE = 'quay.io/linuxserver.io/' + env.CONTAINER_NAME
|
env.QUAYIMAGE = 'quay.io/linuxserver.io/' + env.CONTAINER_NAME
|
||||||
if (env.MULTIARCH == 'true') {
|
if (env.MULTIARCH == 'true') {
|
||||||
env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
env.CI_TAGS = 'amd64-develop-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm64v8-develop-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
||||||
} else {
|
} else {
|
||||||
env.CI_TAGS = env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
env.CI_TAGS = 'develop-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
||||||
}
|
}
|
||||||
env.VERSION_TAG = env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
env.VERSION_TAG = env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
||||||
env.META_TAG = env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
env.META_TAG = 'develop-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
||||||
env.EXT_RELEASE_TAG = 'version-' + env.EXT_RELEASE_CLEAN
|
env.EXT_RELEASE_TAG = 'develop-version-' + env.EXT_RELEASE_CLEAN
|
||||||
env.BUILDCACHE = 'docker.io/lsiodev/buildcache,registry.gitlab.com/linuxserver.io/docker-jenkins-builder/lsiodev-buildcache,ghcr.io/linuxserver/lsiodev-buildcache,quay.io/linuxserver.io/lsiodev-buildcache'
|
|
||||||
env.CITEST_IMAGETAG = 'latest'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// If this is a dev build use dev docker endpoints
|
// If this is a dev build use dev docker endpoints
|
||||||
stage("Set ENV dev build"){
|
stage("Set ENV dev build"){
|
||||||
when {
|
when {
|
||||||
not {branch "master"}
|
not {branch "develop"}
|
||||||
environment name: 'CHANGE_ID', value: ''
|
environment name: 'CHANGE_ID', value: ''
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
@ -234,16 +207,14 @@ pipeline {
|
|||||||
env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/lsiodev-' + env.CONTAINER_NAME
|
env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/lsiodev-' + env.CONTAINER_NAME
|
||||||
env.QUAYIMAGE = 'quay.io/linuxserver.io/lsiodev-' + env.CONTAINER_NAME
|
env.QUAYIMAGE = 'quay.io/linuxserver.io/lsiodev-' + env.CONTAINER_NAME
|
||||||
if (env.MULTIARCH == 'true') {
|
if (env.MULTIARCH == 'true') {
|
||||||
env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
|
env.CI_TAGS = 'amd64-develop-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm64v8-develop-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
|
||||||
} else {
|
} else {
|
||||||
env.CI_TAGS = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
|
env.CI_TAGS = 'develop-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
|
||||||
}
|
}
|
||||||
env.VERSION_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
|
env.VERSION_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
|
||||||
env.META_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
|
env.META_TAG = 'develop-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
|
||||||
env.EXT_RELEASE_TAG = 'version-' + env.EXT_RELEASE_CLEAN
|
env.EXT_RELEASE_TAG = 'develop-version-' + env.EXT_RELEASE_CLEAN
|
||||||
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DEV_DOCKERHUB_IMAGE + '/tags/'
|
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DEV_DOCKERHUB_IMAGE + '/tags/'
|
||||||
env.BUILDCACHE = 'docker.io/lsiodev/buildcache,registry.gitlab.com/linuxserver.io/docker-jenkins-builder/lsiodev-buildcache,ghcr.io/linuxserver/lsiodev-buildcache,quay.io/linuxserver.io/lsiodev-buildcache'
|
|
||||||
env.CITEST_IMAGETAG = 'develop'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -259,17 +230,15 @@ pipeline {
|
|||||||
env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/lspipepr-' + env.CONTAINER_NAME
|
env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/lspipepr-' + env.CONTAINER_NAME
|
||||||
env.QUAYIMAGE = 'quay.io/linuxserver.io/lspipepr-' + env.CONTAINER_NAME
|
env.QUAYIMAGE = 'quay.io/linuxserver.io/lspipepr-' + env.CONTAINER_NAME
|
||||||
if (env.MULTIARCH == 'true') {
|
if (env.MULTIARCH == 'true') {
|
||||||
env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST
|
env.CI_TAGS = 'amd64-develop-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST + '|arm64v8-develop-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST
|
||||||
} else {
|
} else {
|
||||||
env.CI_TAGS = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST
|
env.CI_TAGS = 'develop-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST
|
||||||
}
|
}
|
||||||
env.VERSION_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST
|
env.VERSION_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST
|
||||||
env.META_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST
|
env.META_TAG = 'develop-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST
|
||||||
env.EXT_RELEASE_TAG = 'version-' + env.EXT_RELEASE_CLEAN
|
env.EXT_RELEASE_TAG = 'develop-version-' + env.EXT_RELEASE_CLEAN
|
||||||
env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/pull/' + env.PULL_REQUEST
|
env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/pull/' + env.PULL_REQUEST
|
||||||
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.PR_DOCKERHUB_IMAGE + '/tags/'
|
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.PR_DOCKERHUB_IMAGE + '/tags/'
|
||||||
env.BUILDCACHE = 'docker.io/lsiodev/buildcache,registry.gitlab.com/linuxserver.io/docker-jenkins-builder/lsiodev-buildcache,ghcr.io/linuxserver/lsiodev-buildcache,quay.io/linuxserver.io/lsiodev-buildcache'
|
|
||||||
env.CITEST_IMAGETAG = 'develop'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -292,7 +261,7 @@ pipeline {
|
|||||||
-v ${WORKSPACE}:/mnt \
|
-v ${WORKSPACE}:/mnt \
|
||||||
-e AWS_ACCESS_KEY_ID=\"${S3_KEY}\" \
|
-e AWS_ACCESS_KEY_ID=\"${S3_KEY}\" \
|
||||||
-e AWS_SECRET_ACCESS_KEY=\"${S3_SECRET}\" \
|
-e AWS_SECRET_ACCESS_KEY=\"${S3_SECRET}\" \
|
||||||
ghcr.io/linuxserver/baseimage-alpine:3.23 s6-envdir -fn -- /var/run/s6/container_environment /bin/bash -c "\
|
ghcr.io/linuxserver/baseimage-alpine:3.20 s6-envdir -fn -- /var/run/s6/container_environment /bin/bash -c "\
|
||||||
apk add --no-cache python3 && \
|
apk add --no-cache python3 && \
|
||||||
python3 -m venv /lsiopy && \
|
python3 -m venv /lsiopy && \
|
||||||
pip install --no-cache-dir -U pip && \
|
pip install --no-cache-dir -U pip && \
|
||||||
@ -304,7 +273,7 @@ pipeline {
|
|||||||
// Use helper containers to render templated files
|
// Use helper containers to render templated files
|
||||||
stage('Update-Templates') {
|
stage('Update-Templates') {
|
||||||
when {
|
when {
|
||||||
branch "master"
|
branch "develop"
|
||||||
environment name: 'CHANGE_ID', value: ''
|
environment name: 'CHANGE_ID', value: ''
|
||||||
expression {
|
expression {
|
||||||
env.CONTAINER_NAME != null
|
env.CONTAINER_NAME != null
|
||||||
@ -316,24 +285,24 @@ pipeline {
|
|||||||
TEMPDIR=$(mktemp -d)
|
TEMPDIR=$(mktemp -d)
|
||||||
docker pull ghcr.io/linuxserver/jenkins-builder:latest
|
docker pull ghcr.io/linuxserver/jenkins-builder:latest
|
||||||
# Cloned repo paths for templating:
|
# Cloned repo paths for templating:
|
||||||
# ${TEMPDIR}/docker-${CONTAINER_NAME}: Cloned branch master of ${LS_USER}/${LS_REPO} for running the jenkins builder on
|
# ${TEMPDIR}/docker-${CONTAINER_NAME}: Cloned branch develop of ${LS_USER}/${LS_REPO} for running the jenkins builder on
|
||||||
# ${TEMPDIR}/repo/${LS_REPO}: Cloned branch master of ${LS_USER}/${LS_REPO} for commiting various templated file changes and pushing back to Github
|
# ${TEMPDIR}/repo/${LS_REPO}: Cloned branch develop of ${LS_USER}/${LS_REPO} for commiting various templated file changes and pushing back to Github
|
||||||
# ${TEMPDIR}/docs/docker-documentation: Cloned docs repo for pushing docs updates to Github
|
# ${TEMPDIR}/docs/docker-documentation: Cloned docs repo for pushing docs updates to Github
|
||||||
# ${TEMPDIR}/unraid/docker-templates: Cloned docker-templates repo to check for logos
|
# ${TEMPDIR}/unraid/docker-templates: Cloned docker-templates repo to check for logos
|
||||||
# ${TEMPDIR}/unraid/templates: Cloned templates repo for commiting unraid template changes and pushing back to Github
|
# ${TEMPDIR}/unraid/templates: Cloned templates repo for commiting unraid template changes and pushing back to Github
|
||||||
git clone --branch master --depth 1 https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/docker-${CONTAINER_NAME}
|
git clone --branch develop --depth 1 https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/docker-${CONTAINER_NAME}
|
||||||
docker run --rm -v ${TEMPDIR}/docker-${CONTAINER_NAME}:/tmp -e LOCAL=true -e PUID=$(id -u) -e PGID=$(id -g) ghcr.io/linuxserver/jenkins-builder:latest
|
docker run --rm -v ${TEMPDIR}/docker-${CONTAINER_NAME}:/tmp -e LOCAL=true -e PUID=$(id -u) -e PGID=$(id -g) ghcr.io/linuxserver/jenkins-builder:latest
|
||||||
echo "Starting Stage 1 - Jenkinsfile update"
|
echo "Starting Stage 1 - Jenkinsfile update"
|
||||||
if [[ "$(md5sum Jenkinsfile | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile | awk '{ print $1 }')" ]]; then
|
if [[ "$(md5sum Jenkinsfile | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile | awk '{ print $1 }')" ]]; then
|
||||||
mkdir -p ${TEMPDIR}/repo
|
mkdir -p ${TEMPDIR}/repo
|
||||||
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
|
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
|
||||||
cd ${TEMPDIR}/repo/${LS_REPO}
|
cd ${TEMPDIR}/repo/${LS_REPO}
|
||||||
git checkout -f master
|
git checkout -f develop
|
||||||
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile ${TEMPDIR}/repo/${LS_REPO}/
|
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile ${TEMPDIR}/repo/${LS_REPO}/
|
||||||
git add Jenkinsfile
|
git add Jenkinsfile
|
||||||
git commit -m 'Bot Updating Templated Files'
|
git commit -m 'Bot Updating Templated Files'
|
||||||
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git master
|
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git develop
|
||||||
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git master
|
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git develop
|
||||||
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
|
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
|
||||||
echo "Updating Jenkinsfile and exiting build, new one will trigger based on commit"
|
echo "Updating Jenkinsfile and exiting build, new one will trigger based on commit"
|
||||||
rm -Rf ${TEMPDIR}
|
rm -Rf ${TEMPDIR}
|
||||||
@ -352,13 +321,13 @@ pipeline {
|
|||||||
mkdir -p ${TEMPDIR}/repo
|
mkdir -p ${TEMPDIR}/repo
|
||||||
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
|
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
|
||||||
cd ${TEMPDIR}/repo/${LS_REPO}
|
cd ${TEMPDIR}/repo/${LS_REPO}
|
||||||
git checkout -f master
|
git checkout -f develop
|
||||||
for i in ${TEMPLATES_TO_DELETE}; do
|
for i in ${TEMPLATES_TO_DELETE}; do
|
||||||
git rm "${i}"
|
git rm "${i}"
|
||||||
done
|
done
|
||||||
git commit -m 'Bot Updating Templated Files'
|
git commit -m 'Bot Updating Templated Files'
|
||||||
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git master
|
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git develop
|
||||||
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git master
|
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git develop
|
||||||
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
|
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
|
||||||
echo "Deleting old/deprecated templates and exiting build, new one will trigger based on commit"
|
echo "Deleting old/deprecated templates and exiting build, new one will trigger based on commit"
|
||||||
rm -Rf ${TEMPDIR}
|
rm -Rf ${TEMPDIR}
|
||||||
@ -366,35 +335,6 @@ pipeline {
|
|||||||
else
|
else
|
||||||
echo "No templates to delete"
|
echo "No templates to delete"
|
||||||
fi
|
fi
|
||||||
echo "Starting Stage 2.5 - Update init diagram"
|
|
||||||
if ! grep -q 'init_diagram:' readme-vars.yml; then
|
|
||||||
echo "Adding the key 'init_diagram' to readme-vars.yml"
|
|
||||||
sed -i '\\|^#.*changelog.*$|d' readme-vars.yml
|
|
||||||
sed -i 's|^changelogs:|# init diagram\\ninit_diagram:\\n\\n# changelog\\nchangelogs:|' readme-vars.yml
|
|
||||||
fi
|
|
||||||
mkdir -p ${TEMPDIR}/d2
|
|
||||||
docker run --rm -v ${TEMPDIR}/d2:/output -e PUID=$(id -u) -e PGID=$(id -g) -e RAW="true" ghcr.io/linuxserver/d2-builder:latest ${CONTAINER_NAME}:latest
|
|
||||||
ls -al ${TEMPDIR}/d2
|
|
||||||
yq -ei ".init_diagram |= load_str(\\"${TEMPDIR}/d2/${CONTAINER_NAME}-latest.d2\\")" readme-vars.yml
|
|
||||||
if [[ $(md5sum readme-vars.yml | cut -c1-8) != $(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/readme-vars.yml | cut -c1-8) ]]; then
|
|
||||||
echo "'init_diagram' has been updated. Updating repo and exiting build, new one will trigger based on commit."
|
|
||||||
mkdir -p ${TEMPDIR}/repo
|
|
||||||
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
|
|
||||||
cd ${TEMPDIR}/repo/${LS_REPO}
|
|
||||||
git checkout -f master
|
|
||||||
cp ${WORKSPACE}/readme-vars.yml ${TEMPDIR}/repo/${LS_REPO}/readme-vars.yml
|
|
||||||
git add readme-vars.yml
|
|
||||||
git commit -m 'Bot Updating Templated Files'
|
|
||||||
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git master
|
|
||||||
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git master
|
|
||||||
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
|
|
||||||
echo "Updating templates and exiting build, new one will trigger based on commit"
|
|
||||||
rm -Rf ${TEMPDIR}
|
|
||||||
exit 0
|
|
||||||
else
|
|
||||||
echo "false" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
|
|
||||||
echo "Init diagram is unchanged"
|
|
||||||
fi
|
|
||||||
echo "Starting Stage 3 - Update templates"
|
echo "Starting Stage 3 - Update templates"
|
||||||
CURRENTHASH=$(grep -hs ^ ${TEMPLATED_FILES} | md5sum | cut -c1-8)
|
CURRENTHASH=$(grep -hs ^ ${TEMPLATED_FILES} | md5sum | cut -c1-8)
|
||||||
cd ${TEMPDIR}/docker-${CONTAINER_NAME}
|
cd ${TEMPDIR}/docker-${CONTAINER_NAME}
|
||||||
@ -403,7 +343,7 @@ pipeline {
|
|||||||
mkdir -p ${TEMPDIR}/repo
|
mkdir -p ${TEMPDIR}/repo
|
||||||
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
|
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
|
||||||
cd ${TEMPDIR}/repo/${LS_REPO}
|
cd ${TEMPDIR}/repo/${LS_REPO}
|
||||||
git checkout -f master
|
git checkout -f develop
|
||||||
cd ${TEMPDIR}/docker-${CONTAINER_NAME}
|
cd ${TEMPDIR}/docker-${CONTAINER_NAME}
|
||||||
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/workflows
|
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/workflows
|
||||||
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/ISSUE_TEMPLATE
|
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/ISSUE_TEMPLATE
|
||||||
@ -416,8 +356,8 @@ pipeline {
|
|||||||
fi
|
fi
|
||||||
git add readme-vars.yml ${TEMPLATED_FILES}
|
git add readme-vars.yml ${TEMPLATED_FILES}
|
||||||
git commit -m 'Bot Updating Templated Files'
|
git commit -m 'Bot Updating Templated Files'
|
||||||
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git master
|
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git develop
|
||||||
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git master
|
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git develop
|
||||||
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
|
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
|
||||||
echo "Updating templates and exiting build, new one will trigger based on commit"
|
echo "Updating templates and exiting build, new one will trigger based on commit"
|
||||||
rm -Rf ${TEMPDIR}
|
rm -Rf ${TEMPDIR}
|
||||||
@ -484,7 +424,7 @@ pipeline {
|
|||||||
// Exit the build if the Templated files were just updated
|
// Exit the build if the Templated files were just updated
|
||||||
stage('Template-exit') {
|
stage('Template-exit') {
|
||||||
when {
|
when {
|
||||||
branch "master"
|
branch "develop"
|
||||||
environment name: 'CHANGE_ID', value: ''
|
environment name: 'CHANGE_ID', value: ''
|
||||||
environment name: 'FILES_UPDATED', value: 'true'
|
environment name: 'FILES_UPDATED', value: 'true'
|
||||||
expression {
|
expression {
|
||||||
@ -497,10 +437,10 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// If this is a master build check the S6 service file perms
|
// If this is a develop build check the S6 service file perms
|
||||||
stage("Check S6 Service file Permissions"){
|
stage("Check S6 Service file Permissions"){
|
||||||
when {
|
when {
|
||||||
branch "master"
|
branch "develop"
|
||||||
environment name: 'CHANGE_ID', value: ''
|
environment name: 'CHANGE_ID', value: ''
|
||||||
environment name: 'EXIT_STATUS', value: ''
|
environment name: 'EXIT_STATUS', value: ''
|
||||||
}
|
}
|
||||||
@ -567,47 +507,10 @@ pipeline {
|
|||||||
--label \"org.opencontainers.image.licenses=GPL-3.0-only\" \
|
--label \"org.opencontainers.image.licenses=GPL-3.0-only\" \
|
||||||
--label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \
|
--label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \
|
||||||
--label \"org.opencontainers.image.title=Kasm\" \
|
--label \"org.opencontainers.image.title=Kasm\" \
|
||||||
--label \"org.opencontainers.image.description=[Kasm](https://www.kasmweb.com/?utm_campaign=LinuxServer&utm_source=listing) Workspaces is a docker container streaming platform for delivering browser-based access to desktops, applications, and web services. Kasm uses devops-enabled Containerized Desktop Infrastructure (CDI) to create on-demand, disposable, docker containers that are accessible via web browser. Example use-cases include Remote Browser Isolation (RBI), Data Loss Prevention (DLP), Desktop as a Service (DaaS), Secure Remote Access Services (RAS), and Open Source Intelligence (OSINT) collections. The rendering of the graphical-based containers is powered by the open-source project [KasmVNC](https://www.kasmweb.com/kasmvnc.html?utm_campaign=LinuxServer&utm_source=kasmvnc). \" \
|
--label \"org.opencontainers.image.description=kasm image by linuxserver.io\" \
|
||||||
--no-cache --pull -t ${IMAGE}:${META_TAG} --platform=linux/amd64 \
|
--no-cache --pull -t ${IMAGE}:${META_TAG} --platform=linux/amd64 \
|
||||||
--provenance=true --sbom=true --builder=container --load \
|
--provenance=false --sbom=false \
|
||||||
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
|
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
|
||||||
sh '''#! /bin/bash
|
|
||||||
set -e
|
|
||||||
IFS=',' read -ra CACHE <<< "$BUILDCACHE"
|
|
||||||
for i in "${CACHE[@]}"; do
|
|
||||||
docker tag ${IMAGE}:${META_TAG} ${i}:amd64-${COMMIT_SHA}-${BUILD_NUMBER}
|
|
||||||
done
|
|
||||||
'''
|
|
||||||
withCredentials([
|
|
||||||
[
|
|
||||||
$class: 'UsernamePasswordMultiBinding',
|
|
||||||
credentialsId: 'Quay.io-Robot',
|
|
||||||
usernameVariable: 'QUAYUSER',
|
|
||||||
passwordVariable: 'QUAYPASS'
|
|
||||||
]
|
|
||||||
]) {
|
|
||||||
retry_backoff(5,5) {
|
|
||||||
sh '''#! /bin/bash
|
|
||||||
set -e
|
|
||||||
echo $DOCKERHUB_TOKEN | docker login -u linuxserverci --password-stdin
|
|
||||||
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
|
|
||||||
echo $GITLAB_TOKEN | docker login registry.gitlab.com -u LinuxServer.io --password-stdin
|
|
||||||
echo $QUAYPASS | docker login quay.io -u $QUAYUSER --password-stdin
|
|
||||||
|
|
||||||
if [[ "${PACKAGE_CHECK}" != "true" ]]; then
|
|
||||||
declare -A pids
|
|
||||||
IFS=',' read -ra CACHE <<< "$BUILDCACHE"
|
|
||||||
for i in "${CACHE[@]}"; do
|
|
||||||
docker push ${i}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} &
|
|
||||||
pids[$!]="$i"
|
|
||||||
done
|
|
||||||
for p in "${!pids[@]}"; do
|
|
||||||
wait "$p" || { [[ "${pids[$p]}" != *"quay.io"* ]] && exit 1; }
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
'''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Build MultiArch Docker containers for push to LS Repo
|
// Build MultiArch Docker containers for push to LS Repo
|
||||||
@ -636,47 +539,10 @@ pipeline {
|
|||||||
--label \"org.opencontainers.image.licenses=GPL-3.0-only\" \
|
--label \"org.opencontainers.image.licenses=GPL-3.0-only\" \
|
||||||
--label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \
|
--label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \
|
||||||
--label \"org.opencontainers.image.title=Kasm\" \
|
--label \"org.opencontainers.image.title=Kasm\" \
|
||||||
--label \"org.opencontainers.image.description=[Kasm](https://www.kasmweb.com/?utm_campaign=LinuxServer&utm_source=listing) Workspaces is a docker container streaming platform for delivering browser-based access to desktops, applications, and web services. Kasm uses devops-enabled Containerized Desktop Infrastructure (CDI) to create on-demand, disposable, docker containers that are accessible via web browser. Example use-cases include Remote Browser Isolation (RBI), Data Loss Prevention (DLP), Desktop as a Service (DaaS), Secure Remote Access Services (RAS), and Open Source Intelligence (OSINT) collections. The rendering of the graphical-based containers is powered by the open-source project [KasmVNC](https://www.kasmweb.com/kasmvnc.html?utm_campaign=LinuxServer&utm_source=kasmvnc). \" \
|
--label \"org.opencontainers.image.description=kasm image by linuxserver.io\" \
|
||||||
--no-cache --pull -t ${IMAGE}:amd64-${META_TAG} --platform=linux/amd64 \
|
--no-cache --pull -t ${IMAGE}:amd64-${META_TAG} --platform=linux/amd64 \
|
||||||
--provenance=true --sbom=true --builder=container --load \
|
--provenance=false --sbom=false \
|
||||||
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
|
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
|
||||||
sh '''#! /bin/bash
|
|
||||||
set -e
|
|
||||||
IFS=',' read -ra CACHE <<< "$BUILDCACHE"
|
|
||||||
for i in "${CACHE[@]}"; do
|
|
||||||
docker tag ${IMAGE}:amd64-${META_TAG} ${i}:amd64-${COMMIT_SHA}-${BUILD_NUMBER}
|
|
||||||
done
|
|
||||||
'''
|
|
||||||
withCredentials([
|
|
||||||
[
|
|
||||||
$class: 'UsernamePasswordMultiBinding',
|
|
||||||
credentialsId: 'Quay.io-Robot',
|
|
||||||
usernameVariable: 'QUAYUSER',
|
|
||||||
passwordVariable: 'QUAYPASS'
|
|
||||||
]
|
|
||||||
]) {
|
|
||||||
retry_backoff(5,5) {
|
|
||||||
sh '''#! /bin/bash
|
|
||||||
set -e
|
|
||||||
echo $DOCKERHUB_TOKEN | docker login -u linuxserverci --password-stdin
|
|
||||||
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
|
|
||||||
echo $GITLAB_TOKEN | docker login registry.gitlab.com -u LinuxServer.io --password-stdin
|
|
||||||
echo $QUAYPASS | docker login quay.io -u $QUAYUSER --password-stdin
|
|
||||||
|
|
||||||
if [[ "${PACKAGE_CHECK}" != "true" ]]; then
|
|
||||||
declare -A pids
|
|
||||||
IFS=',' read -ra CACHE <<< "$BUILDCACHE"
|
|
||||||
for i in "${CACHE[@]}"; do
|
|
||||||
docker push ${i}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} &
|
|
||||||
pids[$!]="$i"
|
|
||||||
done
|
|
||||||
for p in "${!pids[@]}"; do
|
|
||||||
wait "$p" || { [[ "${pids[$p]}" != *"quay.io"* ]] && exit 1; }
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
'''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Build ARM64') {
|
stage('Build ARM64') {
|
||||||
@ -685,6 +551,10 @@ pipeline {
|
|||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
echo "Running on node: ${NODE_NAME}"
|
echo "Running on node: ${NODE_NAME}"
|
||||||
|
echo 'Logging into Github'
|
||||||
|
sh '''#! /bin/bash
|
||||||
|
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
|
||||||
|
'''
|
||||||
sh "sed -r -i 's|(^FROM .*)|\\1\\n\\nENV LSIO_FIRST_PARTY=true|g' Dockerfile.aarch64"
|
sh "sed -r -i 's|(^FROM .*)|\\1\\n\\nENV LSIO_FIRST_PARTY=true|g' Dockerfile.aarch64"
|
||||||
sh "docker buildx build \
|
sh "docker buildx build \
|
||||||
--label \"org.opencontainers.image.created=${GITHUB_DATE}\" \
|
--label \"org.opencontainers.image.created=${GITHUB_DATE}\" \
|
||||||
@ -698,54 +568,20 @@ pipeline {
|
|||||||
--label \"org.opencontainers.image.licenses=GPL-3.0-only\" \
|
--label \"org.opencontainers.image.licenses=GPL-3.0-only\" \
|
||||||
--label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \
|
--label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \
|
||||||
--label \"org.opencontainers.image.title=Kasm\" \
|
--label \"org.opencontainers.image.title=Kasm\" \
|
||||||
--label \"org.opencontainers.image.description=[Kasm](https://www.kasmweb.com/?utm_campaign=LinuxServer&utm_source=listing) Workspaces is a docker container streaming platform for delivering browser-based access to desktops, applications, and web services. Kasm uses devops-enabled Containerized Desktop Infrastructure (CDI) to create on-demand, disposable, docker containers that are accessible via web browser. Example use-cases include Remote Browser Isolation (RBI), Data Loss Prevention (DLP), Desktop as a Service (DaaS), Secure Remote Access Services (RAS), and Open Source Intelligence (OSINT) collections. The rendering of the graphical-based containers is powered by the open-source project [KasmVNC](https://www.kasmweb.com/kasmvnc.html?utm_campaign=LinuxServer&utm_source=kasmvnc). \" \
|
--label \"org.opencontainers.image.description=kasm image by linuxserver.io\" \
|
||||||
--no-cache --pull -f Dockerfile.aarch64 -t ${IMAGE}:arm64v8-${META_TAG} --platform=linux/arm64 \
|
--no-cache --pull -f Dockerfile.aarch64 -t ${IMAGE}:arm64v8-${META_TAG} --platform=linux/arm64 \
|
||||||
--provenance=true --sbom=true --builder=container --load \
|
--provenance=false --sbom=false \
|
||||||
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
|
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
|
||||||
sh '''#! /bin/bash
|
sh "docker tag ${IMAGE}:arm64v8-${META_TAG} ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}"
|
||||||
set -e
|
retry_backoff(5,5) {
|
||||||
IFS=',' read -ra CACHE <<< "$BUILDCACHE"
|
sh "docker push ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}"
|
||||||
for i in "${CACHE[@]}"; do
|
|
||||||
docker tag ${IMAGE}:arm64v8-${META_TAG} ${i}:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}
|
|
||||||
done
|
|
||||||
'''
|
|
||||||
withCredentials([
|
|
||||||
[
|
|
||||||
$class: 'UsernamePasswordMultiBinding',
|
|
||||||
credentialsId: 'Quay.io-Robot',
|
|
||||||
usernameVariable: 'QUAYUSER',
|
|
||||||
passwordVariable: 'QUAYPASS'
|
|
||||||
]
|
|
||||||
]) {
|
|
||||||
retry_backoff(5,5) {
|
|
||||||
sh '''#! /bin/bash
|
|
||||||
set -e
|
|
||||||
echo $DOCKERHUB_TOKEN | docker login -u linuxserverci --password-stdin
|
|
||||||
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
|
|
||||||
echo $GITLAB_TOKEN | docker login registry.gitlab.com -u LinuxServer.io --password-stdin
|
|
||||||
echo $QUAYPASS | docker login quay.io -u $QUAYUSER --password-stdin
|
|
||||||
if [[ "${PACKAGE_CHECK}" != "true" ]]; then
|
|
||||||
declare -A pids
|
|
||||||
IFS=',' read -ra CACHE <<< "$BUILDCACHE"
|
|
||||||
for i in "${CACHE[@]}"; do
|
|
||||||
docker push ${i}:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} &
|
|
||||||
pids[$!]="$i"
|
|
||||||
done
|
|
||||||
for p in "${!pids[@]}"; do
|
|
||||||
wait "$p" || { [[ "${pids[$p]}" != *"quay.io"* ]] && exit 1; }
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
'''
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
sh '''#! /bin/bash
|
sh '''#! /bin/bash
|
||||||
containers=$(docker ps -aq)
|
containers=$(docker ps -aq)
|
||||||
if [[ -n "${containers}" ]]; then
|
if [[ -n "${containers}" ]]; then
|
||||||
docker stop ${containers}
|
docker stop ${containers}
|
||||||
fi
|
fi
|
||||||
docker system prune -f --volumes || :
|
docker system prune -af --volumes || : '''
|
||||||
docker image prune -af || :
|
|
||||||
'''
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -753,7 +589,7 @@ pipeline {
|
|||||||
// Take the image we just built and dump package versions for comparison
|
// Take the image we just built and dump package versions for comparison
|
||||||
stage('Update-packages') {
|
stage('Update-packages') {
|
||||||
when {
|
when {
|
||||||
branch "master"
|
branch "develop"
|
||||||
environment name: 'CHANGE_ID', value: ''
|
environment name: 'CHANGE_ID', value: ''
|
||||||
environment name: 'EXIT_STATUS', value: ''
|
environment name: 'EXIT_STATUS', value: ''
|
||||||
}
|
}
|
||||||
@ -770,20 +606,20 @@ pipeline {
|
|||||||
docker run --rm \
|
docker run --rm \
|
||||||
-v /var/run/docker.sock:/var/run/docker.sock:ro \
|
-v /var/run/docker.sock:/var/run/docker.sock:ro \
|
||||||
-v ${TEMPDIR}:/tmp \
|
-v ${TEMPDIR}:/tmp \
|
||||||
ghcr.io/anchore/syft:${SYFT_IMAGE_TAG} \
|
ghcr.io/anchore/syft:latest \
|
||||||
${LOCAL_CONTAINER} -o table=/tmp/package_versions.txt
|
${LOCAL_CONTAINER} -o table=/tmp/package_versions.txt
|
||||||
NEW_PACKAGE_TAG=$(md5sum ${TEMPDIR}/package_versions.txt | cut -c1-8 )
|
NEW_PACKAGE_TAG=$(md5sum ${TEMPDIR}/package_versions.txt | cut -c1-8 )
|
||||||
echo "Package tag sha from current packages in buit container is ${NEW_PACKAGE_TAG} comparing to old ${PACKAGE_TAG} from github"
|
echo "Package tag sha from current packages in buit container is ${NEW_PACKAGE_TAG} comparing to old ${PACKAGE_TAG} from github"
|
||||||
if [ "${NEW_PACKAGE_TAG}" != "${PACKAGE_TAG}" ]; then
|
if [ "${NEW_PACKAGE_TAG}" != "${PACKAGE_TAG}" ]; then
|
||||||
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/${LS_REPO}
|
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/${LS_REPO}
|
||||||
git --git-dir ${TEMPDIR}/${LS_REPO}/.git checkout -f master
|
git --git-dir ${TEMPDIR}/${LS_REPO}/.git checkout -f develop
|
||||||
cp ${TEMPDIR}/package_versions.txt ${TEMPDIR}/${LS_REPO}/
|
cp ${TEMPDIR}/package_versions.txt ${TEMPDIR}/${LS_REPO}/
|
||||||
cd ${TEMPDIR}/${LS_REPO}/
|
cd ${TEMPDIR}/${LS_REPO}/
|
||||||
wait
|
wait
|
||||||
git add package_versions.txt
|
git add package_versions.txt
|
||||||
git commit -m 'Bot Updating Package Versions'
|
git commit -m 'Bot Updating Package Versions'
|
||||||
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git master
|
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git develop
|
||||||
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git master
|
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git develop
|
||||||
echo "true" > /tmp/packages-${COMMIT_SHA}-${BUILD_NUMBER}
|
echo "true" > /tmp/packages-${COMMIT_SHA}-${BUILD_NUMBER}
|
||||||
echo "Package tag updated, stopping build process"
|
echo "Package tag updated, stopping build process"
|
||||||
else
|
else
|
||||||
@ -801,7 +637,7 @@ pipeline {
|
|||||||
// Exit the build if the package file was just updated
|
// Exit the build if the package file was just updated
|
||||||
stage('PACKAGE-exit') {
|
stage('PACKAGE-exit') {
|
||||||
when {
|
when {
|
||||||
branch "master"
|
branch "develop"
|
||||||
environment name: 'CHANGE_ID', value: ''
|
environment name: 'CHANGE_ID', value: ''
|
||||||
environment name: 'PACKAGE_UPDATED', value: 'true'
|
environment name: 'PACKAGE_UPDATED', value: 'true'
|
||||||
environment name: 'EXIT_STATUS', value: ''
|
environment name: 'EXIT_STATUS', value: ''
|
||||||
@ -815,7 +651,7 @@ pipeline {
|
|||||||
// Exit the build if this is just a package check and there are no changes to push
|
// Exit the build if this is just a package check and there are no changes to push
|
||||||
stage('PACKAGECHECK-exit') {
|
stage('PACKAGECHECK-exit') {
|
||||||
when {
|
when {
|
||||||
branch "master"
|
branch "develop"
|
||||||
environment name: 'CHANGE_ID', value: ''
|
environment name: 'CHANGE_ID', value: ''
|
||||||
environment name: 'PACKAGE_UPDATED', value: 'false'
|
environment name: 'PACKAGE_UPDATED', value: 'false'
|
||||||
environment name: 'EXIT_STATUS', value: ''
|
environment name: 'EXIT_STATUS', value: ''
|
||||||
@ -857,7 +693,7 @@ pipeline {
|
|||||||
CI_DOCKERENV="LSIO_FIRST_PARTY=true"
|
CI_DOCKERENV="LSIO_FIRST_PARTY=true"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
docker pull ghcr.io/linuxserver/ci:${CITEST_IMAGETAG}
|
docker pull ghcr.io/linuxserver/ci:latest
|
||||||
if [ "${MULTIARCH}" == "true" ]; then
|
if [ "${MULTIARCH}" == "true" ]; then
|
||||||
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} --platform=arm64
|
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} --platform=arm64
|
||||||
docker tag ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm64v8-${META_TAG}
|
docker tag ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm64v8-${META_TAG}
|
||||||
@ -869,7 +705,7 @@ pipeline {
|
|||||||
-e DOCKER_LOGS_TIMEOUT=\"${CI_DELAY}\" \
|
-e DOCKER_LOGS_TIMEOUT=\"${CI_DELAY}\" \
|
||||||
-e TAGS=\"${CI_TAGS}\" \
|
-e TAGS=\"${CI_TAGS}\" \
|
||||||
-e META_TAG=\"${META_TAG}\" \
|
-e META_TAG=\"${META_TAG}\" \
|
||||||
-e RELEASE_TAG=\"latest\" \
|
-e RELEASE_TAG=\"develop\" \
|
||||||
-e PORT=\"${CI_PORT}\" \
|
-e PORT=\"${CI_PORT}\" \
|
||||||
-e SSL=\"${CI_SSL}\" \
|
-e SSL=\"${CI_SSL}\" \
|
||||||
-e BASE=\"${DIST_IMAGE}\" \
|
-e BASE=\"${DIST_IMAGE}\" \
|
||||||
@ -880,10 +716,7 @@ pipeline {
|
|||||||
-e WEB_AUTH=\"${CI_AUTH}\" \
|
-e WEB_AUTH=\"${CI_AUTH}\" \
|
||||||
-e WEB_PATH=\"${CI_WEBPATH}\" \
|
-e WEB_PATH=\"${CI_WEBPATH}\" \
|
||||||
-e NODE_NAME=\"${NODE_NAME}\" \
|
-e NODE_NAME=\"${NODE_NAME}\" \
|
||||||
-e SYFT_IMAGE_TAG=\"${CI_SYFT_IMAGE_TAG:-${SYFT_IMAGE_TAG}}\" \
|
-t ghcr.io/linuxserver/ci:latest \
|
||||||
-e COMMIT_SHA=\"${COMMIT_SHA}\" \
|
|
||||||
-e BUILD_NUMBER=\"${BUILD_NUMBER}\" \
|
|
||||||
-t ghcr.io/linuxserver/ci:${CITEST_IMAGETAG} \
|
|
||||||
python3 test_build.py'''
|
python3 test_build.py'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -898,25 +731,37 @@ pipeline {
|
|||||||
environment name: 'EXIT_STATUS', value: ''
|
environment name: 'EXIT_STATUS', value: ''
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
retry_backoff(5,5) {
|
withCredentials([
|
||||||
sh '''#! /bin/bash
|
[
|
||||||
set -e
|
$class: 'UsernamePasswordMultiBinding',
|
||||||
for PUSHIMAGE in "${IMAGE}" "${GITLABIMAGE}" "${GITHUBIMAGE}" "${QUAYIMAGE}"; do
|
credentialsId: 'Quay.io-Robot',
|
||||||
[[ ${PUSHIMAGE%%/*} =~ \\. ]] && PUSHIMAGEPLUS="${PUSHIMAGE}" || PUSHIMAGEPLUS="docker.io/${PUSHIMAGE}"
|
usernameVariable: 'QUAYUSER',
|
||||||
IFS=',' read -ra CACHE <<< "$BUILDCACHE"
|
passwordVariable: 'QUAYPASS'
|
||||||
for i in "${CACHE[@]}"; do
|
]
|
||||||
if [[ "${PUSHIMAGEPLUS}" == "$(cut -d "/" -f1 <<< ${i})"* ]]; then
|
]) {
|
||||||
CACHEIMAGE=${i}
|
retry_backoff(5,5) {
|
||||||
fi
|
sh '''#! /bin/bash
|
||||||
|
set -e
|
||||||
|
echo $DOCKERHUB_TOKEN | docker login -u linuxserverci --password-stdin
|
||||||
|
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
|
||||||
|
echo $GITLAB_TOKEN | docker login registry.gitlab.com -u LinuxServer.io --password-stdin
|
||||||
|
echo $QUAYPASS | docker login quay.io -u $QUAYUSER --password-stdin
|
||||||
|
for PUSHIMAGE in "${GITHUBIMAGE}" "${GITLABIMAGE}" "${QUAYIMAGE}" "${IMAGE}"; do
|
||||||
|
docker tag ${IMAGE}:${META_TAG} ${PUSHIMAGE}:${META_TAG}
|
||||||
|
docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:develop
|
||||||
|
docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:${EXT_RELEASE_TAG}
|
||||||
|
if [ -n "${SEMVER}" ]; then
|
||||||
|
docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:${SEMVER}
|
||||||
|
fi
|
||||||
|
docker push ${PUSHIMAGE}:develop
|
||||||
|
docker push ${PUSHIMAGE}:${META_TAG}
|
||||||
|
docker push ${PUSHIMAGE}:${EXT_RELEASE_TAG}
|
||||||
|
if [ -n "${SEMVER}" ]; then
|
||||||
|
docker push ${PUSHIMAGE}:${SEMVER}
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
docker buildx imagetools create --prefer-index=false -t ${PUSHIMAGE}:${META_TAG} -t ${PUSHIMAGE}:latest -t ${PUSHIMAGE}:${EXT_RELEASE_TAG} ${CACHEIMAGE}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} || \
|
'''
|
||||||
{ if [[ "${PUSHIMAGE}" != "${QUAYIMAGE}" ]]; then exit 1; fi; }
|
}
|
||||||
if [ -n "${SEMVER}" ]; then
|
|
||||||
docker buildx imagetools create --prefer-index=false -t ${PUSHIMAGE}:${SEMVER} ${CACHEIMAGE}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} || \
|
|
||||||
{ if [[ "${PUSHIMAGE}" != "${QUAYIMAGE}" ]]; then exit 1; fi; }
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
'''
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -927,48 +772,64 @@ pipeline {
|
|||||||
environment name: 'EXIT_STATUS', value: ''
|
environment name: 'EXIT_STATUS', value: ''
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
retry_backoff(5,5) {
|
withCredentials([
|
||||||
sh '''#! /bin/bash
|
[
|
||||||
set -e
|
$class: 'UsernamePasswordMultiBinding',
|
||||||
for MANIFESTIMAGE in "${IMAGE}" "${GITLABIMAGE}" "${GITHUBIMAGE}" "${QUAYIMAGE}"; do
|
credentialsId: 'Quay.io-Robot',
|
||||||
[[ ${MANIFESTIMAGE%%/*} =~ \\. ]] && MANIFESTIMAGEPLUS="${MANIFESTIMAGE}" || MANIFESTIMAGEPLUS="docker.io/${MANIFESTIMAGE}"
|
usernameVariable: 'QUAYUSER',
|
||||||
IFS=',' read -ra CACHE <<< "$BUILDCACHE"
|
passwordVariable: 'QUAYPASS'
|
||||||
for i in "${CACHE[@]}"; do
|
]
|
||||||
if [[ "${MANIFESTIMAGEPLUS}" == "$(cut -d "/" -f1 <<< ${i})"* ]]; then
|
]) {
|
||||||
CACHEIMAGE=${i}
|
retry_backoff(5,5) {
|
||||||
fi
|
sh '''#! /bin/bash
|
||||||
|
set -e
|
||||||
|
echo $DOCKERHUB_TOKEN | docker login -u linuxserverci --password-stdin
|
||||||
|
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
|
||||||
|
echo $GITLAB_TOKEN | docker login registry.gitlab.com -u LinuxServer.io --password-stdin
|
||||||
|
echo $QUAYPASS | docker login quay.io -u $QUAYUSER --password-stdin
|
||||||
|
if [ "${CI}" == "false" ]; then
|
||||||
|
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} --platform=arm64
|
||||||
|
docker tag ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm64v8-${META_TAG}
|
||||||
|
fi
|
||||||
|
for MANIFESTIMAGE in "${IMAGE}" "${GITLABIMAGE}" "${GITHUBIMAGE}" "${QUAYIMAGE}"; do
|
||||||
|
docker tag ${IMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG}
|
||||||
|
docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-develop
|
||||||
|
docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG}
|
||||||
|
docker tag ${IMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG}
|
||||||
|
docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-develop
|
||||||
|
docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
|
||||||
|
if [ -n "${SEMVER}" ]; then
|
||||||
|
docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${SEMVER}
|
||||||
|
docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${SEMVER}
|
||||||
|
fi
|
||||||
|
docker push ${MANIFESTIMAGE}:amd64-${META_TAG}
|
||||||
|
docker push ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG}
|
||||||
|
docker push ${MANIFESTIMAGE}:amd64-develop
|
||||||
|
docker push ${MANIFESTIMAGE}:arm64v8-${META_TAG}
|
||||||
|
docker push ${MANIFESTIMAGE}:arm64v8-develop
|
||||||
|
docker push ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
|
||||||
|
if [ -n "${SEMVER}" ]; then
|
||||||
|
docker push ${MANIFESTIMAGE}:amd64-${SEMVER}
|
||||||
|
docker push ${MANIFESTIMAGE}:arm64v8-${SEMVER}
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
docker buildx imagetools create --prefer-index=false -t ${MANIFESTIMAGE}:amd64-${META_TAG} -t ${MANIFESTIMAGE}:amd64-latest -t ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG} ${CACHEIMAGE}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} || \
|
for MANIFESTIMAGE in "${IMAGE}" "${GITLABIMAGE}" "${GITHUBIMAGE}" "${QUAYIMAGE}"; do
|
||||||
{ if [[ "${MANIFESTIMAGE}" != "${QUAYIMAGE}" ]]; then exit 1; fi; }
|
docker buildx imagetools create -t ${MANIFESTIMAGE}:develop ${MANIFESTIMAGE}:amd64-develop ${MANIFESTIMAGE}:arm64v8-develop
|
||||||
docker buildx imagetools create --prefer-index=false -t ${MANIFESTIMAGE}:arm64v8-${META_TAG} -t ${MANIFESTIMAGE}:arm64v8-latest -t ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG} ${CACHEIMAGE}:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} || \
|
docker buildx imagetools create -t ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG}
|
||||||
{ if [[ "${MANIFESTIMAGE}" != "${QUAYIMAGE}" ]]; then exit 1; fi; }
|
docker buildx imagetools create -t ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
|
||||||
if [ -n "${SEMVER}" ]; then
|
if [ -n "${SEMVER}" ]; then
|
||||||
docker buildx imagetools create --prefer-index=false -t ${MANIFESTIMAGE}:amd64-${SEMVER} ${CACHEIMAGE}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} || \
|
docker buildx imagetools create -t ${MANIFESTIMAGE}:${SEMVER} ${MANIFESTIMAGE}:amd64-${SEMVER} ${MANIFESTIMAGE}:arm64v8-${SEMVER}
|
||||||
{ if [[ "${MANIFESTIMAGE}" != "${QUAYIMAGE}" ]]; then exit 1; fi; }
|
fi
|
||||||
docker buildx imagetools create --prefer-index=false -t ${MANIFESTIMAGE}:arm64v8-${SEMVER} ${CACHEIMAGE}:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} || \
|
done
|
||||||
{ if [[ "${MANIFESTIMAGE}" != "${QUAYIMAGE}" ]]; then exit 1; fi; }
|
'''
|
||||||
fi
|
}
|
||||||
done
|
|
||||||
for MANIFESTIMAGE in "${IMAGE}" "${GITLABIMAGE}" "${GITHUBIMAGE}" "${QUAYIMAGE}"; do
|
|
||||||
docker buildx imagetools create -t ${MANIFESTIMAGE}:latest ${MANIFESTIMAGE}:amd64-latest ${MANIFESTIMAGE}:arm64v8-latest || \
|
|
||||||
{ if [[ "${MANIFESTIMAGE}" != "${QUAYIMAGE}" ]]; then exit 1; fi; }
|
|
||||||
docker buildx imagetools create -t ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG} || \
|
|
||||||
{ if [[ "${MANIFESTIMAGE}" != "${QUAYIMAGE}" ]]; then exit 1; fi; }
|
|
||||||
docker buildx imagetools create -t ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG} || \
|
|
||||||
{ if [[ "${MANIFESTIMAGE}" != "${QUAYIMAGE}" ]]; then exit 1; fi; }
|
|
||||||
if [ -n "${SEMVER}" ]; then
|
|
||||||
docker buildx imagetools create -t ${MANIFESTIMAGE}:${SEMVER} ${MANIFESTIMAGE}:amd64-${SEMVER} ${MANIFESTIMAGE}:arm64v8-${SEMVER} || \
|
|
||||||
{ if [[ "${MANIFESTIMAGE}" != "${QUAYIMAGE}" ]]; then exit 1; fi; }
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
'''
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// If this is a public release tag it in the LS Github
|
// If this is a public release tag it in the LS Github
|
||||||
stage('Github-Tag-Push-Release') {
|
stage('Github-Tag-Push-Release') {
|
||||||
when {
|
when {
|
||||||
branch "master"
|
branch "develop"
|
||||||
expression {
|
expression {
|
||||||
env.LS_RELEASE != env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
env.LS_RELEASE != env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
||||||
}
|
}
|
||||||
@ -976,54 +837,36 @@ pipeline {
|
|||||||
environment name: 'EXIT_STATUS', value: ''
|
environment name: 'EXIT_STATUS', value: ''
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
|
echo "Pushing New tag for current commit ${META_TAG}"
|
||||||
|
sh '''curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \
|
||||||
|
-d '{"tag":"'${META_TAG}'",\
|
||||||
|
"object": "'${COMMIT_SHA}'",\
|
||||||
|
"message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to develop",\
|
||||||
|
"type": "commit",\
|
||||||
|
"tagger": {"name": "LinuxServer-CI","email": "ci@linuxserver.io","date": "'${GITHUB_DATE}'"}}' '''
|
||||||
|
echo "Pushing New release for Tag"
|
||||||
sh '''#! /bin/bash
|
sh '''#! /bin/bash
|
||||||
echo "Auto-generating release notes"
|
echo "Updating to ${EXT_RELEASE_CLEAN}" > releasebody.json
|
||||||
if [ "$(git tag --points-at HEAD)" != "" ]; then
|
echo '{"tag_name":"'${META_TAG}'",\
|
||||||
echo "Existing tag points to current commit, suggesting no new LS changes"
|
"target_commitish": "develop",\
|
||||||
AUTO_RELEASE_NOTES="No changes"
|
"name": "'${META_TAG}'",\
|
||||||
else
|
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**Remote Changes:**\\n\\n' > start
|
||||||
AUTO_RELEASE_NOTES=$(curl -fsL -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github+json" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases/generate-notes \
|
printf '","draft": false,"prerelease": true}' >> releasebody.json
|
||||||
-d '{"tag_name":"'${META_TAG}'",\
|
paste -d'\\0' start releasebody.json > releasebody.json.done
|
||||||
"target_commitish": "master"}' \
|
curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done'''
|
||||||
| jq -r '.body' | sed 's|## What.s Changed||')
|
|
||||||
fi
|
|
||||||
echo "Pushing New tag for current commit ${META_TAG}"
|
|
||||||
curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \
|
|
||||||
-d '{"tag":"'${META_TAG}'",\
|
|
||||||
"object": "'${COMMIT_SHA}'",\
|
|
||||||
"message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to master",\
|
|
||||||
"type": "commit",\
|
|
||||||
"tagger": {"name": "LinuxServer-CI","email": "ci@linuxserver.io","date": "'${GITHUB_DATE}'"}}'
|
|
||||||
echo "Pushing New release for Tag"
|
|
||||||
curl -H "Authorization: token ${GITHUB_TOKEN}" -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq -r '. |.body' > releasebody.json
|
|
||||||
jq -n \
|
|
||||||
--arg tag_name "$META_TAG" \
|
|
||||||
--arg target_commitish "master" \
|
|
||||||
--arg ci_url "${CI_URL:-N/A}" \
|
|
||||||
--arg ls_notes "$AUTO_RELEASE_NOTES" \
|
|
||||||
--arg remote_notes "$(cat releasebody.json)" \
|
|
||||||
'{
|
|
||||||
"tag_name": $tag_name,
|
|
||||||
"target_commitish": $target_commitish,
|
|
||||||
"name": $tag_name,
|
|
||||||
"body": ("**CI Report:**\\n\\n" + $ci_url + "\\n\\n**LinuxServer Changes:**\\n\\n" + $ls_notes + "\\n\\n**Remote Changes:**\\n\\n" + $remote_notes),
|
|
||||||
"draft": false,
|
|
||||||
"prerelease": false }' > releasebody.json.done
|
|
||||||
curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done
|
|
||||||
'''
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Add protection to the release branch
|
// Add protection to the release branch
|
||||||
stage('Github-Release-Branch-Protection') {
|
stage('Github-Release-Branch-Protection') {
|
||||||
when {
|
when {
|
||||||
branch "master"
|
branch "develop"
|
||||||
environment name: 'CHANGE_ID', value: ''
|
environment name: 'CHANGE_ID', value: ''
|
||||||
environment name: 'EXIT_STATUS', value: ''
|
environment name: 'EXIT_STATUS', value: ''
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
echo "Setting up protection for release branch master"
|
echo "Setting up protection for release branch develop"
|
||||||
sh '''#! /bin/bash
|
sh '''#! /bin/bash
|
||||||
curl -H "Authorization: token ${GITHUB_TOKEN}" -X PUT https://api.github.com/repos/${LS_USER}/${LS_REPO}/branches/master/protection \
|
curl -H "Authorization: token ${GITHUB_TOKEN}" -X PUT https://api.github.com/repos/${LS_USER}/${LS_REPO}/branches/develop/protection \
|
||||||
-d $(jq -c . << EOF
|
-d $(jq -c . << EOF
|
||||||
{
|
{
|
||||||
"required_status_checks": null,
|
"required_status_checks": null,
|
||||||
@ -1185,22 +1028,12 @@ EOF
|
|||||||
}
|
}
|
||||||
cleanup {
|
cleanup {
|
||||||
sh '''#! /bin/bash
|
sh '''#! /bin/bash
|
||||||
echo "Pruning builder!!"
|
echo "Performing docker system prune!!"
|
||||||
docker builder prune -f --builder container || :
|
containers=$(docker ps -aq)
|
||||||
containers=$(docker ps -q)
|
|
||||||
if [[ -n "${containers}" ]]; then
|
if [[ -n "${containers}" ]]; then
|
||||||
BUILDX_CONTAINER_ID=$(docker ps -qf 'name=buildx_buildkit')
|
docker stop ${containers}
|
||||||
for container in ${containers}; do
|
|
||||||
if [[ "${container}" == "${BUILDX_CONTAINER_ID}" ]]; then
|
|
||||||
echo "skipping buildx container in docker stop"
|
|
||||||
else
|
|
||||||
echo "Stopping container ${container}"
|
|
||||||
docker stop ${container}
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
fi
|
||||||
docker system prune -f --volumes || :
|
docker system prune -af --volumes || :
|
||||||
docker image prune -af || :
|
|
||||||
'''
|
'''
|
||||||
cleanWs()
|
cleanWs()
|
||||||
}
|
}
|
||||||
|
|||||||
330
README.md
330
README.md
@ -1,329 +1,3 @@
|
|||||||
<!-- DO NOT EDIT THIS FILE MANUALLY -->
|
<!-- DO NOT EDIT THIS FILE MANUALLY -->
|
||||||
<!-- Please read https://github.com/linuxserver/docker-kasm/blob/master/.github/CONTRIBUTING.md -->
|
<!-- Please read https://github.com/linuxserver/docker-kasm/blob/develop/.github/CONTRIBUTING.md -->
|
||||||
[](https://linuxserver.io)
|
Up to date documentation is available [here](https://github.com/linuxserver/docker-kasm/blob/master/README.md).
|
||||||
|
|
||||||
[](https://blog.linuxserver.io "all the things you can do with our containers including How-To guides, opinions and much more!")
|
|
||||||
[](https://linuxserver.io/discord "realtime support / chat with the community and the team.")
|
|
||||||
[](https://discourse.linuxserver.io "post on our community forum.")
|
|
||||||
[](https://github.com/linuxserver "view the source for all of our repositories.")
|
|
||||||
[](https://opencollective.com/linuxserver "please consider helping us by either donating or contributing to our budget")
|
|
||||||
|
|
||||||
The [LinuxServer.io](https://linuxserver.io) team brings you another container release featuring:
|
|
||||||
|
|
||||||
* regular and timely application updates
|
|
||||||
* easy user mappings (PGID, PUID)
|
|
||||||
* custom base image with s6 overlay
|
|
||||||
* weekly base OS updates with common layers across the entire LinuxServer.io ecosystem to minimise space usage, down time and bandwidth
|
|
||||||
* regular security updates
|
|
||||||
|
|
||||||
Find us at:
|
|
||||||
|
|
||||||
* [Blog](https://blog.linuxserver.io) - all the things you can do with our containers including How-To guides, opinions and much more!
|
|
||||||
* [Discord](https://linuxserver.io/discord) - realtime support / chat with the community and the team.
|
|
||||||
* [Discourse](https://discourse.linuxserver.io) - post on our community forum.
|
|
||||||
* [GitHub](https://github.com/linuxserver) - view the source for all of our repositories.
|
|
||||||
* [Open Collective](https://opencollective.com/linuxserver) - please consider helping us by either donating or contributing to our budget
|
|
||||||
|
|
||||||
# [linuxserver/kasm](https://github.com/linuxserver/docker-kasm)
|
|
||||||
|
|
||||||
[](https://scarf.sh)
|
|
||||||
[](https://github.com/linuxserver/docker-kasm)
|
|
||||||
[](https://github.com/linuxserver/docker-kasm/releases)
|
|
||||||
[](https://github.com/linuxserver/docker-kasm/packages)
|
|
||||||
[](https://gitlab.com/linuxserver.io/docker-kasm/container_registry)
|
|
||||||
[](https://quay.io/repository/linuxserver.io/kasm)
|
|
||||||
[](https://hub.docker.com/r/linuxserver/kasm)
|
|
||||||
[](https://hub.docker.com/r/linuxserver/kasm)
|
|
||||||
[](https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-kasm/job/master/)
|
|
||||||
[](https://ci-tests.linuxserver.io/linuxserver/kasm/latest/index.html)
|
|
||||||
|
|
||||||
[Kasm](https://www.kasmweb.com/?utm_campaign=LinuxServer&utm_source=listing) Workspaces is a docker container streaming platform for delivering browser-based access to desktops, applications, and web services. Kasm uses devops-enabled Containerized Desktop Infrastructure (CDI) to create on-demand, disposable, docker containers that are accessible via web browser. Example use-cases include Remote Browser Isolation (RBI), Data Loss Prevention (DLP), Desktop as a Service (DaaS), Secure Remote Access Services (RAS), and Open Source Intelligence (OSINT) collections.
|
|
||||||
|
|
||||||
The rendering of the graphical-based containers is powered by the open-source project [KasmVNC](https://www.kasmweb.com/kasmvnc.html?utm_campaign=LinuxServer&utm_source=kasmvnc).
|
|
||||||
|
|
||||||
[](https://www.kasmweb.com/?utm_campaign=LinuxServer&utm_source=listing)
|
|
||||||
|
|
||||||
## Supported Architectures
|
|
||||||
|
|
||||||
We utilise the docker manifest for multi-platform awareness. More information is available from docker [here](https://distribution.github.io/distribution/spec/manifest-v2-2/#manifest-list) and our announcement [here](https://blog.linuxserver.io/2019/02/21/the-lsio-pipeline-project/).
|
|
||||||
|
|
||||||
Simply pulling `lscr.io/linuxserver/kasm:latest` should retrieve the correct image for your arch, but you can also pull specific arch images via tags.
|
|
||||||
|
|
||||||
The architectures supported by this image are:
|
|
||||||
|
|
||||||
| Architecture | Available | Tag |
|
|
||||||
| :----: | :----: | ---- |
|
|
||||||
| x86-64 | ✅ | amd64-\<version tag\> |
|
|
||||||
| arm64 | ✅ | arm64v8-\<version tag\> |
|
|
||||||
|
|
||||||
## Application Setup
|
|
||||||
|
|
||||||
This container uses [Docker in Docker](https://www.docker.com/blog/docker-can-now-run-within-docker/) and requires being run in `privileged` mode. This container also requires an initial setup that runs on port 3000.
|
|
||||||
|
|
||||||
**Unlike other containers the web interface port (default 443) needs to be set for the env variable `KASM_PORT` and both the inside and outside port IE for 4443 `KASM_PORT=4443` `-p 4443:4443`**
|
|
||||||
|
|
||||||
**Unraid users due to the DinD storage layer `/opt/` should be mounted directly to a disk IE `/mnt/disk1/appdata/path` or optimally with a cache disk at `/mnt/cache/appdata/path`**
|
|
||||||
|
|
||||||
Access the installation wizard at https://`your ip`:3000 and follow the instructions there. Once setup is complete access https://`your ip`:443 and login with the credentials you entered during setup. The default users are:
|
|
||||||
|
|
||||||
* admin@kasm.local
|
|
||||||
* user@kasm.local
|
|
||||||
|
|
||||||
Currently Synology systems are not supported due to them blocking CPU scheduling in their Kernel.
|
|
||||||
|
|
||||||
### Updating KASM
|
|
||||||
|
|
||||||
In order to update kasm, first make sure you are using the latest docker image, and then perform the in app update in the admin panel. Docker image update and recreation of container alone won't update kasm.
|
|
||||||
|
|
||||||
### GPU Support
|
|
||||||
|
|
||||||
During installation an option will be presented to force all Workspace containers to mount in and use a specific GPU. If using an NVIDIA GPU you will need to pass `-e NVIDIA_VISIBLE_DEVICES=all` or `--gpus all` and have the [NVIDIA Container Runtime](https://github.com/NVIDIA/nvidia-container-runtime) installed on the host. Also if using NVIDIA, Kasm Workspaces has [native NVIDIA support](https://www.kasmweb.com/docs/latest/how_to/gpu.html) so you can optionally opt to simply use that instead of he manual override during installation.
|
|
||||||
|
|
||||||
### Gamepad support
|
|
||||||
|
|
||||||
In order to properly create virtual Gamepads you will need to mount from your host `/dev/input` and `/run/udev/data`. Please see [HERE](https://www.kasmweb.com/docs/develop/guide/gamepad_passthrough.html) for instructions on enabling gamepad support.
|
|
||||||
|
|
||||||
### Persistant profiles
|
|
||||||
|
|
||||||
In order to use persistant profiles in Workspaces you will need to mount in a folder to use from your host to `/profiles`. From there when configuring a workspace you can set the `Persistant Profile Path` to IE `/profiles/ubuntu-focal/{username}/`, more infomation can be found [HERE](https://www.kasmweb.com/docs/latest/how_to/persistent_profiles.html).
|
|
||||||
|
|
||||||
### Reverse proxy
|
|
||||||
|
|
||||||
A sample for [SWAG](https://github.com/linuxserver/docker-swag) can be found [here](https://raw.githubusercontent.com/linuxserver/reverse-proxy-confs/master/kasm.subdomain.conf.sample). Post installation you will need to modify the "Proxy Port" setting under the default zone to 0 as outlined [here](https://www.kasmweb.com/docs/latest/how_to/reverse_proxy.html#update-zones) to launch Workspaces sessions.
|
|
||||||
|
|
||||||
### Strict reverse proxies
|
|
||||||
|
|
||||||
This image uses a self-signed certificate by default. This naturally means the scheme is `https`.
|
|
||||||
If you are using a reverse proxy which validates certificates, you need to [disable this check for the container](https://docs.linuxserver.io/faq#strict-proxy).
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
To help you get started creating a container from this image you can either use docker-compose or the docker cli.
|
|
||||||
|
|
||||||
>[!NOTE]
|
|
||||||
>Unless a parameter is flagged as 'optional', it is *mandatory* and a value must be provided.
|
|
||||||
|
|
||||||
### docker-compose (recommended, [click here for more info](https://docs.linuxserver.io/general/docker-compose))
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
---
|
|
||||||
services:
|
|
||||||
kasm:
|
|
||||||
image: lscr.io/linuxserver/kasm:latest
|
|
||||||
container_name: kasm
|
|
||||||
privileged: true
|
|
||||||
security_opt:
|
|
||||||
- apparmor:rootlesskit #optional
|
|
||||||
environment:
|
|
||||||
- KASM_PORT=443
|
|
||||||
- DOCKER_HUB_USERNAME=USER #optional
|
|
||||||
- DOCKER_HUB_PASSWORD=PASS #optional
|
|
||||||
- DOCKER_MTU=1500 #optional
|
|
||||||
volumes:
|
|
||||||
- /path/to/kasm/data:/opt
|
|
||||||
- /path/to/kasm/profiles:/profiles #optional
|
|
||||||
- /dev/input:/dev/input #optional
|
|
||||||
- /run/udev/data:/run/udev/data #optional
|
|
||||||
ports:
|
|
||||||
- 3000:3000
|
|
||||||
- 443:443
|
|
||||||
restart: unless-stopped
|
|
||||||
```
|
|
||||||
|
|
||||||
### docker cli ([click here for more info](https://docs.docker.com/engine/reference/commandline/cli/))
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker run -d \
|
|
||||||
--name=kasm \
|
|
||||||
--privileged \
|
|
||||||
--security-opt apparmor=rootlesskit `#optional` \
|
|
||||||
-e KASM_PORT=443 \
|
|
||||||
-e DOCKER_HUB_USERNAME=USER `#optional` \
|
|
||||||
-e DOCKER_HUB_PASSWORD=PASS `#optional` \
|
|
||||||
-e DOCKER_MTU=1500 `#optional` \
|
|
||||||
-p 3000:3000 \
|
|
||||||
-p 443:443 \
|
|
||||||
-v /path/to/kasm/data:/opt \
|
|
||||||
-v /path/to/kasm/profiles:/profiles `#optional` \
|
|
||||||
-v /dev/input:/dev/input `#optional` \
|
|
||||||
-v /run/udev/data:/run/udev/data `#optional` \
|
|
||||||
--restart unless-stopped \
|
|
||||||
lscr.io/linuxserver/kasm:latest
|
|
||||||
```
|
|
||||||
|
|
||||||
## Parameters
|
|
||||||
|
|
||||||
Containers are configured using parameters passed at runtime (such as those above). These parameters are separated by a colon and indicate `<external>:<internal>` respectively. For example, `-p 8080:80` would expose port `80` from inside the container to be accessible from the host's IP on port `8080` outside the container.
|
|
||||||
|
|
||||||
| Parameter | Function |
|
|
||||||
| :----: | --- |
|
|
||||||
| `-p 3000:3000` | Kasm Installation wizard. (https) |
|
|
||||||
| `-p 443:443` | Kasm Workspaces interface. (https) |
|
|
||||||
| `-e KASM_PORT=443` | Specify the port you bind to the outside for Kasm Workspaces. |
|
|
||||||
| `-e DOCKER_HUB_USERNAME=USER` | Optionally specify a DockerHub Username to pull private images. |
|
|
||||||
| `-e DOCKER_HUB_PASSWORD=PASS` | Optionally specify a DockerHub password to pull private images. |
|
|
||||||
| `-e DOCKER_MTU=1500` | Optionally specify the mtu options passed to dockerd. |
|
|
||||||
| `-v /opt` | Docker and installation storage. |
|
|
||||||
| `-v /profiles` | Optionally specify a path for persistent profile storage. |
|
|
||||||
| `-v /dev/input` | Optional for gamepad support. |
|
|
||||||
| `-v /run/udev/data` | Optional for gamepad support. |
|
|
||||||
| `--security-opt apparmor=rootlesskit` | Some hosts require this on top of privileged for namespacing to work properly inside the DinD layer. |
|
|
||||||
|
|
||||||
## Environment variables from files (Docker secrets)
|
|
||||||
|
|
||||||
You can set any environment variable from a file by using a special prepend `FILE__`.
|
|
||||||
|
|
||||||
As an example:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
-e FILE__MYVAR=/run/secrets/mysecretvariable
|
|
||||||
```
|
|
||||||
|
|
||||||
Will set the environment variable `MYVAR` based on the contents of the `/run/secrets/mysecretvariable` file.
|
|
||||||
|
|
||||||
## Umask for running applications
|
|
||||||
|
|
||||||
For all of our images we provide the ability to override the default umask settings for services started within the containers using the optional `-e UMASK=022` setting.
|
|
||||||
Keep in mind umask is not chmod it subtracts from permissions based on it's value it does not add. Please read up [here](https://en.wikipedia.org/wiki/Umask) before asking for support.
|
|
||||||
|
|
||||||
## Docker Mods
|
|
||||||
|
|
||||||
[](https://mods.linuxserver.io/?mod=kasm "view available mods for this container.") [](https://mods.linuxserver.io/?mod=universal "view available universal mods.")
|
|
||||||
|
|
||||||
We publish various [Docker Mods](https://github.com/linuxserver/docker-mods) to enable additional functionality within the containers. The list of Mods available for this image (if any) as well as universal mods that can be applied to any one of our images can be accessed via the dynamic badges above.
|
|
||||||
|
|
||||||
## Support Info
|
|
||||||
|
|
||||||
* Shell access whilst the container is running:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker exec -it kasm /bin/bash
|
|
||||||
```
|
|
||||||
|
|
||||||
* To monitor the logs of the container in realtime:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker logs -f kasm
|
|
||||||
```
|
|
||||||
|
|
||||||
* Container version number:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker inspect -f '{{ index .Config.Labels "build_version" }}' kasm
|
|
||||||
```
|
|
||||||
|
|
||||||
* Image version number:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker inspect -f '{{ index .Config.Labels "build_version" }}' lscr.io/linuxserver/kasm:latest
|
|
||||||
```
|
|
||||||
|
|
||||||
## Updating Info
|
|
||||||
|
|
||||||
Most of our images are static, versioned, and require an image update and container recreation to update the app inside. With some exceptions (noted in the relevant readme.md), we do not recommend or support updating apps inside the container. Please consult the [Application Setup](#application-setup) section above to see if it is recommended for the image.
|
|
||||||
|
|
||||||
Below are the instructions for updating containers:
|
|
||||||
|
|
||||||
### Via Docker Compose
|
|
||||||
|
|
||||||
* Update images:
|
|
||||||
* All images:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker-compose pull
|
|
||||||
```
|
|
||||||
|
|
||||||
* Single image:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker-compose pull kasm
|
|
||||||
```
|
|
||||||
|
|
||||||
* Update containers:
|
|
||||||
* All containers:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker-compose up -d
|
|
||||||
```
|
|
||||||
|
|
||||||
* Single container:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker-compose up -d kasm
|
|
||||||
```
|
|
||||||
|
|
||||||
* You can also remove the old dangling images:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker image prune
|
|
||||||
```
|
|
||||||
|
|
||||||
### Via Docker Run
|
|
||||||
|
|
||||||
* Update the image:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker pull lscr.io/linuxserver/kasm:latest
|
|
||||||
```
|
|
||||||
|
|
||||||
* Stop the running container:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker stop kasm
|
|
||||||
```
|
|
||||||
|
|
||||||
* Delete the container:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker rm kasm
|
|
||||||
```
|
|
||||||
|
|
||||||
* Recreate a new container with the same docker run parameters as instructed above (if mapped correctly to a host folder, your `/config` folder and settings will be preserved)
|
|
||||||
* You can also remove the old dangling images:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker image prune
|
|
||||||
```
|
|
||||||
|
|
||||||
### Image Update Notifications - Diun (Docker Image Update Notifier)
|
|
||||||
|
|
||||||
>[!TIP]
|
|
||||||
>We recommend [Diun](https://crazymax.dev/diun/) for update notifications. Other tools that automatically update containers unattended are not recommended or supported.
|
|
||||||
|
|
||||||
## Building locally
|
|
||||||
|
|
||||||
If you want to make local modifications to these images for development purposes or just to customize the logic:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git clone https://github.com/linuxserver/docker-kasm.git
|
|
||||||
cd docker-kasm
|
|
||||||
docker build \
|
|
||||||
--no-cache \
|
|
||||||
--pull \
|
|
||||||
-t lscr.io/linuxserver/kasm:latest .
|
|
||||||
```
|
|
||||||
|
|
||||||
The ARM variants can be built on x86_64 hardware and vice versa using `lscr.io/linuxserver/qemu-static`
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker run --rm --privileged lscr.io/linuxserver/qemu-static --reset
|
|
||||||
```
|
|
||||||
|
|
||||||
Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64`.
|
|
||||||
|
|
||||||
## Versions
|
|
||||||
|
|
||||||
* **13.11.25:** - Pin docker to v28 to avoid API deprecation issues.
|
|
||||||
* **22.10.25:** - Update for 1.18.0 release.
|
|
||||||
* **08.06.25:** - Deprecate develop branch.
|
|
||||||
* **03.06.25:** - Rebase to Ubuntu Noble. Update for 1.17.0 release.
|
|
||||||
* **09.11.24:** - Update base image for 1.16.1 release.
|
|
||||||
* **24.09.24:** - Add base users in docker build logic to survive container upgrades.
|
|
||||||
* **17.09.24:** - Update base image for 1.16.0 release and fix Nvidia support.
|
|
||||||
* **16.02.24:** - Update base image for 1.15.0 release.
|
|
||||||
* **22.08.23:** - Update base image for 1.14.0 release.
|
|
||||||
* **07.04.23:** - Add mod layer for ingesting LSIO images for 1.13.0 release.
|
|
||||||
* **28.03.23:** - Pin compose to 2.5.0 to be in sync with upstream requirements.
|
|
||||||
* **05.11.22:** - Rebase to Jammy, add support for GPUs, add support for Gamepads.
|
|
||||||
* **23.09.22:** - Migrate to s6v3.
|
|
||||||
* **02.07.22:** - Initial Release.
|
|
||||||
|
|||||||
@ -2,13 +2,13 @@
|
|||||||
|
|
||||||
# jenkins variables
|
# jenkins variables
|
||||||
project_name: docker-kasm
|
project_name: docker-kasm
|
||||||
external_type: github_stable
|
external_type: na
|
||||||
release_type: stable
|
custom_version_command: "curl -sX GET https://kasm-ci.s3.amazonaws.com/dev-version.txt"
|
||||||
release_tag: latest
|
release_type: prerelease
|
||||||
ls_branch: master
|
release_tag: develop
|
||||||
|
ls_branch: develop
|
||||||
|
build_armhf: false
|
||||||
repo_vars:
|
repo_vars:
|
||||||
- EXT_USER = 'kasmtech'
|
|
||||||
- EXT_REPO = 'kasm-install-wizard'
|
|
||||||
- BUILD_VERSION_ARG = 'KASM_VERSION'
|
- BUILD_VERSION_ARG = 'KASM_VERSION'
|
||||||
- LS_USER = 'linuxserver'
|
- LS_USER = 'linuxserver'
|
||||||
- LS_REPO = 'docker-kasm'
|
- LS_REPO = 'docker-kasm'
|
||||||
@ -23,6 +23,6 @@ repo_vars:
|
|||||||
- CI_PORT='3000'
|
- CI_PORT='3000'
|
||||||
- CI_SSL='true'
|
- CI_SSL='true'
|
||||||
- CI_DELAY='120'
|
- CI_DELAY='120'
|
||||||
- CI_DOCKERENV=''
|
- CI_DOCKERENV='TEST=true'
|
||||||
- CI_AUTH=''
|
- CI_AUTH='user:password'
|
||||||
- CI_WEBPATH=''
|
- CI_WEBPATH=''
|
||||||
|
|||||||
1849
package_versions.txt
1849
package_versions.txt
File diff suppressed because it is too large
Load Diff
146
readme-vars.yml
146
readme-vars.yml
@ -1,142 +1,8 @@
|
|||||||
|
---
|
||||||
|
|
||||||
# project information
|
# project information
|
||||||
project_name: kasm
|
project_name: kasm
|
||||||
project_url: "https://www.kasmweb.com/?utm_campaign=LinuxServer&utm_source=listing"
|
full_custom_readme: |
|
||||||
project_logo: "https://kasm-ci.s3.amazonaws.com/kasm_wide.png"
|
{% raw -%}
|
||||||
project_blurb: |
|
Up to date documentation is available [here](https://github.com/linuxserver/docker-kasm/blob/master/README.md).
|
||||||
[{{ project_name|capitalize }}]({{ project_url }}) Workspaces is a docker container streaming platform for delivering browser-based access to desktops, applications, and web services. Kasm uses devops-enabled Containerized Desktop Infrastructure (CDI) to create on-demand, disposable, docker containers that are accessible via web browser. Example use-cases include Remote Browser Isolation (RBI), Data Loss Prevention (DLP), Desktop as a Service (DaaS), Secure Remote Access Services (RAS), and Open Source Intelligence (OSINT) collections.
|
{%- endraw %}
|
||||||
|
|
||||||
The rendering of the graphical-based containers is powered by the open-source project [KasmVNC](https://www.kasmweb.com/kasmvnc.html?utm_campaign=LinuxServer&utm_source=kasmvnc).
|
|
||||||
project_lsio_github_repo_url: "https://github.com/linuxserver/docker-{{ project_name }}"
|
|
||||||
project_categories: "Remote Desktop,Business"
|
|
||||||
# supported architectures
|
|
||||||
available_architectures:
|
|
||||||
- {arch: "{{ arch_x86_64 }}", tag: "amd64-latest"}
|
|
||||||
- {arch: "{{ arch_arm64 }}", tag: "arm64v8-latest"}
|
|
||||||
# development version
|
|
||||||
development_versions: false
|
|
||||||
# container parameters
|
|
||||||
common_param_env_vars_enabled: false
|
|
||||||
param_container_name: "{{ project_name }}"
|
|
||||||
param_usage_include_net: false
|
|
||||||
param_usage_include_env: true
|
|
||||||
param_env_vars:
|
|
||||||
- {env_var: "KASM_PORT", env_value: "443", desc: "Specify the port you bind to the outside for Kasm Workspaces."}
|
|
||||||
param_usage_include_vols: true
|
|
||||||
param_volumes:
|
|
||||||
- {vol_path: "/opt", vol_host_path: "/path/to/{{ project_name }}/data", desc: "Docker and installation storage."}
|
|
||||||
param_usage_include_ports: true
|
|
||||||
param_ports:
|
|
||||||
- {external_port: "3000", internal_port: "3000", port_desc: "Kasm Installation wizard. (https)"}
|
|
||||||
- {external_port: "443", internal_port: "443", port_desc: "Kasm Workspaces interface. (https)"}
|
|
||||||
# optional container parameters
|
|
||||||
opt_param_usage_include_env: true
|
|
||||||
opt_param_env_vars:
|
|
||||||
- {env_var: "DOCKER_HUB_USERNAME", env_value: "USER", desc: "Optionally specify a DockerHub Username to pull private images."}
|
|
||||||
- {env_var: "DOCKER_HUB_PASSWORD", env_value: "PASS", desc: "Optionally specify a DockerHub password to pull private images."}
|
|
||||||
- {env_var: "DOCKER_MTU", env_value: "1500", desc: "Optionally specify the mtu options passed to dockerd."}
|
|
||||||
opt_param_usage_include_vols: true
|
|
||||||
opt_param_volumes:
|
|
||||||
- {vol_path: "/profiles", vol_host_path: "/path/to/{{ project_name }}/profiles", desc: "Optionally specify a path for persistent profile storage."}
|
|
||||||
- {vol_path: "/dev/input", vol_host_path: "/dev/input", desc: "Optional for gamepad support."}
|
|
||||||
- {vol_path: "/run/udev/data", vol_host_path: "/run/udev/data", desc: "Optional for gamepad support."}
|
|
||||||
opt_security_opt_param: true
|
|
||||||
opt_security_opt_param_vars:
|
|
||||||
- {run_var: "apparmor=rootlesskit", compose_var: "apparmor:rootlesskit", desc: "Some hosts require this on top of privileged for namespacing to work properly inside the DinD layer."}
|
|
||||||
unraid_template: false
|
|
||||||
privileged: true
|
|
||||||
# application setup block
|
|
||||||
app_setup_block_enabled: true
|
|
||||||
app_setup_block: |
|
|
||||||
This container uses [Docker in Docker](https://www.docker.com/blog/docker-can-now-run-within-docker/) and requires being run in `privileged` mode. This container also requires an initial setup that runs on port 3000.
|
|
||||||
|
|
||||||
**Unlike other containers the web interface port (default 443) needs to be set for the env variable `KASM_PORT` and both the inside and outside port IE for 4443 `KASM_PORT=4443` `-p 4443:4443`**
|
|
||||||
|
|
||||||
**Unraid users due to the DinD storage layer `/opt/` should be mounted directly to a disk IE `/mnt/disk1/appdata/path` or optimally with a cache disk at `/mnt/cache/appdata/path`**
|
|
||||||
|
|
||||||
Access the installation wizard at https://`your ip`:3000 and follow the instructions there. Once setup is complete access https://`your ip`:443 and login with the credentials you entered during setup. The default users are:
|
|
||||||
|
|
||||||
* admin@kasm.local
|
|
||||||
* user@kasm.local
|
|
||||||
|
|
||||||
Currently Synology systems are not supported due to them blocking CPU scheduling in their Kernel.
|
|
||||||
|
|
||||||
### Updating KASM
|
|
||||||
|
|
||||||
In order to update kasm, first make sure you are using the latest docker image, and then perform the in app update in the admin panel. Docker image update and recreation of container alone won't update kasm.
|
|
||||||
|
|
||||||
### GPU Support
|
|
||||||
|
|
||||||
During installation an option will be presented to force all Workspace containers to mount in and use a specific GPU. If using an NVIDIA GPU you will need to pass `-e NVIDIA_VISIBLE_DEVICES=all` or `--gpus all` and have the [NVIDIA Container Runtime](https://github.com/NVIDIA/nvidia-container-runtime) installed on the host. Also if using NVIDIA, Kasm Workspaces has [native NVIDIA support](https://www.kasmweb.com/docs/latest/how_to/gpu.html) so you can optionally opt to simply use that instead of he manual override during installation.
|
|
||||||
|
|
||||||
### Gamepad support
|
|
||||||
|
|
||||||
In order to properly create virtual Gamepads you will need to mount from your host `/dev/input` and `/run/udev/data`. Please see [HERE](https://www.kasmweb.com/docs/develop/guide/gamepad_passthrough.html) for instructions on enabling gamepad support.
|
|
||||||
|
|
||||||
### Persistant profiles
|
|
||||||
|
|
||||||
In order to use persistant profiles in Workspaces you will need to mount in a folder to use from your host to `/profiles`. From there when configuring a workspace you can set the `Persistant Profile Path` to IE `/profiles/ubuntu-focal/{username}/`, more infomation can be found [HERE](https://www.kasmweb.com/docs/latest/how_to/persistent_profiles.html).
|
|
||||||
|
|
||||||
### Reverse proxy
|
|
||||||
|
|
||||||
A sample for [SWAG](https://github.com/linuxserver/docker-swag) can be found [here](https://raw.githubusercontent.com/linuxserver/reverse-proxy-confs/master/kasm.subdomain.conf.sample). Post installation you will need to modify the "Proxy Port" setting under the default zone to 0 as outlined [here](https://www.kasmweb.com/docs/latest/how_to/reverse_proxy.html#update-zones) to launch Workspaces sessions.
|
|
||||||
# init diagram
|
|
||||||
init_diagram: |
|
|
||||||
"kasm:latest": {
|
|
||||||
docker-mods
|
|
||||||
base {
|
|
||||||
fix-attr +\nlegacy cont-init
|
|
||||||
}
|
|
||||||
docker-mods -> base
|
|
||||||
legacy-services
|
|
||||||
custom services
|
|
||||||
init-services -> legacy-services
|
|
||||||
init-services -> custom services
|
|
||||||
custom services -> legacy-services
|
|
||||||
legacy-services -> ci-service-check
|
|
||||||
init-migrations -> init-adduser
|
|
||||||
init-os-end -> init-config
|
|
||||||
init-config -> init-config-end
|
|
||||||
init-config-kasm -> init-config-end
|
|
||||||
init-crontab-config -> init-config-end
|
|
||||||
init-config -> init-config-kasm
|
|
||||||
init-config -> init-crontab-config
|
|
||||||
init-mods-end -> init-custom-files
|
|
||||||
init-adduser -> init-device-perms
|
|
||||||
base -> init-envfile
|
|
||||||
base -> init-migrations
|
|
||||||
init-config-end -> init-mods
|
|
||||||
init-mods-package-install -> init-mods-end
|
|
||||||
init-mods -> init-mods-package-install
|
|
||||||
init-adduser -> init-os-end
|
|
||||||
init-device-perms -> init-os-end
|
|
||||||
init-envfile -> init-os-end
|
|
||||||
init-custom-files -> init-services
|
|
||||||
init-services -> svc-cron
|
|
||||||
svc-cron -> legacy-services
|
|
||||||
init-config-kasm -> svc-docker
|
|
||||||
init-services -> svc-docker
|
|
||||||
svc-docker -> legacy-services
|
|
||||||
init-config-kasm -> svc-kasm-wizard
|
|
||||||
init-services -> svc-kasm-wizard
|
|
||||||
svc-kasm-wizard -> legacy-services
|
|
||||||
}
|
|
||||||
Base Images: {
|
|
||||||
"baseimage-ubuntu:noble"
|
|
||||||
}
|
|
||||||
"kasm:latest" <- Base Images
|
|
||||||
# changelog
|
|
||||||
changelogs:
|
|
||||||
- {date: "13.11.25:", desc: "Pin docker to v28 to avoid API deprecation issues."}
|
|
||||||
- {date: "22.10.25:", desc: "Update for 1.18.0 release."}
|
|
||||||
- {date: "08.06.25:", desc: "Deprecate develop branch."}
|
|
||||||
- {date: "03.06.25:", desc: "Rebase to Ubuntu Noble. Update for 1.17.0 release."}
|
|
||||||
- {date: "09.11.24:", desc: "Update base image for 1.16.1 release."}
|
|
||||||
- {date: "24.09.24:", desc: "Add base users in docker build logic to survive container upgrades."}
|
|
||||||
- {date: "17.09.24:", desc: "Update base image for 1.16.0 release and fix Nvidia support."}
|
|
||||||
- {date: "16.02.24:", desc: "Update base image for 1.15.0 release."}
|
|
||||||
- {date: "22.08.23:", desc: "Update base image for 1.14.0 release."}
|
|
||||||
- {date: "07.04.23:", desc: "Add mod layer for ingesting LSIO images for 1.13.0 release."}
|
|
||||||
- {date: "28.03.23:", desc: "Pin compose to 2.5.0 to be in sync with upstream requirements."}
|
|
||||||
- {date: "05.11.22:", desc: "Rebase to Jammy, add support for GPUs, add support for Gamepads."}
|
|
||||||
- {date: "23.09.22:", desc: "Migrate to s6v3."}
|
|
||||||
- {date: "02.07.22:", desc: "Initial Release."}
|
|
||||||
|
|||||||
@ -1,20 +1,17 @@
|
|||||||
#!/usr/bin/with-contenv bash
|
#!/usr/bin/with-contenv bash
|
||||||
|
|
||||||
# Create directories
|
# Create directories
|
||||||
if [[ ! -d "/opt/docker" ]]; then
|
if [ ! -d "/opt/docker" ]; then
|
||||||
mkdir -p /opt/docker
|
mkdir -p /opt/docker
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Workaround for running in a rootless docker environment
|
|
||||||
sed -i '/set -e/d' /etc/init.d/docker
|
|
||||||
|
|
||||||
# Login to Dockerhub
|
# Login to Dockerhub
|
||||||
if [[ -n "${DOCKER_HUB_USERNAME}" ]]; then
|
if [ -n "${DOCKER_HUB_USERNAME}" ]; then
|
||||||
docker login --username "${DOCKER_HUB_USERNAME}" --password "${DOCKER_HUB_PASSWORD}"
|
docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Generate self cert for wizard
|
# Generate self cert for wizard
|
||||||
if [[ ! -f "/opt/kasm/certs/kasm_wizard.crt" ]]; then
|
if [ ! -f "/opt/kasm/certs/kasm_wizard.crt" ]; then
|
||||||
mkdir -p /opt/kasm/certs
|
mkdir -p /opt/kasm/certs
|
||||||
openssl req -x509 -nodes -days 1825 -newkey rsa:2048 \
|
openssl req -x509 -nodes -days 1825 -newkey rsa:2048 \
|
||||||
-keyout /opt/kasm/certs/kasm_wizard.key \
|
-keyout /opt/kasm/certs/kasm_wizard.key \
|
||||||
@ -23,9 +20,9 @@ if [[ ! -f "/opt/kasm/certs/kasm_wizard.crt" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Create plugin directory
|
# Create plugin directory
|
||||||
if [[ ! -L "/var/lib/docker-plugins" ]]; then
|
if [ ! -L "/var/lib/docker-plugins" ]; then
|
||||||
mkdir -p /opt/docker-plugins
|
mkdir -p /opt/docker-plugins
|
||||||
ln -s /opt/docker-plugins /var/lib/docker-plugins
|
ln -s /opt/docker-plugins /var/lib/docker-plugins
|
||||||
mkdir -p /var/lib/docker-plugins/rclone/config
|
mkdir -p /var/lib/docker-plugins/rclone/config
|
||||||
mkdir -p /var/lib/docker-plugins/rclone/cache
|
mkdir -p /var/lib/docker-plugins/rclone/cache
|
||||||
fi
|
fi
|
||||||
|
|||||||
@ -2,16 +2,16 @@
|
|||||||
|
|
||||||
# Wait for docker to be up
|
# Wait for docker to be up
|
||||||
while true; do
|
while true; do
|
||||||
if [[ -S "/var/run/docker.sock" ]]; then
|
if [ -S "/var/run/docker.sock" ]; then
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
|
||||||
# Don't do anything if wizard is disabled
|
# Don't do anything if wizard is disabled
|
||||||
if [[ -f "/opt/NO_WIZARD" ]]; then
|
if [ -f "/opt/NO_WIZARD" ]; then
|
||||||
sleep infinity
|
sleep infinity
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd /wizard || exit 1
|
cd /wizard
|
||||||
/usr/bin/node index.js
|
/usr/bin/node index.js
|
||||||
|
|||||||
@ -116,7 +116,6 @@ if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then
|
|||||||
; then
|
; then
|
||||||
# generate certs and use TLS if requested/possible (default in 19.03+)
|
# generate certs and use TLS if requested/possible (default in 19.03+)
|
||||||
set -- dockerd \
|
set -- dockerd \
|
||||||
--mtu="${DOCKER_MTU:-1500}" \
|
|
||||||
--host="$dockerSocket" \
|
--host="$dockerSocket" \
|
||||||
--host=tcp://0.0.0.0:2376 \
|
--host=tcp://0.0.0.0:2376 \
|
||||||
--tlsverify \
|
--tlsverify \
|
||||||
@ -128,7 +127,6 @@ if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then
|
|||||||
else
|
else
|
||||||
# TLS disabled (-e DOCKER_TLS_CERTDIR='') or missing certs
|
# TLS disabled (-e DOCKER_TLS_CERTDIR='') or missing certs
|
||||||
set -- dockerd \
|
set -- dockerd \
|
||||||
--mtu="${DOCKER_MTU:-1500}" \
|
|
||||||
--host="$dockerSocket" \
|
--host="$dockerSocket" \
|
||||||
"$@"
|
"$@"
|
||||||
DOCKERD_ROOTLESS_ROOTLESSKIT_FLAGS="${DOCKERD_ROOTLESS_ROOTLESSKIT_FLAGS:-} -p 0.0.0.0:2375:2375/tcp"
|
DOCKERD_ROOTLESS_ROOTLESSKIT_FLAGS="${DOCKERD_ROOTLESS_ROOTLESSKIT_FLAGS:-} -p 0.0.0.0:2375:2375/tcp"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user