mirror of
https://github.com/linuxserver/docker-rdesktop.git
synced 2026-02-20 06:16:43 +08:00
Compare commits
81 Commits
master
...
alpine-mat
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7edd2d0efb | ||
|
|
8df568456e | ||
|
|
6c0ab66197 | ||
|
|
a4150932a5 | ||
|
|
6832f58e00 | ||
|
|
5d77918c31 | ||
|
|
49d685cfe5 | ||
|
|
3917847e2e | ||
|
|
9547411ff7 | ||
|
|
8cb6b372b0 | ||
|
|
72cde291d5 | ||
|
|
7bd3ea1481 | ||
|
|
3db26a9a30 | ||
|
|
e0a9224c7b | ||
|
|
e5d21d5069 | ||
|
|
69d04f9f5e | ||
|
|
2d9c88a751 | ||
|
|
15210ba118 | ||
|
|
d7810de927 | ||
|
|
3d55d3b922 | ||
|
|
3403f431a1 | ||
|
|
4f72bf193c | ||
|
|
8eb68aff6c | ||
|
|
4f02a8f587 | ||
|
|
ff84bec8c0 | ||
|
|
c4a7773cff | ||
|
|
4ae438dabc | ||
|
|
9d4e01eba1 | ||
|
|
70f1812663 | ||
|
|
24357226b4 | ||
|
|
12b9233126 | ||
|
|
7324cf29b9 | ||
|
|
4929cf2d25 | ||
|
|
8d9fbffa52 | ||
|
|
bd816bfd93 | ||
|
|
0aa3a10b16 | ||
|
|
a2c5d6e86c | ||
|
|
f788aa08b1 | ||
|
|
aef8386720 | ||
|
|
c2d9234a3a | ||
|
|
66cc336ca8 | ||
|
|
374d045782 | ||
|
|
39a7102809 | ||
|
|
7e984b386a | ||
|
|
420567f6f0 | ||
|
|
5d089066f0 | ||
|
|
017f36ba79 | ||
|
|
c209a2796e | ||
|
|
5f563f96e1 | ||
|
|
e8f6673fc6 | ||
|
|
1f143bc39f | ||
|
|
3b2db67d79 | ||
|
|
ae40a586fd | ||
|
|
77c6f75cef | ||
|
|
8cd0405607 | ||
|
|
45307bec9a | ||
|
|
3d9eab6b1d | ||
|
|
88a30e8087 | ||
|
|
236b86da9a | ||
|
|
d49af22413 | ||
|
|
6c851f6b2c | ||
|
|
cd2e123d2c | ||
|
|
488c6556f8 | ||
|
|
a46c9c5eed | ||
|
|
d096d732f4 | ||
|
|
8581f1831d | ||
|
|
4f94734c65 | ||
|
|
2b8b9d5975 | ||
|
|
9c80100991 | ||
|
|
fb8d947bdd | ||
|
|
259d3632aa | ||
|
|
b3dd766532 | ||
|
|
4c12a1b4ba | ||
|
|
c0c169da45 | ||
|
|
8c459ec37b | ||
|
|
59b2046405 | ||
|
|
2e15cde4e4 | ||
|
|
e958098875 | ||
|
|
75e78fbafb | ||
|
|
6beff271ab | ||
|
|
61c397682f |
0
.editorconfig
Normal file → Executable file
0
.editorconfig
Normal file → Executable file
10
.github/CONTRIBUTING.md
vendored
Normal file → Executable file
10
.github/CONTRIBUTING.md
vendored
Normal file → Executable file
@ -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,7 +24,7 @@
|
|||||||
## 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-rdesktop/edit/master/readme-vars.yml).
|
Instead edit the [readme-vars.yml](https://github.com/linuxserver/docker-rdesktop/edit/alpine-mate/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)
|
Most of these variables are also carried over to [docs.linuxserver.io](https://docs.linuxserver.io)
|
||||||
@ -105,17 +105,17 @@ docker build \
|
|||||||
-t linuxserver/rdesktop:latest .
|
-t linuxserver/rdesktop: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-rdesktop/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-rdesktop/tree/alpine-mate/root), add an entry to the changelog
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
changelogs:
|
changelogs:
|
||||||
|
|||||||
2
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file → Executable file
2
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file → Executable file
@ -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
|
||||||
|
|||||||
68
.github/ISSUE_TEMPLATE/issue.bug.yml
vendored
Normal file → Executable file
68
.github/ISSUE_TEMPLATE/issue.bug.yml
vendored
Normal file → Executable file
@ -4,13 +4,65 @@ description: Create a report to help us improve
|
|||||||
title: "[BUG] <title>"
|
title: "[BUG] <title>"
|
||||||
labels: [Bug]
|
labels: [Bug]
|
||||||
body:
|
body:
|
||||||
- type: markdown
|
- type: checkboxes
|
||||||
attributes:
|
attributes:
|
||||||
|
label: Is there an existing issue for this?
|
||||||
|
description: Please search to see if an issue already exists for the bug you encountered.
|
||||||
|
options:
|
||||||
|
- label: I have searched the existing issues
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Current Behavior
|
||||||
|
description: Tell us what happens instead of the expected behavior.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Expected Behavior
|
||||||
|
description: Tell us what should happen.
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Steps To Reproduce
|
||||||
|
description: Steps to reproduce the behavior.
|
||||||
|
placeholder: |
|
||||||
|
1. In this environment...
|
||||||
|
2. With this config...
|
||||||
|
3. Run '...'
|
||||||
|
4. See error...
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Environment
|
||||||
|
description: |
|
||||||
|
examples:
|
||||||
|
- **OS**: Ubuntu 20.04
|
||||||
|
- **How docker service was installed**: distro's packagemanager
|
||||||
value: |
|
value: |
|
||||||
# DEPRECATION NOTICE
|
- OS:
|
||||||
This image is deprecated. We will not offer support for this image and it will not be updated.
|
- How docker service was installed:
|
||||||
|
render: markdown
|
||||||
|
validations:
|
||||||
Please migrate to an Ubuntu-based tag. For more info, see
|
required: false
|
||||||
https://info.linuxserver.io/issues/2025-08-23-rdesktop/
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Docker creation
|
||||||
|
description: |
|
||||||
|
Command used to create docker container
|
||||||
|
Provide your docker create/run command or compose yaml snippet, or a screenshot of settings if using a gui to create the container
|
||||||
|
render: bash
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
description: |
|
||||||
|
Provide a full docker log, output of "docker logs linuxserver.io"
|
||||||
|
label: Container logs
|
||||||
|
placeholder: |
|
||||||
|
Output of `docker logs linuxserver.io`
|
||||||
|
render: bash
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|||||||
33
.github/ISSUE_TEMPLATE/issue.feature.yml
vendored
Normal file → Executable file
33
.github/ISSUE_TEMPLATE/issue.feature.yml
vendored
Normal file → Executable file
@ -4,13 +4,28 @@ description: Suggest an idea for this project
|
|||||||
title: "[FEAT] <title>"
|
title: "[FEAT] <title>"
|
||||||
labels: [enhancement]
|
labels: [enhancement]
|
||||||
body:
|
body:
|
||||||
- type: markdown
|
- type: checkboxes
|
||||||
attributes:
|
attributes:
|
||||||
value: |
|
label: Is this a new feature request?
|
||||||
# DEPRECATION NOTICE
|
description: Please search to see if a feature request already exists.
|
||||||
This image is deprecated. We will not offer support for this image and it will not be updated.
|
options:
|
||||||
|
- label: I have searched the existing issues
|
||||||
|
required: true
|
||||||
Please migrate to an Ubuntu-based tag. For more info, see
|
- type: textarea
|
||||||
https://info.linuxserver.io/issues/2025-08-23-rdesktop/
|
attributes:
|
||||||
|
label: Wanted change
|
||||||
|
description: Tell us what you want to happen.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Reason for change
|
||||||
|
description: Justify your request, why do you want it, what is the benefit.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Proposed code change
|
||||||
|
description: Do you have a potential code change in mind?
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
|||||||
9
.github/PULL_REQUEST_TEMPLATE.md
vendored
9
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -1,10 +1,3 @@
|
|||||||
# DEPRECATION NOTICE
|
|
||||||
This image is deprecated. We will not offer support for this image and it will not be updated.
|
|
||||||
|
|
||||||
|
|
||||||
Please migrate to an Ubuntu-based tag. For more info, see
|
|
||||||
https://info.linuxserver.io/issues/2025-08-23-rdesktop/
|
|
||||||
|
|
||||||
<!--- Provide a general summary of your changes in the Title above -->
|
<!--- Provide a general summary of your changes in the Title above -->
|
||||||
|
|
||||||
[linuxserverurl]: https://linuxserver.io
|
[linuxserverurl]: https://linuxserver.io
|
||||||
@ -28,7 +21,7 @@ https://info.linuxserver.io/issues/2025-08-23-rdesktop/
|
|||||||
|
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|
||||||
- [ ] I have read the [contributing](https://github.com/linuxserver/docker-rdesktop/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-rdesktop/blob/alpine-mate/.github/CONTRIBUTING.md) guideline and understand that I have made the correct modifications
|
||||||
|
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|
||||||
|
|||||||
16
.github/workflows/call_issue_pr_tracker.yml
vendored
Executable file
16
.github/workflows/call_issue_pr_tracker.yml
vendored
Executable file
@ -0,0 +1,16 @@
|
|||||||
|
name: Issue & PR Tracker
|
||||||
|
|
||||||
|
on:
|
||||||
|
issues:
|
||||||
|
types: [opened,reopened,labeled,unlabeled,closed]
|
||||||
|
pull_request_target:
|
||||||
|
types: [opened,reopened,review_requested,review_request_removed,labeled,unlabeled,closed]
|
||||||
|
pull_request_review:
|
||||||
|
types: [submitted,edited,dismissed]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
manage-project:
|
||||||
|
permissions:
|
||||||
|
issues: write
|
||||||
|
uses: linuxserver/github-workflows/.github/workflows/issue-pr-tracker.yml@v1
|
||||||
|
secrets: inherit
|
||||||
13
.github/workflows/call_issues_cron.yml
vendored
Executable file
13
.github/workflows/call_issues_cron.yml
vendored
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
name: Mark stale issues and pull requests
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '10 17 * * *'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
stale:
|
||||||
|
permissions:
|
||||||
|
issues: write
|
||||||
|
pull-requests: write
|
||||||
|
uses: linuxserver/github-workflows/.github/workflows/issues-cron.yml@v1
|
||||||
|
secrets: inherit
|
||||||
17
.github/workflows/external_trigger.yml
vendored
Executable file
17
.github/workflows/external_trigger.yml
vendored
Executable file
@ -0,0 +1,17 @@
|
|||||||
|
name: External Trigger Main
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
external-trigger-alpine-mate:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3.1.0
|
||||||
|
|
||||||
|
- name: External Trigger
|
||||||
|
if: github.ref == 'refs/heads/alpine-mate'
|
||||||
|
run: |
|
||||||
|
echo "**** No external release, exiting ****"
|
||||||
|
echo "No external release, exiting" >> $GITHUB_STEP_SUMMARY
|
||||||
|
exit 0
|
||||||
45
.github/workflows/external_trigger_scheduler.yml
vendored
Executable file
45
.github/workflows/external_trigger_scheduler.yml
vendored
Executable file
@ -0,0 +1,45 @@
|
|||||||
|
name: External Trigger Scheduler
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '58 * * * *'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
external-trigger-scheduler:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3.1.0
|
||||||
|
with:
|
||||||
|
fetch-depth: '0'
|
||||||
|
|
||||||
|
- name: External Trigger Scheduler
|
||||||
|
run: |
|
||||||
|
echo "**** Branches found: ****"
|
||||||
|
git for-each-ref --format='%(refname:short)' refs/remotes
|
||||||
|
for br in $(git for-each-ref --format='%(refname:short)' refs/remotes)
|
||||||
|
do
|
||||||
|
br=$(echo "$br" | sed 's|origin/||g')
|
||||||
|
echo "**** Evaluating branch ${br} ****"
|
||||||
|
ls_jenkins_vars=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-rdesktop/${br}/jenkins-vars.yml)
|
||||||
|
ls_branch=$(echo "${ls_jenkins_vars}" | yq -r '.ls_branch')
|
||||||
|
ls_trigger=$(echo "${ls_jenkins_vars}" | yq -r '.external_type')
|
||||||
|
if [[ "${br}" == "${ls_branch}" ]] && [[ "${ls_trigger}" != "os" ]]; then
|
||||||
|
echo "**** Branch ${br} appears to be live and trigger is not os; checking workflow. ****"
|
||||||
|
if curl -sfX GET https://raw.githubusercontent.com/linuxserver/docker-rdesktop/${br}/.github/workflows/external_trigger.yml > /dev/null 2>&1; then
|
||||||
|
echo "**** Workflow exists. Triggering external trigger workflow for branch ${br} ****."
|
||||||
|
echo "Triggering external trigger workflow for branch ${br}" >> $GITHUB_STEP_SUMMARY
|
||||||
|
curl -iX POST \
|
||||||
|
-H "Authorization: token ${{ secrets.CR_PAT }}" \
|
||||||
|
-H "Accept: application/vnd.github.v3+json" \
|
||||||
|
-d "{\"ref\":\"refs/heads/${br}\"}" \
|
||||||
|
https://api.github.com/repos/linuxserver/docker-rdesktop/actions/workflows/external_trigger.yml/dispatches
|
||||||
|
else
|
||||||
|
echo "**** Workflow doesn't exist; skipping trigger. ****"
|
||||||
|
echo "Skipping branch ${br} due to no external trigger workflow present." >> $GITHUB_STEP_SUMMARY
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "**** ${br} is either a dev branch, or has no external version; skipping trigger. ****"
|
||||||
|
echo "Skipping branch ${br} due to being detected as dev branch or having no external version." >> $GITHUB_STEP_SUMMARY
|
||||||
|
fi
|
||||||
|
done
|
||||||
8
.github/workflows/greetings.yml
vendored
Normal file → Executable file
8
.github/workflows/greetings.yml
vendored
Normal file → Executable file
@ -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-rdesktop/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-rdesktop/blob/alpine-mate/.github/PULL_REQUEST_TEMPLATE.md)!'
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
42
.github/workflows/package_trigger.yml
vendored
Executable file
42
.github/workflows/package_trigger.yml
vendored
Executable file
@ -0,0 +1,42 @@
|
|||||||
|
name: Package Trigger Main
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
package-trigger-alpine-mate:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3.1.0
|
||||||
|
|
||||||
|
- name: Package Trigger
|
||||||
|
if: github.ref == 'refs/heads/alpine-mate'
|
||||||
|
run: |
|
||||||
|
if [ -n "${{ secrets.PAUSE_PACKAGE_TRIGGER_RDESKTOP_ALPINE_MATE }}" ]; then
|
||||||
|
echo "**** Github secret PAUSE_PACKAGE_TRIGGER_RDESKTOP_ALPINE_MATE is set; skipping trigger. ****"
|
||||||
|
echo "Github secret \`PAUSE_PACKAGE_TRIGGER_RDESKTOP_ALPINE_MATE\` is set; skipping trigger." >> $GITHUB_STEP_SUMMARY
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
if [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-rdesktop/job/alpine-mate/lastBuild/api/json | jq -r '.building') == "true" ]; then
|
||||||
|
echo "**** There already seems to be an active build on Jenkins; skipping package trigger ****"
|
||||||
|
echo "There already seems to be an active build on Jenkins; skipping package trigger" >> $GITHUB_STEP_SUMMARY
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
echo "**** Package trigger running off of alpine-mate branch. To disable, set a Github secret named \"PAUSE_PACKAGE_TRIGGER_RDESKTOP_ALPINE_MATE\". ****"
|
||||||
|
echo "Package trigger running off of alpine-mate branch. To disable, set a Github secret named \`PAUSE_PACKAGE_TRIGGER_RDESKTOP_ALPINE_MATE\`" >> $GITHUB_STEP_SUMMARY
|
||||||
|
response=$(curl -iX POST \
|
||||||
|
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-rdesktop/job/alpine-mate/buildWithParameters?PACKAGE_CHECK=true \
|
||||||
|
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
|
||||||
|
echo "**** Jenkins job queue url: ${response%$'\r'} ****"
|
||||||
|
echo "**** Sleeping 10 seconds until job starts ****"
|
||||||
|
sleep 10
|
||||||
|
buildurl=$(curl -s "${response%$'\r'}api/json" | jq -r '.executable.url')
|
||||||
|
buildurl="${buildurl%$'\r'}"
|
||||||
|
echo "**** Jenkins job build url: ${buildurl} ****"
|
||||||
|
echo "Jenkins job build url: ${buildurl}" >> $GITHUB_STEP_SUMMARY
|
||||||
|
echo "**** Attempting to change the Jenkins job description ****"
|
||||||
|
curl -iX POST \
|
||||||
|
"${buildurl}submitDescription" \
|
||||||
|
--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 "Submit=Submit"
|
||||||
50
.github/workflows/package_trigger_scheduler.yml
vendored
Executable file
50
.github/workflows/package_trigger_scheduler.yml
vendored
Executable file
@ -0,0 +1,50 @@
|
|||||||
|
name: Package Trigger Scheduler
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '9 23 * * 0'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
package-trigger-scheduler:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3.1.0
|
||||||
|
with:
|
||||||
|
fetch-depth: '0'
|
||||||
|
|
||||||
|
- name: Package Trigger Scheduler
|
||||||
|
run: |
|
||||||
|
echo "**** Branches found: ****"
|
||||||
|
git for-each-ref --format='%(refname:short)' refs/remotes
|
||||||
|
for br in $(git for-each-ref --format='%(refname:short)' refs/remotes)
|
||||||
|
do
|
||||||
|
br=$(echo "$br" | sed 's|origin/||g')
|
||||||
|
echo "**** Evaluating branch ${br} ****"
|
||||||
|
ls_branch=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-rdesktop/${br}/jenkins-vars.yml | yq -r '.ls_branch')
|
||||||
|
if [ "${br}" == "${ls_branch}" ]; then
|
||||||
|
echo "**** Branch ${br} appears to be live; checking workflow. ****"
|
||||||
|
if curl -sfX GET https://raw.githubusercontent.com/linuxserver/docker-rdesktop/${br}/.github/workflows/package_trigger.yml > /dev/null 2>&1; then
|
||||||
|
echo "**** Workflow exists. Triggering package trigger workflow for branch ${br}. ****"
|
||||||
|
echo "Triggering package trigger workflow for branch ${br}" >> $GITHUB_STEP_SUMMARY
|
||||||
|
triggered_branches="${triggered_branches}${br} "
|
||||||
|
curl -iX POST \
|
||||||
|
-H "Authorization: token ${{ secrets.CR_PAT }}" \
|
||||||
|
-H "Accept: application/vnd.github.v3+json" \
|
||||||
|
-d "{\"ref\":\"refs/heads/${br}\"}" \
|
||||||
|
https://api.github.com/repos/linuxserver/docker-rdesktop/actions/workflows/package_trigger.yml/dispatches
|
||||||
|
sleep 30
|
||||||
|
else
|
||||||
|
echo "**** Workflow doesn't exist; skipping trigger. ****"
|
||||||
|
echo "Skipping branch ${br} due to no package trigger workflow present." >> $GITHUB_STEP_SUMMARY
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "**** ${br} appears to be a dev branch; skipping trigger. ****"
|
||||||
|
echo "Skipping branch ${br} due to being detected as dev branch." >> $GITHUB_STEP_SUMMARY
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
echo "**** Package check build(s) triggered for branch(es): ${triggered_branches} ****"
|
||||||
|
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,
|
||||||
|
"description": "**Package Check Build(s) Triggered for rdesktop** \n**Branch(es):** '"${triggered_branches}"' \n**Build URL:** '"https://ci.linuxserver.io/blue/organizations/jenkins/Docker-Pipeline-Builders%2Fdocker-rdesktop/activity/"' \n"}],
|
||||||
|
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
|
||||||
2
.github/workflows/permissions.yml
vendored
Normal file → Executable file
2
.github/workflows/permissions.yml
vendored
Normal file → Executable file
@ -5,8 +5,6 @@ on:
|
|||||||
- '**/run'
|
- '**/run'
|
||||||
- '**/finish'
|
- '**/finish'
|
||||||
- '**/check'
|
- '**/check'
|
||||||
- 'root/migrations/*'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
permission_check:
|
permission_check:
|
||||||
uses: linuxserver/github-workflows/.github/workflows/init-svc-executable-permissions.yml@v1
|
uses: linuxserver/github-workflows/.github/workflows/init-svc-executable-permissions.yml@v1
|
||||||
|
|||||||
36
Dockerfile
36
Dockerfile
@ -1,33 +1,31 @@
|
|||||||
FROM ghcr.io/linuxserver/baseimage-rdesktop:alpine320
|
FROM ghcr.io/linuxserver/baseimage-rdesktop:3.18
|
||||||
|
|
||||||
# set version label
|
# set version label
|
||||||
ARG BUILD_DATE
|
ARG BUILD_DATE
|
||||||
ARG VERSION
|
ARG VERSION
|
||||||
ARG XFCE_VERSION
|
ARG MATE_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="thelamer"
|
LABEL maintainer="thelamer"
|
||||||
|
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
echo "**** install packages ****" && \
|
echo "**** install packages ****" && \
|
||||||
apk add --no-cache \
|
apk add --no-cache \
|
||||||
faenza-icon-theme \
|
chromium \
|
||||||
faenza-icon-theme-xfce4-appfinder \
|
mate-desktop-environment \
|
||||||
faenza-icon-theme-xfce4-panel \
|
util-linux-misc && \
|
||||||
firefox \
|
echo "**** application tweaks ****" && \
|
||||||
mousepad \
|
sed -i \
|
||||||
ristretto \
|
's#^Exec=.*#Exec=/usr/local/bin/wrapped-chromium#g' \
|
||||||
thunar \
|
/usr/share/applications/chromium.desktop && \
|
||||||
util-linux-misc \
|
echo "**** mate tweaks ****" && \
|
||||||
xfce4 \
|
sed -i \
|
||||||
xfce4-pulseaudio-plugin \
|
'/compositing-manager/{n;s/.*/ <default>false<\/default>/}' \
|
||||||
xfce4-terminal && \
|
/usr/share/glib-2.0/schemas/org.mate.marco.gschema.xml && \
|
||||||
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
|
glib-compile-schemas /usr/share/glib-2.0/schemas/ && \
|
||||||
echo "**** cleanup ****" && \
|
|
||||||
rm -f \
|
rm -f \
|
||||||
/etc/xdg/autostart/xfce4-power-manager.desktop \
|
/etc/xdg/autostart/mate-power-manager.desktop \
|
||||||
/etc/xdg/autostart/xscreensaver.desktop \
|
/etc/xdg/autostart/mate-screensaver.desktop && \
|
||||||
/usr/share/xfce4/panel/plugins/power-manager-plugin.desktop && \
|
echo "**** cleanup ****" && \
|
||||||
rm -rf \
|
rm -rf \
|
||||||
/tmp/*
|
/tmp/*
|
||||||
|
|
||||||
|
|||||||
@ -1,33 +1,31 @@
|
|||||||
FROM ghcr.io/linuxserver/baseimage-rdesktop:arm64v8-alpine320
|
FROM ghcr.io/linuxserver/baseimage-rdesktop:arm64v8-3.18
|
||||||
|
|
||||||
# set version label
|
# set version label
|
||||||
ARG BUILD_DATE
|
ARG BUILD_DATE
|
||||||
ARG VERSION
|
ARG VERSION
|
||||||
ARG XFCE_VERSION
|
ARG MATE_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="thelamer"
|
LABEL maintainer="thelamer"
|
||||||
|
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
echo "**** install packages ****" && \
|
echo "**** install packages ****" && \
|
||||||
apk add --no-cache \
|
apk add --no-cache \
|
||||||
faenza-icon-theme \
|
chromium \
|
||||||
faenza-icon-theme-xfce4-appfinder \
|
mate-desktop-environment \
|
||||||
faenza-icon-theme-xfce4-panel \
|
util-linux-misc && \
|
||||||
firefox \
|
echo "**** application tweaks ****" && \
|
||||||
mousepad \
|
sed -i \
|
||||||
ristretto \
|
's#^Exec=.*#Exec=/usr/local/bin/wrapped-chromium#g' \
|
||||||
thunar \
|
/usr/share/applications/chromium.desktop && \
|
||||||
util-linux-misc \
|
echo "**** mate tweaks ****" && \
|
||||||
xfce4 \
|
sed -i \
|
||||||
xfce4-pulseaudio-plugin \
|
'/compositing-manager/{n;s/.*/ <default>false<\/default>/}' \
|
||||||
xfce4-terminal && \
|
/usr/share/glib-2.0/schemas/org.mate.marco.gschema.xml && \
|
||||||
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
|
glib-compile-schemas /usr/share/glib-2.0/schemas/ && \
|
||||||
echo "**** cleanup ****" && \
|
|
||||||
rm -f \
|
rm -f \
|
||||||
/etc/xdg/autostart/xfce4-power-manager.desktop \
|
/etc/xdg/autostart/mate-power-manager.desktop \
|
||||||
/etc/xdg/autostart/xscreensaver.desktop \
|
/etc/xdg/autostart/mate-screensaver.desktop && \
|
||||||
/usr/share/xfce4/panel/plugins/power-manager-plugin.desktop && \
|
echo "**** cleanup ****" && \
|
||||||
rm -rf \
|
rm -rf \
|
||||||
/tmp/*
|
/tmp/*
|
||||||
|
|
||||||
|
|||||||
972
Jenkinsfile
vendored
Normal file
972
Jenkinsfile
vendored
Normal file
@ -0,0 +1,972 @@
|
|||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'X86-64-MULTI'
|
||||||
|
}
|
||||||
|
options {
|
||||||
|
buildDiscarder(logRotator(numToKeepStr: '10', daysToKeepStr: '60'))
|
||||||
|
parallelsAlwaysFailFast()
|
||||||
|
}
|
||||||
|
// Input to determine if this is a package check
|
||||||
|
parameters {
|
||||||
|
string(defaultValue: 'false', description: 'package check run', name: 'PACKAGE_CHECK')
|
||||||
|
}
|
||||||
|
// Configuration for the variables used for this specific repo
|
||||||
|
environment {
|
||||||
|
BUILDS_DISCORD=credentials('build_webhook_url')
|
||||||
|
GITHUB_TOKEN=credentials('498b4638-2d02-4ce5-832d-8a57d01d97ab')
|
||||||
|
GITLAB_TOKEN=credentials('b6f0f1dd-6952-4cf6-95d1-9c06380283f0')
|
||||||
|
GITLAB_NAMESPACE=credentials('gitlab-namespace-id')
|
||||||
|
SCARF_TOKEN=credentials('scarf_api_key')
|
||||||
|
BUILD_VERSION_ARG = 'OS_VERSION'
|
||||||
|
LS_USER = 'linuxserver'
|
||||||
|
LS_REPO = 'docker-rdesktop'
|
||||||
|
CONTAINER_NAME = 'rdesktop'
|
||||||
|
DOCKERHUB_IMAGE = 'linuxserver/rdesktop'
|
||||||
|
DEV_DOCKERHUB_IMAGE = 'lsiodev/rdesktop'
|
||||||
|
PR_DOCKERHUB_IMAGE = 'lspipepr/rdesktop'
|
||||||
|
DIST_IMAGE = 'alpine'
|
||||||
|
MULTIARCH = 'true'
|
||||||
|
CI = 'true'
|
||||||
|
CI_WEB = 'false'
|
||||||
|
CI_PORT = '3000'
|
||||||
|
CI_SSL = 'false'
|
||||||
|
CI_DELAY = '30'
|
||||||
|
CI_DOCKERENV = 'TZ=US/Pacific'
|
||||||
|
CI_AUTH = 'user:password'
|
||||||
|
CI_WEBPATH = ''
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
// Setup all the basic environment variables needed for the build
|
||||||
|
stage("Set ENV Variables base"){
|
||||||
|
steps{
|
||||||
|
sh '''#! /bin/bash
|
||||||
|
containers=$(docker ps -aq)
|
||||||
|
if [[ -n "${containers}" ]]; then
|
||||||
|
docker stop ${containers}
|
||||||
|
fi
|
||||||
|
docker system prune -af --volumes || : '''
|
||||||
|
script{
|
||||||
|
env.EXIT_STATUS = ''
|
||||||
|
env.LS_RELEASE = sh(
|
||||||
|
script: '''docker run --rm quay.io/skopeo/stable:v1 inspect docker://ghcr.io/${LS_USER}/${CONTAINER_NAME}:alpine-mate 2>/dev/null | jq -r '.Labels.build_version' | awk '{print $3}' | grep '\\-ls' || : ''',
|
||||||
|
returnStdout: true).trim()
|
||||||
|
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' ''',
|
||||||
|
returnStdout: true).trim()
|
||||||
|
env.GITHUB_DATE = sh(
|
||||||
|
script: '''date '+%Y-%m-%dT%H:%M:%S%:z' ''',
|
||||||
|
returnStdout: true).trim()
|
||||||
|
env.COMMIT_SHA = sh(
|
||||||
|
script: '''git rev-parse HEAD''',
|
||||||
|
returnStdout: true).trim()
|
||||||
|
env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/commit/' + env.GIT_COMMIT
|
||||||
|
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DOCKERHUB_IMAGE + '/tags/'
|
||||||
|
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 ./.github/workflows/package_trigger.yml'
|
||||||
|
}
|
||||||
|
script{
|
||||||
|
env.LS_RELEASE_NUMBER = sh(
|
||||||
|
script: '''echo ${LS_RELEASE} |sed 's/^.*-ls//g' ''',
|
||||||
|
returnStdout: true).trim()
|
||||||
|
}
|
||||||
|
script{
|
||||||
|
env.LS_TAG_NUMBER = sh(
|
||||||
|
script: '''#! /bin/bash
|
||||||
|
tagsha=$(git rev-list -n 1 alpine-mate-${LS_RELEASE} 2>/dev/null)
|
||||||
|
if [ "${tagsha}" == "${COMMIT_SHA}" ]; then
|
||||||
|
echo ${LS_RELEASE_NUMBER}
|
||||||
|
elif [ -z "${GIT_COMMIT}" ]; then
|
||||||
|
echo ${LS_RELEASE_NUMBER}
|
||||||
|
else
|
||||||
|
echo $((${LS_RELEASE_NUMBER} + 1))
|
||||||
|
fi''',
|
||||||
|
returnStdout: true).trim()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* #######################
|
||||||
|
Package Version Tagging
|
||||||
|
####################### */
|
||||||
|
// Grab the current package versions in Git to determine package tag
|
||||||
|
stage("Set Package tag"){
|
||||||
|
steps{
|
||||||
|
script{
|
||||||
|
env.PACKAGE_TAG = sh(
|
||||||
|
script: '''#!/bin/bash
|
||||||
|
if [ -e package_versions.txt ] ; then
|
||||||
|
cat package_versions.txt | md5sum | cut -c1-8
|
||||||
|
else
|
||||||
|
echo none
|
||||||
|
fi''',
|
||||||
|
returnStdout: true).trim()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* ########################
|
||||||
|
External Release Tagging
|
||||||
|
######################## */
|
||||||
|
// If this is an os release set release type to none to indicate no external release
|
||||||
|
stage("Set ENV os"){
|
||||||
|
steps{
|
||||||
|
script{
|
||||||
|
env.EXT_RELEASE = env.PACKAGE_TAG
|
||||||
|
env.RELEASE_LINK = 'none'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Sanitize the release tag and strip illegal docker or github characters
|
||||||
|
stage("Sanitize tag"){
|
||||||
|
steps{
|
||||||
|
script{
|
||||||
|
env.EXT_RELEASE_CLEAN = sh(
|
||||||
|
script: '''echo ${EXT_RELEASE} | sed 's/[~,%@+;:/]//g' ''',
|
||||||
|
returnStdout: true).trim()
|
||||||
|
|
||||||
|
def semver = env.EXT_RELEASE_CLEAN =~ /(\d+)\.(\d+)\.(\d+)/
|
||||||
|
if (semver.find()) {
|
||||||
|
env.SEMVER = "${semver[0][1]}.${semver[0][2]}.${semver[0][3]}"
|
||||||
|
} else {
|
||||||
|
semver = env.EXT_RELEASE_CLEAN =~ /(\d+)\.(\d+)(?:\.(\d+))?(.*)/
|
||||||
|
if (semver.find()) {
|
||||||
|
if (semver[0][3]) {
|
||||||
|
env.SEMVER = "${semver[0][1]}.${semver[0][2]}.${semver[0][3]}"
|
||||||
|
} else if (!semver[0][3] && !semver[0][4]) {
|
||||||
|
env.SEMVER = "${semver[0][1]}.${semver[0][2]}.${(new Date()).format('YYYYMMdd')}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (env.SEMVER != null) {
|
||||||
|
if (BRANCH_NAME != "master" && BRANCH_NAME != "main") {
|
||||||
|
env.SEMVER = "${env.SEMVER}-${BRANCH_NAME}"
|
||||||
|
}
|
||||||
|
println("SEMVER: ${env.SEMVER}")
|
||||||
|
} else {
|
||||||
|
println("No SEMVER detected")
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// If this is a alpine-mate build use live docker endpoints
|
||||||
|
stage("Set ENV live build"){
|
||||||
|
when {
|
||||||
|
branch "alpine-mate"
|
||||||
|
environment name: 'CHANGE_ID', value: ''
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
script{
|
||||||
|
env.IMAGE = env.DOCKERHUB_IMAGE
|
||||||
|
env.GITHUBIMAGE = 'ghcr.io/' + env.LS_USER + '/' + 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
|
||||||
|
if (env.MULTIARCH == 'true') {
|
||||||
|
env.CI_TAGS = 'amd64-alpine-mate-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm64v8-alpine-mate-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
||||||
|
} else {
|
||||||
|
env.CI_TAGS = 'alpine-mate-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
||||||
|
}
|
||||||
|
env.VERSION_TAG = env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
||||||
|
env.META_TAG = 'alpine-mate-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
||||||
|
env.EXT_RELEASE_TAG = 'alpine-mate-version-' + env.EXT_RELEASE_CLEAN
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// If this is a dev build use dev docker endpoints
|
||||||
|
stage("Set ENV dev build"){
|
||||||
|
when {
|
||||||
|
not {branch "alpine-mate"}
|
||||||
|
environment name: 'CHANGE_ID', value: ''
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
script{
|
||||||
|
env.IMAGE = env.DEV_DOCKERHUB_IMAGE
|
||||||
|
env.GITHUBIMAGE = 'ghcr.io/' + env.LS_USER + '/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
|
||||||
|
if (env.MULTIARCH == 'true') {
|
||||||
|
env.CI_TAGS = 'amd64-alpine-mate-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm64v8-alpine-mate-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
|
||||||
|
} else {
|
||||||
|
env.CI_TAGS = 'alpine-mate-' + 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 = 'alpine-mate-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
|
||||||
|
env.EXT_RELEASE_TAG = 'alpine-mate-version-' + env.EXT_RELEASE_CLEAN
|
||||||
|
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DEV_DOCKERHUB_IMAGE + '/tags/'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// If this is a pull request build use dev docker endpoints
|
||||||
|
stage("Set ENV PR build"){
|
||||||
|
when {
|
||||||
|
not {environment name: 'CHANGE_ID', value: ''}
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
script{
|
||||||
|
env.IMAGE = env.PR_DOCKERHUB_IMAGE
|
||||||
|
env.GITHUBIMAGE = 'ghcr.io/' + env.LS_USER + '/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
|
||||||
|
if (env.MULTIARCH == 'true') {
|
||||||
|
env.CI_TAGS = 'amd64-alpine-mate-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST + '|arm64v8-alpine-mate-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST
|
||||||
|
} else {
|
||||||
|
env.CI_TAGS = 'alpine-mate-' + 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 = 'alpine-mate-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST
|
||||||
|
env.EXT_RELEASE_TAG = 'alpine-mate-version-' + env.EXT_RELEASE_CLEAN
|
||||||
|
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/'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Run ShellCheck
|
||||||
|
stage('ShellCheck') {
|
||||||
|
when {
|
||||||
|
environment name: 'CI', value: 'true'
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
withCredentials([
|
||||||
|
string(credentialsId: 'ci-tests-s3-key-id', variable: 'S3_KEY'),
|
||||||
|
string(credentialsId: 'ci-tests-s3-secret-access-key', variable: 'S3_SECRET')
|
||||||
|
]) {
|
||||||
|
script{
|
||||||
|
env.SHELLCHECK_URL = 'https://ci-tests.linuxserver.io/' + env.IMAGE + '/' + env.META_TAG + '/shellcheck-result.xml'
|
||||||
|
}
|
||||||
|
sh '''curl -sL https://raw.githubusercontent.com/linuxserver/docker-jenkins-builder/master/checkrun.sh | /bin/bash'''
|
||||||
|
sh '''#! /bin/bash
|
||||||
|
docker run --rm \
|
||||||
|
-v ${WORKSPACE}:/mnt \
|
||||||
|
-e AWS_ACCESS_KEY_ID=\"${S3_KEY}\" \
|
||||||
|
-e AWS_SECRET_ACCESS_KEY=\"${S3_SECRET}\" \
|
||||||
|
ghcr.io/linuxserver/baseimage-alpine:3.17 s6-envdir -fn -- /var/run/s6/container_environment /bin/bash -c "\
|
||||||
|
apk add --no-cache py3-pip && \
|
||||||
|
pip install s3cmd && \
|
||||||
|
s3cmd put --no-preserve --acl-public -m text/xml /mnt/shellcheck-result.xml s3://ci-tests.linuxserver.io/${IMAGE}/${META_TAG}/shellcheck-result.xml" || :'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Use helper containers to render templated files
|
||||||
|
stage('Update-Templates') {
|
||||||
|
when {
|
||||||
|
branch "alpine-mate"
|
||||||
|
environment name: 'CHANGE_ID', value: ''
|
||||||
|
expression {
|
||||||
|
env.CONTAINER_NAME != null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
sh '''#! /bin/bash
|
||||||
|
set -e
|
||||||
|
TEMPDIR=$(mktemp -d)
|
||||||
|
docker pull ghcr.io/linuxserver/jenkins-builder:latest
|
||||||
|
docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH=alpine-mate -v ${TEMPDIR}:/ansible/jenkins ghcr.io/linuxserver/jenkins-builder:latest
|
||||||
|
# Stage 1 - Jenkinsfile update
|
||||||
|
if [[ "$(md5sum Jenkinsfile | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile | awk '{ print $1 }')" ]]; then
|
||||||
|
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 alpine-mate
|
||||||
|
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile ${TEMPDIR}/repo/${LS_REPO}/
|
||||||
|
git add Jenkinsfile
|
||||||
|
git commit -m 'Bot Updating Templated Files'
|
||||||
|
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git --all
|
||||||
|
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
|
||||||
|
echo "Updating Jenkinsfile"
|
||||||
|
rm -Rf ${TEMPDIR}
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
echo "Jenkinsfile is up to date."
|
||||||
|
fi
|
||||||
|
# Stage 2 - Delete old templates
|
||||||
|
OLD_TEMPLATES=".github/ISSUE_TEMPLATE.md .github/ISSUE_TEMPLATE/issue.bug.md .github/ISSUE_TEMPLATE/issue.feature.md .github/workflows/call_invalid_helper.yml .github/workflows/stale.yml Dockerfile.armhf"
|
||||||
|
for i in ${OLD_TEMPLATES}; do
|
||||||
|
if [[ -f "${i}" ]]; then
|
||||||
|
TEMPLATES_TO_DELETE="${i} ${TEMPLATES_TO_DELETE}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if [[ -n "${TEMPLATES_TO_DELETE}" ]]; then
|
||||||
|
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 alpine-mate
|
||||||
|
for i in ${TEMPLATES_TO_DELETE}; do
|
||||||
|
git rm "${i}"
|
||||||
|
done
|
||||||
|
git commit -m 'Bot Updating Templated Files'
|
||||||
|
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git --all
|
||||||
|
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
|
||||||
|
echo "Deleting old and deprecated templates"
|
||||||
|
rm -Rf ${TEMPDIR}
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
echo "No templates to delete"
|
||||||
|
fi
|
||||||
|
# Stage 3 - Update templates
|
||||||
|
CURRENTHASH=$(grep -hs ^ ${TEMPLATED_FILES} | md5sum | cut -c1-8)
|
||||||
|
cd ${TEMPDIR}/docker-${CONTAINER_NAME}
|
||||||
|
NEWHASH=$(grep -hs ^ ${TEMPLATED_FILES} | md5sum | cut -c1-8)
|
||||||
|
if [[ "${CURRENTHASH}" != "${NEWHASH}" ]] || ! grep -q '.jenkins-external' "${WORKSPACE}/.gitignore" 2>/dev/null; then
|
||||||
|
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 alpine-mate
|
||||||
|
cd ${TEMPDIR}/docker-${CONTAINER_NAME}
|
||||||
|
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/workflows
|
||||||
|
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/ISSUE_TEMPLATE
|
||||||
|
cp --parents ${TEMPLATED_FILES} ${TEMPDIR}/repo/${LS_REPO}/ || :
|
||||||
|
cp --parents readme-vars.yml ${TEMPDIR}/repo/${LS_REPO}/ || :
|
||||||
|
cd ${TEMPDIR}/repo/${LS_REPO}/
|
||||||
|
if ! grep -q '.jenkins-external' .gitignore 2>/dev/null; then
|
||||||
|
echo ".jenkins-external" >> .gitignore
|
||||||
|
git add .gitignore
|
||||||
|
fi
|
||||||
|
git add readme-vars.yml ${TEMPLATED_FILES}
|
||||||
|
git commit -m 'Bot Updating Templated Files'
|
||||||
|
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git --all
|
||||||
|
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
|
||||||
|
else
|
||||||
|
echo "false" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
|
||||||
|
fi
|
||||||
|
mkdir -p ${TEMPDIR}/gitbook
|
||||||
|
git clone https://github.com/linuxserver/docker-documentation.git ${TEMPDIR}/gitbook/docker-documentation
|
||||||
|
if [[ ("${BRANCH_NAME}" == "master") || ("${BRANCH_NAME}" == "main") ]] && [[ (! -f ${TEMPDIR}/gitbook/docker-documentation/images/docker-${CONTAINER_NAME}.md) || ("$(md5sum ${TEMPDIR}/gitbook/docker-documentation/images/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')") ]]; then
|
||||||
|
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/docker-${CONTAINER_NAME}.md ${TEMPDIR}/gitbook/docker-documentation/images/
|
||||||
|
cd ${TEMPDIR}/gitbook/docker-documentation/
|
||||||
|
git add images/docker-${CONTAINER_NAME}.md
|
||||||
|
git commit -m 'Bot Updating Documentation'
|
||||||
|
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/docker-documentation.git --all
|
||||||
|
fi
|
||||||
|
rm -Rf ${TEMPDIR}'''
|
||||||
|
script{
|
||||||
|
env.FILES_UPDATED = sh(
|
||||||
|
script: '''cat /tmp/${COMMIT_SHA}-${BUILD_NUMBER}''',
|
||||||
|
returnStdout: true).trim()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Exit the build if the Templated files were just updated
|
||||||
|
stage('Template-exit') {
|
||||||
|
when {
|
||||||
|
branch "alpine-mate"
|
||||||
|
environment name: 'CHANGE_ID', value: ''
|
||||||
|
environment name: 'FILES_UPDATED', value: 'true'
|
||||||
|
expression {
|
||||||
|
env.CONTAINER_NAME != null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
script{
|
||||||
|
env.EXIT_STATUS = 'ABORTED'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// If this is a alpine-mate build check the S6 service file perms
|
||||||
|
stage("Check S6 Service file Permissions"){
|
||||||
|
when {
|
||||||
|
branch "alpine-mate"
|
||||||
|
environment name: 'CHANGE_ID', value: ''
|
||||||
|
environment name: 'EXIT_STATUS', value: ''
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
script{
|
||||||
|
sh '''#! /bin/bash
|
||||||
|
WRONG_PERM=$(find ./ -path "./.git" -prune -o \\( -name "run" -o -name "finish" -o -name "check" \\) -not -perm -u=x,g=x,o=x -print)
|
||||||
|
if [[ -n "${WRONG_PERM}" ]]; then
|
||||||
|
echo "The following S6 service files are missing the executable bit; canceling the faulty build: ${WRONG_PERM}"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "S6 service file perms look good."
|
||||||
|
fi '''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* #######################
|
||||||
|
GitLab Mirroring
|
||||||
|
####################### */
|
||||||
|
// Ping into Gitlab to mirror this repo and have a registry endpoint
|
||||||
|
stage("GitLab Mirror"){
|
||||||
|
when {
|
||||||
|
environment name: 'EXIT_STATUS', value: ''
|
||||||
|
}
|
||||||
|
steps{
|
||||||
|
sh '''curl -H "Content-Type: application/json" -H "Private-Token: ${GITLAB_TOKEN}" -X POST https://gitlab.com/api/v4/projects \
|
||||||
|
-d '{"namespace_id":'${GITLAB_NAMESPACE}',\
|
||||||
|
"name":"'${LS_REPO}'",
|
||||||
|
"mirror":true,\
|
||||||
|
"import_url":"https://github.com/linuxserver/'${LS_REPO}'.git",\
|
||||||
|
"issues_access_level":"disabled",\
|
||||||
|
"merge_requests_access_level":"disabled",\
|
||||||
|
"repository_access_level":"enabled",\
|
||||||
|
"visibility":"public"}' '''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* #######################
|
||||||
|
Scarf.sh package registry
|
||||||
|
####################### */
|
||||||
|
// Add package to Scarf.sh and set permissions
|
||||||
|
stage("Scarf.sh package registry"){
|
||||||
|
when {
|
||||||
|
branch "alpine-mate"
|
||||||
|
environment name: 'EXIT_STATUS', value: ''
|
||||||
|
}
|
||||||
|
steps{
|
||||||
|
sh '''#! /bin/bash
|
||||||
|
PACKAGE_UUID=$(curl -X GET -H "Authorization: Bearer ${SCARF_TOKEN}" https://scarf.sh/api/v1/organizations/linuxserver-ci/packages | jq -r '.[] | select(.name=="linuxserver/rdesktop") | .uuid' || :)
|
||||||
|
if [ -z "${PACKAGE_UUID}" ]; then
|
||||||
|
echo "Adding package to Scarf.sh"
|
||||||
|
curl -sX POST https://scarf.sh/api/v1/organizations/linuxserver-ci/packages \
|
||||||
|
-H "Authorization: Bearer ${SCARF_TOKEN}" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{"name":"linuxserver/rdesktop",\
|
||||||
|
"shortDescription":"example description",\
|
||||||
|
"libraryType":"docker",\
|
||||||
|
"website":"https://github.com/linuxserver/docker-rdesktop",\
|
||||||
|
"backendUrl":"https://ghcr.io/linuxserver/rdesktop",\
|
||||||
|
"publicUrl":"https://lscr.io/linuxserver/rdesktop"}' || :
|
||||||
|
else
|
||||||
|
echo "Package already exists on Scarf.sh"
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* ###############
|
||||||
|
Build Container
|
||||||
|
############### */
|
||||||
|
// Build Docker container for push to LS Repo
|
||||||
|
stage('Build-Single') {
|
||||||
|
when {
|
||||||
|
expression {
|
||||||
|
env.MULTIARCH == 'false' || params.PACKAGE_CHECK == 'true'
|
||||||
|
}
|
||||||
|
environment name: 'EXIT_STATUS', value: ''
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
echo "Running on node: ${NODE_NAME}"
|
||||||
|
sh "sed -r -i 's|(^FROM .*)|\\1\\n\\nENV LSIO_FIRST_PARTY=true|g' Dockerfile"
|
||||||
|
sh "docker buildx build \
|
||||||
|
--label \"org.opencontainers.image.created=${GITHUB_DATE}\" \
|
||||||
|
--label \"org.opencontainers.image.authors=linuxserver.io\" \
|
||||||
|
--label \"org.opencontainers.image.url=https://github.com/linuxserver/docker-rdesktop/packages\" \
|
||||||
|
--label \"org.opencontainers.image.documentation=https://docs.linuxserver.io/images/docker-rdesktop\" \
|
||||||
|
--label \"org.opencontainers.image.source=https://github.com/linuxserver/docker-rdesktop\" \
|
||||||
|
--label \"org.opencontainers.image.version=${EXT_RELEASE_CLEAN}-ls${LS_TAG_NUMBER}\" \
|
||||||
|
--label \"org.opencontainers.image.revision=${COMMIT_SHA}\" \
|
||||||
|
--label \"org.opencontainers.image.vendor=linuxserver.io\" \
|
||||||
|
--label \"org.opencontainers.image.licenses=GPL-3.0-only\" \
|
||||||
|
--label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \
|
||||||
|
--label \"org.opencontainers.image.title=Rdesktop\" \
|
||||||
|
--label \"org.opencontainers.image.description=rdesktop image by linuxserver.io\" \
|
||||||
|
--no-cache --pull -t ${IMAGE}:${META_TAG} --platform=linux/amd64 \
|
||||||
|
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Build MultiArch Docker containers for push to LS Repo
|
||||||
|
stage('Build-Multi') {
|
||||||
|
when {
|
||||||
|
allOf {
|
||||||
|
environment name: 'MULTIARCH', value: 'true'
|
||||||
|
expression { params.PACKAGE_CHECK == 'false' }
|
||||||
|
}
|
||||||
|
environment name: 'EXIT_STATUS', value: ''
|
||||||
|
}
|
||||||
|
parallel {
|
||||||
|
stage('Build X86') {
|
||||||
|
steps {
|
||||||
|
echo "Running on node: ${NODE_NAME}"
|
||||||
|
sh "sed -r -i 's|(^FROM .*)|\\1\\n\\nENV LSIO_FIRST_PARTY=true|g' Dockerfile"
|
||||||
|
sh "docker buildx build \
|
||||||
|
--label \"org.opencontainers.image.created=${GITHUB_DATE}\" \
|
||||||
|
--label \"org.opencontainers.image.authors=linuxserver.io\" \
|
||||||
|
--label \"org.opencontainers.image.url=https://github.com/linuxserver/docker-rdesktop/packages\" \
|
||||||
|
--label \"org.opencontainers.image.documentation=https://docs.linuxserver.io/images/docker-rdesktop\" \
|
||||||
|
--label \"org.opencontainers.image.source=https://github.com/linuxserver/docker-rdesktop\" \
|
||||||
|
--label \"org.opencontainers.image.version=${EXT_RELEASE_CLEAN}-ls${LS_TAG_NUMBER}\" \
|
||||||
|
--label \"org.opencontainers.image.revision=${COMMIT_SHA}\" \
|
||||||
|
--label \"org.opencontainers.image.vendor=linuxserver.io\" \
|
||||||
|
--label \"org.opencontainers.image.licenses=GPL-3.0-only\" \
|
||||||
|
--label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \
|
||||||
|
--label \"org.opencontainers.image.title=Rdesktop\" \
|
||||||
|
--label \"org.opencontainers.image.description=rdesktop image by linuxserver.io\" \
|
||||||
|
--no-cache --pull -t ${IMAGE}:amd64-${META_TAG} --platform=linux/amd64 \
|
||||||
|
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Build ARM64') {
|
||||||
|
agent {
|
||||||
|
label 'ARM64'
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
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 "docker buildx build \
|
||||||
|
--label \"org.opencontainers.image.created=${GITHUB_DATE}\" \
|
||||||
|
--label \"org.opencontainers.image.authors=linuxserver.io\" \
|
||||||
|
--label \"org.opencontainers.image.url=https://github.com/linuxserver/docker-rdesktop/packages\" \
|
||||||
|
--label \"org.opencontainers.image.documentation=https://docs.linuxserver.io/images/docker-rdesktop\" \
|
||||||
|
--label \"org.opencontainers.image.source=https://github.com/linuxserver/docker-rdesktop\" \
|
||||||
|
--label \"org.opencontainers.image.version=${EXT_RELEASE_CLEAN}-ls${LS_TAG_NUMBER}\" \
|
||||||
|
--label \"org.opencontainers.image.revision=${COMMIT_SHA}\" \
|
||||||
|
--label \"org.opencontainers.image.vendor=linuxserver.io\" \
|
||||||
|
--label \"org.opencontainers.image.licenses=GPL-3.0-only\" \
|
||||||
|
--label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \
|
||||||
|
--label \"org.opencontainers.image.title=Rdesktop\" \
|
||||||
|
--label \"org.opencontainers.image.description=rdesktop image by linuxserver.io\" \
|
||||||
|
--no-cache --pull -f Dockerfile.aarch64 -t ${IMAGE}:arm64v8-${META_TAG} --platform=linux/arm64 \
|
||||||
|
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
|
||||||
|
sh "docker tag ${IMAGE}:arm64v8-${META_TAG} ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}"
|
||||||
|
retry(5) {
|
||||||
|
sh "docker push ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}"
|
||||||
|
}
|
||||||
|
sh '''#! /bin/bash
|
||||||
|
containers=$(docker ps -aq)
|
||||||
|
if [[ -n "${containers}" ]]; then
|
||||||
|
docker stop ${containers}
|
||||||
|
fi
|
||||||
|
docker system prune -af --volumes || : '''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Take the image we just built and dump package versions for comparison
|
||||||
|
stage('Update-packages') {
|
||||||
|
when {
|
||||||
|
branch "alpine-mate"
|
||||||
|
environment name: 'CHANGE_ID', value: ''
|
||||||
|
environment name: 'EXIT_STATUS', value: ''
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
sh '''#! /bin/bash
|
||||||
|
set -e
|
||||||
|
TEMPDIR=$(mktemp -d)
|
||||||
|
if [ "${MULTIARCH}" == "true" ] && [ "${PACKAGE_CHECK}" == "false" ]; then
|
||||||
|
LOCAL_CONTAINER=${IMAGE}:amd64-${META_TAG}
|
||||||
|
else
|
||||||
|
LOCAL_CONTAINER=${IMAGE}:${META_TAG}
|
||||||
|
fi
|
||||||
|
touch ${TEMPDIR}/package_versions.txt
|
||||||
|
docker run --rm \
|
||||||
|
-v /var/run/docker.sock:/var/run/docker.sock:ro \
|
||||||
|
-v ${TEMPDIR}:/tmp \
|
||||||
|
ghcr.io/anchore/syft:latest \
|
||||||
|
${LOCAL_CONTAINER} -o table=/tmp/package_versions.txt
|
||||||
|
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"
|
||||||
|
if [ "${NEW_PACKAGE_TAG}" != "${PACKAGE_TAG}" ]; then
|
||||||
|
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/${LS_REPO}
|
||||||
|
git --git-dir ${TEMPDIR}/${LS_REPO}/.git checkout -f alpine-mate
|
||||||
|
cp ${TEMPDIR}/package_versions.txt ${TEMPDIR}/${LS_REPO}/
|
||||||
|
cd ${TEMPDIR}/${LS_REPO}/
|
||||||
|
wait
|
||||||
|
git add package_versions.txt
|
||||||
|
git commit -m 'Bot Updating Package Versions'
|
||||||
|
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git --all
|
||||||
|
echo "true" > /tmp/packages-${COMMIT_SHA}-${BUILD_NUMBER}
|
||||||
|
echo "Package tag updated, stopping build process"
|
||||||
|
else
|
||||||
|
echo "false" > /tmp/packages-${COMMIT_SHA}-${BUILD_NUMBER}
|
||||||
|
echo "Package tag is same as previous continue with build process"
|
||||||
|
fi
|
||||||
|
rm -Rf ${TEMPDIR}'''
|
||||||
|
script{
|
||||||
|
env.PACKAGE_UPDATED = sh(
|
||||||
|
script: '''cat /tmp/packages-${COMMIT_SHA}-${BUILD_NUMBER}''',
|
||||||
|
returnStdout: true).trim()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Exit the build if the package file was just updated
|
||||||
|
stage('PACKAGE-exit') {
|
||||||
|
when {
|
||||||
|
branch "alpine-mate"
|
||||||
|
environment name: 'CHANGE_ID', value: ''
|
||||||
|
environment name: 'PACKAGE_UPDATED', value: 'true'
|
||||||
|
environment name: 'EXIT_STATUS', value: ''
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
script{
|
||||||
|
env.EXIT_STATUS = 'ABORTED'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Exit the build if this is just a package check and there are no changes to push
|
||||||
|
stage('PACKAGECHECK-exit') {
|
||||||
|
when {
|
||||||
|
branch "alpine-mate"
|
||||||
|
environment name: 'CHANGE_ID', value: ''
|
||||||
|
environment name: 'PACKAGE_UPDATED', value: 'false'
|
||||||
|
environment name: 'EXIT_STATUS', value: ''
|
||||||
|
expression {
|
||||||
|
params.PACKAGE_CHECK == 'true'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
script{
|
||||||
|
env.EXIT_STATUS = 'ABORTED'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* #######
|
||||||
|
Testing
|
||||||
|
####### */
|
||||||
|
// Run Container tests
|
||||||
|
stage('Test') {
|
||||||
|
when {
|
||||||
|
environment name: 'CI', value: 'true'
|
||||||
|
environment name: 'EXIT_STATUS', value: ''
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
withCredentials([
|
||||||
|
string(credentialsId: 'ci-tests-s3-key-id', variable: 'S3_KEY'),
|
||||||
|
string(credentialsId: 'ci-tests-s3-secret-access-key ', variable: 'S3_SECRET')
|
||||||
|
]) {
|
||||||
|
script{
|
||||||
|
env.CI_URL = 'https://ci-tests.linuxserver.io/' + env.IMAGE + '/' + env.META_TAG + '/index.html'
|
||||||
|
env.CI_JSON_URL = 'https://ci-tests.linuxserver.io/' + env.IMAGE + '/' + env.META_TAG + '/report.json'
|
||||||
|
}
|
||||||
|
sh '''#! /bin/bash
|
||||||
|
set -e
|
||||||
|
docker pull ghcr.io/linuxserver/ci:latest
|
||||||
|
if [ "${MULTIARCH}" == "true" ]; then
|
||||||
|
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}
|
||||||
|
docker tag ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm64v8-${META_TAG}
|
||||||
|
fi
|
||||||
|
docker run --rm \
|
||||||
|
--shm-size=1gb \
|
||||||
|
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||||
|
-e IMAGE=\"${IMAGE}\" \
|
||||||
|
-e DELAY_START=\"${CI_DELAY}\" \
|
||||||
|
-e TAGS=\"${CI_TAGS}\" \
|
||||||
|
-e META_TAG=\"${META_TAG}\" \
|
||||||
|
-e PORT=\"${CI_PORT}\" \
|
||||||
|
-e SSL=\"${CI_SSL}\" \
|
||||||
|
-e BASE=\"${DIST_IMAGE}\" \
|
||||||
|
-e SECRET_KEY=\"${S3_SECRET}\" \
|
||||||
|
-e ACCESS_KEY=\"${S3_KEY}\" \
|
||||||
|
-e DOCKER_ENV=\"${CI_DOCKERENV}\" \
|
||||||
|
-e WEB_SCREENSHOT=\"${CI_WEB}\" \
|
||||||
|
-e WEB_AUTH=\"${CI_AUTH}\" \
|
||||||
|
-e WEB_PATH=\"${CI_WEBPATH}\" \
|
||||||
|
-t ghcr.io/linuxserver/ci:latest \
|
||||||
|
python3 test_build.py'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* ##################
|
||||||
|
Release Logic
|
||||||
|
################## */
|
||||||
|
// If this is an amd64 only image only push a single image
|
||||||
|
stage('Docker-Push-Single') {
|
||||||
|
when {
|
||||||
|
environment name: 'MULTIARCH', value: 'false'
|
||||||
|
environment name: 'EXIT_STATUS', value: ''
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
withCredentials([
|
||||||
|
[
|
||||||
|
$class: 'UsernamePasswordMultiBinding',
|
||||||
|
credentialsId: '3f9ba4d5-100d-45b0-a3c4-633fd6061207',
|
||||||
|
usernameVariable: 'DOCKERUSER',
|
||||||
|
passwordVariable: 'DOCKERPASS'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
$class: 'UsernamePasswordMultiBinding',
|
||||||
|
credentialsId: 'Quay.io-Robot',
|
||||||
|
usernameVariable: 'QUAYUSER',
|
||||||
|
passwordVariable: 'QUAYPASS'
|
||||||
|
]
|
||||||
|
]) {
|
||||||
|
retry(5) {
|
||||||
|
sh '''#! /bin/bash
|
||||||
|
set -e
|
||||||
|
echo $DOCKERPASS | docker login -u $DOCKERUSER --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}:alpine-mate
|
||||||
|
docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:${EXT_RELEASE_TAG}
|
||||||
|
if [ -n "${SEMVER}" ]; then
|
||||||
|
docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:${SEMVER}
|
||||||
|
fi
|
||||||
|
docker push ${PUSHIMAGE}:alpine-mate
|
||||||
|
docker push ${PUSHIMAGE}:${META_TAG}
|
||||||
|
docker push ${PUSHIMAGE}:${EXT_RELEASE_TAG}
|
||||||
|
if [ -n "${SEMVER}" ]; then
|
||||||
|
docker push ${PUSHIMAGE}:${SEMVER}
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// If this is a multi arch release push all images and define the manifest
|
||||||
|
stage('Docker-Push-Multi') {
|
||||||
|
when {
|
||||||
|
environment name: 'MULTIARCH', value: 'true'
|
||||||
|
environment name: 'EXIT_STATUS', value: ''
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
withCredentials([
|
||||||
|
[
|
||||||
|
$class: 'UsernamePasswordMultiBinding',
|
||||||
|
credentialsId: '3f9ba4d5-100d-45b0-a3c4-633fd6061207',
|
||||||
|
usernameVariable: 'DOCKERUSER',
|
||||||
|
passwordVariable: 'DOCKERPASS'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
$class: 'UsernamePasswordMultiBinding',
|
||||||
|
credentialsId: 'Quay.io-Robot',
|
||||||
|
usernameVariable: 'QUAYUSER',
|
||||||
|
passwordVariable: 'QUAYPASS'
|
||||||
|
]
|
||||||
|
]) {
|
||||||
|
retry(5) {
|
||||||
|
sh '''#! /bin/bash
|
||||||
|
set -e
|
||||||
|
echo $DOCKERPASS | docker login -u $DOCKERUSER --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}
|
||||||
|
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-alpine-mate
|
||||||
|
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-alpine-mate
|
||||||
|
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-alpine-mate
|
||||||
|
docker push ${MANIFESTIMAGE}:arm64v8-${META_TAG}
|
||||||
|
docker push ${MANIFESTIMAGE}:arm64v8-alpine-mate
|
||||||
|
docker push ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
|
||||||
|
if [ -n "${SEMVER}" ]; then
|
||||||
|
docker push ${MANIFESTIMAGE}:amd64-${SEMVER}
|
||||||
|
docker push ${MANIFESTIMAGE}:arm64v8-${SEMVER}
|
||||||
|
fi
|
||||||
|
docker manifest push --purge ${MANIFESTIMAGE}:alpine-mate || :
|
||||||
|
docker manifest create ${MANIFESTIMAGE}:alpine-mate ${MANIFESTIMAGE}:amd64-alpine-mate ${MANIFESTIMAGE}:arm64v8-alpine-mate
|
||||||
|
docker manifest annotate ${MANIFESTIMAGE}:alpine-mate ${MANIFESTIMAGE}:arm64v8-alpine-mate --os linux --arch arm64 --variant v8
|
||||||
|
docker manifest push --purge ${MANIFESTIMAGE}:${META_TAG} || :
|
||||||
|
docker manifest create ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG}
|
||||||
|
docker manifest annotate ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG} --os linux --arch arm64 --variant v8
|
||||||
|
docker manifest push --purge ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} || :
|
||||||
|
docker manifest create ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
|
||||||
|
docker manifest annotate ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG} --os linux --arch arm64 --variant v8
|
||||||
|
if [ -n "${SEMVER}" ]; then
|
||||||
|
docker manifest push --purge ${MANIFESTIMAGE}:${SEMVER} || :
|
||||||
|
docker manifest create ${MANIFESTIMAGE}:${SEMVER} ${MANIFESTIMAGE}:amd64-${SEMVER} ${MANIFESTIMAGE}:arm64v8-${SEMVER}
|
||||||
|
docker manifest annotate ${MANIFESTIMAGE}:${SEMVER} ${MANIFESTIMAGE}:arm64v8-${SEMVER} --os linux --arch arm64 --variant v8
|
||||||
|
fi
|
||||||
|
token=$(curl -sX GET "https://ghcr.io/token?scope=repository%3Alinuxserver%2F${CONTAINER_NAME}%3Apull" | jq -r '.token')
|
||||||
|
digest=$(curl -s \
|
||||||
|
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
|
||||||
|
--header "Authorization: Bearer ${token}" \
|
||||||
|
"https://ghcr.io/v2/linuxserver/${CONTAINER_NAME}/manifests/arm32v7-alpine-mate")
|
||||||
|
if [[ $(echo "$digest" | jq -r '.layers') != "null" ]]; then
|
||||||
|
docker manifest push --purge ${MANIFESTIMAGE}:arm32v7-alpine-mate || :
|
||||||
|
docker manifest create ${MANIFESTIMAGE}:arm32v7-alpine-mate ${MANIFESTIMAGE}:amd64-alpine-mate
|
||||||
|
docker manifest push --purge ${MANIFESTIMAGE}:arm32v7-alpine-mate
|
||||||
|
fi
|
||||||
|
docker manifest push --purge ${MANIFESTIMAGE}:alpine-mate
|
||||||
|
docker manifest push --purge ${MANIFESTIMAGE}:${META_TAG}
|
||||||
|
docker manifest push --purge ${MANIFESTIMAGE}:${EXT_RELEASE_TAG}
|
||||||
|
if [ -n "${SEMVER}" ]; then
|
||||||
|
docker manifest push --purge ${MANIFESTIMAGE}:${SEMVER}
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// If this is a public release tag it in the LS Github
|
||||||
|
stage('Github-Tag-Push-Release') {
|
||||||
|
when {
|
||||||
|
branch "alpine-mate"
|
||||||
|
expression {
|
||||||
|
env.LS_RELEASE != env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
||||||
|
}
|
||||||
|
environment name: 'CHANGE_ID', value: ''
|
||||||
|
environment name: 'EXIT_STATUS', value: ''
|
||||||
|
}
|
||||||
|
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 alpine-mate",\
|
||||||
|
"type": "commit",\
|
||||||
|
"tagger": {"name": "LinuxServer Jenkins","email": "jenkins@linuxserver.io","date": "'${GITHUB_DATE}'"}}' '''
|
||||||
|
echo "Pushing New release for Tag"
|
||||||
|
sh '''#! /bin/bash
|
||||||
|
echo "Updating base packages to ${PACKAGE_TAG}" > releasebody.json
|
||||||
|
echo '{"tag_name":"'${META_TAG}'",\
|
||||||
|
"target_commitish": "alpine-mate",\
|
||||||
|
"name": "'${META_TAG}'",\
|
||||||
|
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**OS Changes:**\\n\\n' > start
|
||||||
|
printf '","draft": false,"prerelease": true}' >> releasebody.json
|
||||||
|
paste -d'\\0' start releasebody.json > 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'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Use helper container to sync the current README on master to the dockerhub endpoint
|
||||||
|
stage('Sync-README') {
|
||||||
|
when {
|
||||||
|
environment name: 'CHANGE_ID', value: ''
|
||||||
|
environment name: 'EXIT_STATUS', value: ''
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
withCredentials([
|
||||||
|
[
|
||||||
|
$class: 'UsernamePasswordMultiBinding',
|
||||||
|
credentialsId: '3f9ba4d5-100d-45b0-a3c4-633fd6061207',
|
||||||
|
usernameVariable: 'DOCKERUSER',
|
||||||
|
passwordVariable: 'DOCKERPASS'
|
||||||
|
]
|
||||||
|
]) {
|
||||||
|
sh '''#! /bin/bash
|
||||||
|
set -e
|
||||||
|
TEMPDIR=$(mktemp -d)
|
||||||
|
docker pull ghcr.io/linuxserver/jenkins-builder:latest
|
||||||
|
docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH="${BRANCH_NAME}" -v ${TEMPDIR}:/ansible/jenkins ghcr.io/linuxserver/jenkins-builder:latest
|
||||||
|
docker pull ghcr.io/linuxserver/readme-sync
|
||||||
|
docker run --rm=true \
|
||||||
|
-e DOCKERHUB_USERNAME=$DOCKERUSER \
|
||||||
|
-e DOCKERHUB_PASSWORD=$DOCKERPASS \
|
||||||
|
-e GIT_REPOSITORY=${LS_USER}/${LS_REPO} \
|
||||||
|
-e DOCKER_REPOSITORY=${IMAGE} \
|
||||||
|
-e GIT_BRANCH=master \
|
||||||
|
-v ${TEMPDIR}/docker-${CONTAINER_NAME}:/mnt \
|
||||||
|
ghcr.io/linuxserver/readme-sync bash -c 'node sync'
|
||||||
|
rm -Rf ${TEMPDIR} '''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// If this is a Pull request send the CI link as a comment on it
|
||||||
|
stage('Pull Request Comment') {
|
||||||
|
when {
|
||||||
|
not {environment name: 'CHANGE_ID', value: ''}
|
||||||
|
environment name: 'EXIT_STATUS', value: ''
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
sh '''#! /bin/bash
|
||||||
|
# Function to retrieve JSON data from URL
|
||||||
|
get_json() {
|
||||||
|
local url="$1"
|
||||||
|
local response=$(curl -s "$url")
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "Failed to retrieve JSON data from $url"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
local json=$(echo "$response" | jq .)
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "Failed to parse JSON data from $url"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
echo "$json"
|
||||||
|
}
|
||||||
|
|
||||||
|
build_table() {
|
||||||
|
local data="$1"
|
||||||
|
|
||||||
|
# Get the keys in the JSON data
|
||||||
|
local keys=$(echo "$data" | jq -r 'to_entries | map(.key) | .[]')
|
||||||
|
|
||||||
|
# Check if keys are empty
|
||||||
|
if [ -z "$keys" ]; then
|
||||||
|
echo "JSON report data does not contain any keys or the report does not exist."
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Build table header
|
||||||
|
local header="| Tag | Passed |\\n| --- | --- |\\n"
|
||||||
|
|
||||||
|
# Loop through the JSON data to build the table rows
|
||||||
|
local rows=""
|
||||||
|
for build in $keys; do
|
||||||
|
local status=$(echo "$data" | jq -r ".[\\"$build\\"].test_success")
|
||||||
|
if [ "$status" = "true" ]; then
|
||||||
|
status="✅"
|
||||||
|
else
|
||||||
|
status="❌"
|
||||||
|
fi
|
||||||
|
local row="| "$build" | "$status" |\\n"
|
||||||
|
rows="${rows}${row}"
|
||||||
|
done
|
||||||
|
|
||||||
|
local table="${header}${rows}"
|
||||||
|
local escaped_table=$(echo "$table" | sed 's/\"/\\\\"/g')
|
||||||
|
echo "$escaped_table"
|
||||||
|
}
|
||||||
|
|
||||||
|
if [[ "${CI}" = "true" ]]; then
|
||||||
|
# Retrieve JSON data from URL
|
||||||
|
data=$(get_json "$CI_JSON_URL")
|
||||||
|
# Create table from JSON data
|
||||||
|
table=$(build_table "$data")
|
||||||
|
echo -e "$table"
|
||||||
|
|
||||||
|
curl -X POST -H "Authorization: token $GITHUB_TOKEN" \
|
||||||
|
-H "Accept: application/vnd.github.v3+json" \
|
||||||
|
"https://api.github.com/repos/$LS_USER/$LS_REPO/issues/$PULL_REQUEST/comments" \
|
||||||
|
-d "{\\"body\\": \\"I am a bot, here are the test results for this PR: \\n${CI_URL}\\n${SHELLCHECK_URL}\\n${table}\\"}"
|
||||||
|
else
|
||||||
|
curl -X POST -H "Authorization: token $GITHUB_TOKEN" \
|
||||||
|
-H "Accept: application/vnd.github.v3+json" \
|
||||||
|
"https://api.github.com/repos/$LS_USER/$LS_REPO/issues/$PULL_REQUEST/comments" \
|
||||||
|
-d "{\\"body\\": \\"I am a bot, here is the pushed image/manifest for this PR: \\n\\n\\`${GITHUBIMAGE}:${META_TAG}\\`\\"}"
|
||||||
|
fi
|
||||||
|
'''
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* ######################
|
||||||
|
Send status to Discord
|
||||||
|
###################### */
|
||||||
|
post {
|
||||||
|
always {
|
||||||
|
script{
|
||||||
|
if (env.EXIT_STATUS == "ABORTED"){
|
||||||
|
sh 'echo "build aborted"'
|
||||||
|
}
|
||||||
|
else if (currentBuild.currentResult == "SUCCESS"){
|
||||||
|
sh ''' curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/jenkins-avatar.png","embeds": [{"color": 1681177,\
|
||||||
|
"description": "**Build:** '${BUILD_NUMBER}'\\n**CI Results:** '${CI_URL}'\\n**ShellCheck Results:** '${SHELLCHECK_URL}'\\n**Status:** Success\\n**Job:** '${RUN_DISPLAY_URL}'\\n**Change:** '${CODE_URL}'\\n**External Release:**: '${RELEASE_LINK}'\\n**DockerHub:** '${DOCKERHUB_LINK}'\\n"}],\
|
||||||
|
"username": "Jenkins"}' ${BUILDS_DISCORD} '''
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
sh ''' curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/jenkins-avatar.png","embeds": [{"color": 16711680,\
|
||||||
|
"description": "**Build:** '${BUILD_NUMBER}'\\n**CI Results:** '${CI_URL}'\\n**ShellCheck Results:** '${SHELLCHECK_URL}'\\n**Status:** failure\\n**Job:** '${RUN_DISPLAY_URL}'\\n**Change:** '${CODE_URL}'\\n**External Release:**: '${RELEASE_LINK}'\\n**DockerHub:** '${DOCKERHUB_LINK}'\\n"}],\
|
||||||
|
"username": "Jenkins"}' ${BUILDS_DISCORD} '''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cleanup {
|
||||||
|
sh '''#! /bin/bash
|
||||||
|
echo "Performing docker system prune!!"
|
||||||
|
containers=$(docker ps -aq)
|
||||||
|
if [[ -n "${containers}" ]]; then
|
||||||
|
docker stop ${containers}
|
||||||
|
fi
|
||||||
|
docker system prune -af --volumes || :
|
||||||
|
'''
|
||||||
|
cleanWs()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
12
README.md
12
README.md
@ -1,10 +1,4 @@
|
|||||||
<!-- DO NOT EDIT THIS FILE MANUALLY -->
|
<!-- DO NOT EDIT THIS FILE MANUALLY -->
|
||||||
<!-- Please read https://github.com/linuxserver/docker-rdesktop/blob/master/.github/CONTRIBUTING.md -->
|
<!-- Please read the https://github.com/linuxserver/docker-rdesktop/blob/alpine-mate/.github/CONTRIBUTING.md -->
|
||||||
# DEPRECATION NOTICE
|
|
||||||
This image is deprecated. We will not offer support for this image and it will not be updated.
|
|
||||||
|
|
||||||
|
Up to date documentation is available [here](https://github.com/linuxserver/docker-rdesktop/blob/master/README.md).
|
||||||
Please migrate to an Ubuntu-based tag. For more info, see
|
|
||||||
https://info.linuxserver.io/issues/2025-08-23-rdesktop/
|
|
||||||
|
|
||||||
Up to date documentation is available [here](https://github.com/linuxserver/docker-rdesktop/blob/ubuntu-xfce/README.md).
|
|
||||||
|
|||||||
@ -4,8 +4,9 @@
|
|||||||
project_name: docker-rdesktop
|
project_name: docker-rdesktop
|
||||||
external_type: os
|
external_type: os
|
||||||
release_type: prerelease
|
release_type: prerelease
|
||||||
release_tag: latest
|
release_tag: alpine-mate
|
||||||
ls_branch: master
|
ls_branch: alpine-mate
|
||||||
|
build_armhf: false
|
||||||
repo_vars:
|
repo_vars:
|
||||||
- BUILD_VERSION_ARG = 'OS_VERSION'
|
- BUILD_VERSION_ARG = 'OS_VERSION'
|
||||||
- LS_USER = 'linuxserver'
|
- LS_USER = 'linuxserver'
|
||||||
@ -21,6 +22,6 @@ repo_vars:
|
|||||||
- CI_PORT = '3000'
|
- CI_PORT = '3000'
|
||||||
- CI_SSL = 'false'
|
- CI_SSL = 'false'
|
||||||
- CI_DELAY = '30'
|
- CI_DELAY = '30'
|
||||||
- CI_DOCKERENV = ''
|
- CI_DOCKERENV = 'TZ=US/Pacific'
|
||||||
- CI_AUTH = ''
|
- CI_AUTH = 'user:password'
|
||||||
- CI_WEBPATH = ''
|
- CI_WEBPATH = ''
|
||||||
|
|||||||
1519
package_versions.txt
1519
package_versions.txt
File diff suppressed because it is too large
Load Diff
@ -1,11 +1,9 @@
|
|||||||
|
---
|
||||||
|
|
||||||
# project information
|
# project information
|
||||||
project_name: rdesktop
|
project_name: rdesktop
|
||||||
project_lsio_github_repo_url: "https://github.com/linuxserver/docker-{{ project_name }}"
|
project_lsio_github_repo_url: "https://github.com/linuxserver/docker-{{ project_name }}"
|
||||||
project_deprecation_status: true
|
|
||||||
project_deprecation_message: |
|
|
||||||
Please migrate to an Ubuntu-based tag. For more info, see
|
|
||||||
https://info.linuxserver.io/issues/2025-08-23-rdesktop/
|
|
||||||
full_custom_readme: |
|
full_custom_readme: |
|
||||||
{% raw -%}
|
{% raw -%}
|
||||||
Up to date documentation is available [here](https://github.com/linuxserver/docker-rdesktop/blob/ubuntu-xfce/README.md).
|
Up to date documentation is available [here](https://github.com/linuxserver/docker-rdesktop/blob/master/README.md).
|
||||||
{%- endraw %}
|
{%- endraw %}
|
||||||
|
|||||||
@ -1,34 +1,3 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Combine env
|
|
||||||
/usr/bin/with-contenv /usr/bin/env | sed 's/^/export /g' > /defaults/env.sh
|
|
||||||
source /defaults/env.sh
|
|
||||||
rm /defaults/env.sh
|
|
||||||
|
|
||||||
# Enable Nvidia GPU support if detected
|
|
||||||
if which nvidia-smi; then
|
|
||||||
export LIBGL_KOPPER_DRI2=1
|
|
||||||
export MESA_LOADER_DRIVER_OVERRIDE=zink
|
|
||||||
export GALLIUM_DRIVER=zink
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Start Pulseaudio
|
|
||||||
/startpulse.sh &
|
/startpulse.sh &
|
||||||
|
/usr/bin/mate-session > /dev/null 2>&1
|
||||||
# Disable compositing
|
|
||||||
setterm blank 0
|
|
||||||
setterm powerdown 0
|
|
||||||
if [ ! -f "${HOME}"/.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml ]; then
|
|
||||||
mkdir -p "${HOME}"/.config/xfce4/xfconf/xfce-perchannel-xml/
|
|
||||||
cat <<EOT >> "${HOME}"/.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml
|
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<channel name="xfwm4" version="1.0">
|
|
||||||
<property name="general" type="empty">
|
|
||||||
<property name="use_compositing" type="bool" value="false"/>
|
|
||||||
</property>
|
|
||||||
</channel>
|
|
||||||
EOT
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Launch DE
|
|
||||||
/usr/bin/xfce4-session > /dev/null 2>&1
|
|
||||||
|
|||||||
@ -1,19 +0,0 @@
|
|||||||
#!/usr/bin/with-contenv bash
|
|
||||||
# shellcheck shell=bash
|
|
||||||
|
|
||||||
echo '
|
|
||||||
╔════════════════════════════════════════════════════╗
|
|
||||||
╠════════════════════════════════════════════════════╣
|
|
||||||
║ ║
|
|
||||||
║ This image is deprecated. ║
|
|
||||||
║ We will not offer support for this image ║
|
|
||||||
║ and it will not be updated. ║
|
|
||||||
║ ║
|
|
||||||
╠════════════════════════════════════════════════════╣
|
|
||||||
╚════════════════════════════════════════════════════╝
|
|
||||||
|
|
||||||
Please migrate to an Ubuntu-based tag. For more info, see
|
|
||||||
https://info.linuxserver.io/issues/2025-08-23-rdesktop/
|
|
||||||
|
|
||||||
|
|
||||||
══════════════════════════════════════════════════════'
|
|
||||||
@ -1 +0,0 @@
|
|||||||
oneshot
|
|
||||||
Loading…
x
Reference in New Issue
Block a user