Skip to content

Commit 702b7ae

Browse files
committed
Merge remote-tracking branch 'origin/main' into replace-placeholers-in-proeprties
2 parents 04db7da + 1e5cab7 commit 702b7ae

10 files changed

Lines changed: 70 additions & 39 deletions

File tree

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Read, and fill the Pull Request template
77
* 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
9-
* 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)
9+
* 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)
1010

1111
## Common files
1212

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
blank_issues_enabled: false
22
contact_links:
33
- name: Discord chat support
4-
url: https://discord.gg/YWrKVTn
4+
url: https://linuxserver.io/discord
55
about: Realtime support / chat with the community and the team.
66

77
- name: Discourse discussion forum

.github/workflows/external_trigger.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,24 @@ jobs:
1515
SKIP_EXTERNAL_TRIGGER: ${{ vars.SKIP_EXTERNAL_TRIGGER }}
1616
run: |
1717
printf "# External trigger for docker-unifi-network-application\n\n" >> $GITHUB_STEP_SUMMARY
18-
if grep -q "^unifi-network-application_main" <<< "${SKIP_EXTERNAL_TRIGGER}"; then
18+
if grep -q "^unifi-network-application_main_" <<< "${SKIP_EXTERNAL_TRIGGER}"; then
19+
echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY
20+
echo "> Github organizational variable \`SKIP_EXTERNAL_TRIGGER\` contains \`unifi-network-application_main_\`; will skip trigger if version matches." >> $GITHUB_STEP_SUMMARY
21+
elif grep -q "^unifi-network-application_main" <<< "${SKIP_EXTERNAL_TRIGGER}"; then
1922
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
2023
echo "> Github organizational variable \`SKIP_EXTERNAL_TRIGGER\` contains \`unifi-network-application_main\`; skipping trigger." >> $GITHUB_STEP_SUMMARY
2124
exit 0
2225
fi
2326
echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY
2427
echo "> External trigger running off of main branch. To disable this trigger, add \`unifi-network-application_main\` into the Github organizational variable \`SKIP_EXTERNAL_TRIGGER\`." >> $GITHUB_STEP_SUMMARY
2528
printf "\n## Retrieving external version\n\n" >> $GITHUB_STEP_SUMMARY
26-
EXT_RELEASE=$(curl -sX GET https://dl.ui.com/unifi/debian/dists/stable/ubiquiti/binary-amd64/Packages |grep -A 7 -m 1 'Package: unifi' | awk -F ': ' '/Version/{print $2;exit}' | awk -F '-' '{print $1}')
29+
EXT_RELEASE=$(curl -sX GET https://dl.ui.com/unifi/debian/dists/stable/ubiquiti/binary-amd64/Packages.gz | gunzip | grep -A 7 -m 1 'Package: unifi' | awk -F ': ' '/Version/{print $2;exit}' | awk -F '-' '{print $1}')
2730
echo "Type is \`custom_version_command\`" >> $GITHUB_STEP_SUMMARY
31+
if grep -q "^unifi-network-application_main_${EXT_RELEASE}" <<< "${SKIP_EXTERNAL_TRIGGER}"; then
32+
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
33+
echo "> Github organizational variable \`SKIP_EXTERNAL_TRIGGER\` matches current external release; skipping trigger." >> $GITHUB_STEP_SUMMARY
34+
exit 0
35+
fi
2836
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
2937
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
3038
echo "> Can't retrieve external version, exiting" >> $GITHUB_STEP_SUMMARY

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ RUN \
2424
unzip && \
2525
echo "**** install unifi ****" && \
2626
if [ -z ${UNIFI_VERSION+x} ]; then \
27-
UNIFI_VERSION=$(curl -sX GET https://dl.ui.com/unifi/debian/dists/${UNIFI_BRANCH}/ubiquiti/binary-amd64/Packages \
28-
|grep -A 7 -m 1 'Package: unifi' \
27+
UNIFI_VERSION=$(curl -sX GET https://dl.ui.com/unifi/debian/dists/${UNIFI_BRANCH}/ubiquiti/binary-amd64/Packages.gz \
28+
| gunzip \
29+
| grep -A 7 -m 1 'Package: unifi' \
2930
| awk -F ': ' '/Version/{print $2;exit}' \
3031
| awk -F '-' '{print $1}'); \
3132
fi && \

Dockerfile.aarch64

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ RUN \
2424
unzip && \
2525
echo "**** install unifi ****" && \
2626
if [ -z ${UNIFI_VERSION+x} ]; then \
27-
UNIFI_VERSION=$(curl -sX GET https://dl.ui.com/unifi/debian/dists/${UNIFI_BRANCH}/ubiquiti/binary-amd64/Packages \
28-
|grep -A 7 -m 1 'Package: unifi' \
27+
UNIFI_VERSION=$(curl -sX GET https://dl.ui.com/unifi/debian/dists/${UNIFI_BRANCH}/ubiquiti/binary-amd64/Packages.gz \
28+
| gunzip \
29+
| grep -A 7 -m 1 'Package: unifi' \
2930
| awk -F ': ' '/Version/{print $2;exit}' \
3031
| awk -F '-' '{print $1}'); \
3132
fi && \

Jenkinsfile

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,21 @@ pipeline {
5656
steps{
5757
echo "Running on node: ${NODE_NAME}"
5858
sh '''#! /bin/bash
59-
containers=$(docker ps -aq)
59+
echo "Pruning builder"
60+
docker builder prune -f --builder container || :
61+
containers=$(docker ps -q)
6062
if [[ -n "${containers}" ]]; then
61-
docker stop ${containers}
63+
BUILDX_CONTAINER_ID=$(docker ps -qf 'name=buildx_buildkit')
64+
for container in ${containers}; do
65+
if [[ "${container}" == "${BUILDX_CONTAINER_ID}" ]]; then
66+
echo "skipping buildx container in docker stop"
67+
else
68+
echo "Stopping container ${container}"
69+
docker stop ${container}
70+
fi
71+
done
6272
fi
63-
docker system prune -af --volumes || : '''
73+
docker system prune -f --volumes || : '''
6474
script{
6575
env.EXIT_STATUS = ''
6676
env.LS_RELEASE = sh(
@@ -131,7 +141,7 @@ pipeline {
131141
steps{
132142
script{
133143
env.EXT_RELEASE = sh(
134-
script: ''' curl -sX GET https://dl.ui.com/unifi/debian/dists/stable/ubiquiti/binary-amd64/Packages |grep -A 7 -m 1 'Package: unifi' | awk -F ': ' '/Version/{print $2;exit}' | awk -F '-' '{print $1}' ''',
144+
script: ''' curl -sX GET https://dl.ui.com/unifi/debian/dists/stable/ubiquiti/binary-amd64/Packages.gz | gunzip | grep -A 7 -m 1 'Package: unifi' | awk -F ': ' '/Version/{print $2;exit}' | awk -F '-' '{print $1}' ''',
135145
returnStdout: true).trim()
136146
env.RELEASE_LINK = 'custom_command'
137147
}
@@ -1152,12 +1162,21 @@ EOF
11521162
}
11531163
cleanup {
11541164
sh '''#! /bin/bash
1155-
echo "Performing docker system prune!!"
1156-
containers=$(docker ps -aq)
1165+
echo "Pruning builder!!"
1166+
docker builder prune -f --builder container || :
1167+
containers=$(docker ps -q)
11571168
if [[ -n "${containers}" ]]; then
1158-
docker stop ${containers}
1169+
BUILDX_CONTAINER_ID=$(docker ps -qf 'name=buildx_buildkit')
1170+
for container in ${containers}; do
1171+
if [[ "${container}" == "${BUILDX_CONTAINER_ID}" ]]; then
1172+
echo "skipping buildx container in docker stop"
1173+
else
1174+
echo "Stopping container ${container}"
1175+
docker stop ${container}
1176+
fi
1177+
done
11591178
fi
1160-
docker system prune -af --volumes || :
1179+
docker system prune -f --volumes || :
11611180
'''
11621181
cleanWs()
11631182
}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)](https://linuxserver.io)
44

55
[![Blog](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=Blog)](https://blog.linuxserver.io "all the things you can do with our containers including How-To guides, opinions and much more!")
6-
[![Discord](https://img.shields.io/discord/354974912613449730.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=Discord&logo=discord)](https://discord.gg/YWrKVTn "realtime support / chat with the community and the team.")
6+
[![Discord](https://img.shields.io/discord/354974912613449730.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=Discord&logo=discord)](https://linuxserver.io/discord "realtime support / chat with the community and the team.")
77
[![Discourse](https://img.shields.io/discourse/https/discourse.linuxserver.io/topics.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=discourse)](https://discourse.linuxserver.io "post on our community forum.")
88
[![Fleet](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=Fleet)](https://fleet.linuxserver.io "an online web interface which displays all of our maintained images.")
99
[![GitHub](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=GitHub&logo=github)](https://github.com/linuxserver "view the source for all of our repositories.")
@@ -20,7 +20,7 @@ The [LinuxServer.io](https://linuxserver.io) team brings you another container r
2020
Find us at:
2121

2222
* [Blog](https://blog.linuxserver.io) - all the things you can do with our containers including How-To guides, opinions and much more!
23-
* [Discord](https://discord.gg/YWrKVTn) - realtime support / chat with the community and the team.
23+
* [Discord](https://linuxserver.io/discord) - realtime support / chat with the community and the team.
2424
* [Discourse](https://discourse.linuxserver.io) - post on our community forum.
2525
* [Fleet](https://fleet.linuxserver.io) - an online web interface which displays all of our maintained images.
2626
* [GitHub](https://github.com/linuxserver) - view the source for all of our repositories.

jenkins-vars.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# jenkins variables
44
project_name: unifi-network-application
55
external_type: na
6-
custom_version_command: "curl -sX GET https://dl.ui.com/unifi/debian/dists/stable/ubiquiti/binary-amd64/Packages |grep -A 7 -m 1 'Package: unifi' | awk -F ': ' '/Version/{print $2;exit}' | awk -F '-' '{print $1}'"
6+
custom_version_command: "curl -sX GET https://dl.ui.com/unifi/debian/dists/stable/ubiquiti/binary-amd64/Packages.gz | gunzip | grep -A 7 -m 1 'Package: unifi' | awk -F ': ' '/Version/{print $2;exit}' | awk -F '-' '{print $1}'"
77
release_type: stable
88
release_tag: latest
99
ls_branch: main

0 commit comments

Comments
 (0)