Skip to content

Commit 4a07401

Browse files
Merge pull request #36 from dappnode/3alpha/updating-upstream
Update upstream
2 parents 284f91a + b9d1f1f commit 4a07401

53 files changed

Lines changed: 918 additions & 979 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# This file is globally distributed to all container image projects from
2+
# https://github.com/linuxserver/docker-jenkins-builder/blob/master/.editorconfig
3+
4+
# top-most EditorConfig file
5+
root = true
6+
7+
# Unix-style newlines with a newline ending every file
8+
[*]
9+
end_of_line = lf
10+
insert_final_newline = true
11+
# trim_trailing_whitespace may cause unintended issues and should not be globally set true
12+
trim_trailing_whitespace = false
13+
14+
[{Dockerfile*,**.yml}]
15+
indent_style = space
16+
indent_size = 2
17+
18+
[{**.sh,root/etc/s6-overlay/s6-rc.d/**,root/etc/cont-init.d/**,root/etc/services.d/**}]
19+
indent_style = space
20+
indent_size = 4

.github/CONTRIBUTING.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
* While contributing make sure to make all your changes before creating a Pull Request, as our pipeline builds each commit after the PR is open.
66
* Read, and fill the Pull Request template
7-
* If this is a fix for a typo in code or documentation in the README please file an issue
7+
* 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
88
* If the PR is addressing an existing issue include, closes #\<issue number>, in the body of the PR commit message
99
* 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)
1010

@@ -96,7 +96,7 @@ If you are proposing additional packages to be added, ensure that you added the
9696

9797
### Testing your changes
9898

99-
```
99+
```bash
100100
git clone https://github.com/linuxserver/docker-wireguard.git
101101
cd docker-wireguard
102102
docker build \
@@ -106,13 +106,14 @@ docker build \
106106
```
107107

108108
The ARM variants can be built on x86_64 hardware using `multiarch/qemu-user-static`
109-
```
109+
110+
```bash
110111
docker run --rm --privileged multiarch/qemu-user-static:register --reset
111112
```
112113

113114
Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64`.
114115

115-
## Update the chagelog
116+
## Update the changelog
116117

117118
If you are modifying the Dockerfiles or any of the startup scripts in [root](https://github.com/linuxserver/docker-wireguard/tree/master/root), add an entry to the changelog
118119

.github/ISSUE_TEMPLATE/issue.bug.md

Lines changed: 0 additions & 40 deletions
This file was deleted.
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Based on the issue template
2+
name: Bug report
3+
description: Create a report to help us improve
4+
title: "[BUG] <title>"
5+
labels: [Bug]
6+
body:
7+
- type: checkboxes
8+
attributes:
9+
label: Is there an existing issue for this?
10+
description: Please search to see if an issue already exists for the bug you encountered.
11+
options:
12+
- label: I have searched the existing issues
13+
required: true
14+
- type: textarea
15+
attributes:
16+
label: Current Behavior
17+
description: Tell us what happens instead of the expected behavior.
18+
validations:
19+
required: true
20+
- type: textarea
21+
attributes:
22+
label: Expected Behavior
23+
description: Tell us what should happen.
24+
validations:
25+
required: false
26+
- type: textarea
27+
attributes:
28+
label: Steps To Reproduce
29+
description: Steps to reproduce the behavior.
30+
placeholder: |
31+
1. In this environment...
32+
2. With this config...
33+
3. Run '...'
34+
4. See error...
35+
validations:
36+
required: true
37+
- type: textarea
38+
attributes:
39+
label: Environment
40+
description: |
41+
examples:
42+
- **OS**: Ubuntu 20.04
43+
- **How docker service was installed**: distro's packagemanager
44+
value: |
45+
- OS:
46+
- How docker service was installed:
47+
render: markdown
48+
validations:
49+
required: false
50+
- type: dropdown
51+
attributes:
52+
label: CPU architecture
53+
options:
54+
- x86-64
55+
- arm64
56+
validations:
57+
required: true
58+
- type: textarea
59+
attributes:
60+
label: Docker creation
61+
description: |
62+
Command used to create docker container
63+
Provide your docker create/run command or compose yaml snippet, or a screenshot of settings if using a gui to create the container
64+
render: bash
65+
validations:
66+
required: true
67+
- type: textarea
68+
attributes:
69+
description: |
70+
Provide a full docker log, output of "docker logs linuxserver.io"
71+
label: Container logs
72+
placeholder: |
73+
Output of `docker logs linuxserver.io`
74+
render: bash
75+
validations:
76+
required: true

.github/ISSUE_TEMPLATE/issue.feature.md

Lines changed: 0 additions & 25 deletions
This file was deleted.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Based on the issue template
2+
name: Feature request
3+
description: Suggest an idea for this project
4+
title: "[FEAT] <title>"
5+
labels: [enhancement]
6+
body:
7+
- type: checkboxes
8+
attributes:
9+
label: Is this a new feature request?
10+
description: Please search to see if a feature request already exists.
11+
options:
12+
- label: I have searched the existing issues
13+
required: true
14+
- type: textarea
15+
attributes:
16+
label: Wanted change
17+
description: Tell us what you want to happen.
18+
validations:
19+
required: true
20+
- type: textarea
21+
attributes:
22+
label: Reason for change
23+
description: Justify your request, why do you want it, what is the benefit.
24+
validations:
25+
required: true
26+
- type: textarea
27+
attributes:
28+
label: Proposed code change
29+
description: Do you have a potential code change in mind?
30+
validations:
31+
required: false

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@
1515
1616
**What does this PR do? Why is it needed?**
1717

18-
**How can be tested?**
18+
<!--- 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 -->
19+
<!--- Ask yourself if this modification is something the whole userbase will benefit from, if this is a specific change for corner case functionality or plugins please look at making a Docker Mod or local script https://blog.linuxserver.io/2019/09/14/customizing-our-containers/ -->
20+
<!--- That if the PR is addressing an existing issue include, closes #<issue number> , in the body of the PR commit message -->
21+
<!--- You have included links to any files / patches etc your PR may be using in the body of the PR commit message -->
22+
<!--- We maintain a changelog of major revisions to the container at the end of readme-vars.yml in the root of this repository, please add your changes there if appropriate -->
1923

2024
> Provide well detailed instructions to test this PR
2125
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Issue & PR Tracker
2+
3+
on:
4+
issues:
5+
types: [opened,reopened,labeled,unlabeled,closed]
6+
pull_request_target:
7+
types: [opened,reopened,review_requested,review_request_removed,labeled,unlabeled,closed]
8+
pull_request_review:
9+
types: [submitted,edited,dismissed]
10+
11+
jobs:
12+
manage-project:
13+
permissions:
14+
issues: write
15+
uses: linuxserver/github-workflows/.github/workflows/issue-pr-tracker.yml@v1
16+
secrets: inherit
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Mark stale issues and pull requests
2+
on:
3+
schedule:
4+
- cron: '20 0 * * *'
5+
workflow_dispatch:
6+
7+
jobs:
8+
stale:
9+
permissions:
10+
issues: write
11+
pull-requests: write
12+
uses: linuxserver/github-workflows/.github/workflows/issues-cron.yml@v1
13+
secrets: inherit

.github/workflows/external_trigger.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,20 @@ jobs:
77
external-trigger-master:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v2.3.3
10+
- uses: actions/checkout@v3.1.0
1111

1212
- name: External Trigger
1313
if: github.ref == 'refs/heads/master'
1414
run: |
1515
if [ -n "${{ secrets.PAUSE_EXTERNAL_TRIGGER_WIREGUARD_MASTER }}" ]; then
1616
echo "**** Github secret PAUSE_EXTERNAL_TRIGGER_WIREGUARD_MASTER is set; skipping trigger. ****"
17+
echo "Github secret \`PAUSE_EXTERNAL_TRIGGER_WIREGUARD_MASTER\` is set; skipping trigger." >> $GITHUB_STEP_SUMMARY
1718
exit 0
1819
fi
1920
echo "**** External trigger running off of master branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_WIREGUARD_MASTER\". ****"
21+
echo "External trigger running off of master branch. To disable this trigger, set a Github secret named \`PAUSE_EXTERNAL_TRIGGER_WIREGUARD_MASTER\`" >> $GITHUB_STEP_SUMMARY
2022
echo "**** Retrieving external version ****"
21-
EXT_RELEASE=$(curl -sX GET https://api.github.com/repos/WireGuard/wireguard-tools/tags | jq -r .[0].name)
23+
EXT_RELEASE=$(curl -u ${{ secrets.CR_USER }}:${{ secrets.CR_PAT }} -sX GET https://api.github.com/repos/WireGuard/wireguard-tools/tags | jq -r .[0].name)
2224
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
2325
echo "**** Can't retrieve external version, exiting ****"
2426
FAILURE_REASON="Can't retrieve external version for wireguard branch master"
@@ -30,6 +32,7 @@ jobs:
3032
fi
3133
EXT_RELEASE=$(echo ${EXT_RELEASE} | sed 's/[~,%@+;:/]//g')
3234
echo "**** External version: ${EXT_RELEASE} ****"
35+
echo "External version: ${EXT_RELEASE}" >> $GITHUB_STEP_SUMMARY
3336
echo "**** Retrieving last pushed version ****"
3437
image="linuxserver/wireguard"
3538
tag="latest"
@@ -48,8 +51,12 @@ jobs:
4851
| jq -r '.config.digest')
4952
image_info=$(curl -sL \
5053
--header "Authorization: Bearer ${token}" \
51-
"https://ghcr.io/v2/${image}/blobs/${digest}" \
52-
| jq -r '.container_config')
54+
"https://ghcr.io/v2/${image}/blobs/${digest}")
55+
if [[ $(echo $image_info | jq -r '.container_config') == "null" ]]; then
56+
image_info=$(echo $image_info | jq -r '.config')
57+
else
58+
image_info=$(echo $image_info | jq -r '.container_config')
59+
fi
5360
IMAGE_RELEASE=$(echo ${image_info} | jq -r '.Labels.build_version' | awk '{print $3}')
5461
IMAGE_VERSION=$(echo ${IMAGE_RELEASE} | awk -F'-ls' '{print $1}')
5562
if [ -z "${IMAGE_VERSION}" ]; then
@@ -61,14 +68,18 @@ jobs:
6168
exit 1
6269
fi
6370
echo "**** Last pushed version: ${IMAGE_VERSION} ****"
71+
echo "Last pushed version: ${IMAGE_VERSION}" >> $GITHUB_STEP_SUMMARY
6472
if [ "${EXT_RELEASE}" == "${IMAGE_VERSION}" ]; then
6573
echo "**** Version ${EXT_RELEASE} already pushed, exiting ****"
74+
echo "Version ${EXT_RELEASE} already pushed, exiting" >> $GITHUB_STEP_SUMMARY
6675
exit 0
6776
elif [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-wireguard/job/master/lastBuild/api/json | jq -r '.building') == "true" ]; then
6877
echo "**** New version ${EXT_RELEASE} found; but there already seems to be an active build on Jenkins; exiting ****"
78+
echo "New version ${EXT_RELEASE} found; but there already seems to be an active build on Jenkins; exiting" >> $GITHUB_STEP_SUMMARY
6979
exit 0
7080
else
7181
echo "**** New version ${EXT_RELEASE} found; old version was ${IMAGE_VERSION}. Triggering new build ****"
82+
echo "New version ${EXT_RELEASE} found; old version was ${IMAGE_VERSION}. Triggering new build" >> $GITHUB_STEP_SUMMARY
7283
response=$(curl -iX POST \
7384
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-wireguard/job/master/buildWithParameters?PACKAGE_CHECK=false \
7485
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
@@ -78,6 +89,7 @@ jobs:
7889
buildurl=$(curl -s "${response%$'\r'}api/json" | jq -r '.executable.url')
7990
buildurl="${buildurl%$'\r'}"
8091
echo "**** Jenkins job build url: ${buildurl} ****"
92+
echo "Jenkins job build url: ${buildurl}" >> $GITHUB_STEP_SUMMARY
8193
echo "**** Attempting to change the Jenkins job description ****"
8294
curl -iX POST \
8395
"${buildurl}submitDescription" \

0 commit comments

Comments
 (0)