Skip to content
This repository was archived by the owner on Jan 7, 2024. It is now read-only.

Commit 69fd14a

Browse files
authored
Merge pull request #197 from linuxserver/mongoless-poc
2 parents c86d281 + b1d589f commit 69fd14a

File tree

13 files changed

+164
-94
lines changed

13 files changed

+164
-94
lines changed

.github/CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
## Readme
2525

2626
If you would like to change our readme, please __**do not**__ directly edit the readme, as it is auto-generated on each commit.
27-
Instead edit the [readme-vars.yml](https://github.com/linuxserver/docker-unifi-controller/edit/master/readme-vars.yml).
27+
Instead edit the [readme-vars.yml](https://github.com/linuxserver/docker-unifi-controller/edit/mongoless/readme-vars.yml).
2828

2929
These variables are used in a template for our [Jenkins Builder](https://github.com/linuxserver/docker-jenkins-builder) as part of an ansible play.
3030
Most of these variables are also carried over to [docs.linuxserver.io](https://docs.linuxserver.io/images/docker-unifi-controller)
@@ -115,7 +115,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
115115

116116
## Update the changelog
117117

118-
If you are modifying the Dockerfiles or any of the startup scripts in [root](https://github.com/linuxserver/docker-unifi-controller/tree/master/root), add an entry to the changelog
118+
If you are modifying the Dockerfiles or any of the startup scripts in [root](https://github.com/linuxserver/docker-unifi-controller/tree/mongoless/root), add an entry to the changelog
119119

120120
```yml
121121
changelogs:

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
------------------------------
2323

24-
- [ ] I have read the [contributing](https://github.com/linuxserver/docker-unifi-controller/blob/master/.github/CONTRIBUTING.md) guideline and understand that I have made the correct modifications
24+
- [ ] I have read the [contributing](https://github.com/linuxserver/docker-unifi-controller/blob/mongoless/.github/CONTRIBUTING.md) guideline and understand that I have made the correct modifications
2525

2626
------------------------------
2727

.github/workflows/external_trigger.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,24 @@ on:
44
workflow_dispatch:
55

66
jobs:
7-
external-trigger-master:
7+
external-trigger-mongoless:
88
runs-on: ubuntu-latest
99
steps:
1010
- uses: actions/checkout@v3.1.0
1111

1212
- name: External Trigger
13-
if: github.ref == 'refs/heads/master'
13+
if: github.ref == 'refs/heads/mongoless'
1414
run: |
15-
if [ -n "${{ secrets.PAUSE_EXTERNAL_TRIGGER_UNIFI_CONTROLLER_MASTER }}" ]; then
16-
echo "**** Github secret PAUSE_EXTERNAL_TRIGGER_UNIFI_CONTROLLER_MASTER is set; skipping trigger. ****"
15+
if [ -n "${{ secrets.PAUSE_EXTERNAL_TRIGGER_UNIFI_CONTROLLER_MONGOLESS }}" ]; then
16+
echo "**** Github secret PAUSE_EXTERNAL_TRIGGER_UNIFI_CONTROLLER_MONGOLESS is set; skipping trigger. ****"
1717
exit 0
1818
fi
19-
echo "**** External trigger running off of master branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_UNIFI_CONTROLLER_MASTER\". ****"
19+
echo "**** External trigger running off of mongoless branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_UNIFI_CONTROLLER_MONGOLESS\". ****"
2020
echo "**** Retrieving external version ****"
2121
EXT_RELEASE=$(curl -sX GET http://dl-origin.ubnt.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}')
2222
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
2323
echo "**** Can't retrieve external version, exiting ****"
24-
FAILURE_REASON="Can't retrieve external version for unifi-controller branch master"
24+
FAILURE_REASON="Can't retrieve external version for unifi-controller branch mongoless"
2525
GHA_TRIGGER_URL="https://github.com/linuxserver/docker-unifi-controller/actions/runs/${{ github.run_id }}"
2626
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 16711680,
2727
"description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n**Trigger URL:** '"${GHA_TRIGGER_URL}"' \n"}],
@@ -32,7 +32,7 @@ jobs:
3232
echo "**** External version: ${EXT_RELEASE} ****"
3333
echo "**** Retrieving last pushed version ****"
3434
image="linuxserver/unifi-controller"
35-
tag="latest"
35+
tag="mongoless"
3636
token=$(curl -sX GET \
3737
"https://ghcr.io/token?scope=repository%3Alinuxserver%2Funifi-controller%3Apull" \
3838
| jq -r '.token')
@@ -58,7 +58,7 @@ jobs:
5858
IMAGE_VERSION=$(echo ${IMAGE_RELEASE} | awk -F'-ls' '{print $1}')
5959
if [ -z "${IMAGE_VERSION}" ]; then
6060
echo "**** Can't retrieve last pushed version, exiting ****"
61-
FAILURE_REASON="Can't retrieve last pushed version for unifi-controller tag latest"
61+
FAILURE_REASON="Can't retrieve last pushed version for unifi-controller tag mongoless"
6262
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 16711680,
6363
"description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n"}],
6464
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
@@ -68,13 +68,13 @@ jobs:
6868
if [ "${EXT_RELEASE}" == "${IMAGE_VERSION}" ]; then
6969
echo "**** Version ${EXT_RELEASE} already pushed, exiting ****"
7070
exit 0
71-
elif [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-unifi-controller/job/master/lastBuild/api/json | jq -r '.building') == "true" ]; then
71+
elif [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-unifi-controller/job/mongoless/lastBuild/api/json | jq -r '.building') == "true" ]; then
7272
echo "**** New version ${EXT_RELEASE} found; but there already seems to be an active build on Jenkins; exiting ****"
7373
exit 0
7474
else
7575
echo "**** New version ${EXT_RELEASE} found; old version was ${IMAGE_VERSION}. Triggering new build ****"
7676
response=$(curl -iX POST \
77-
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-unifi-controller/job/master/buildWithParameters?PACKAGE_CHECK=false \
77+
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-unifi-controller/job/mongoless/buildWithParameters?PACKAGE_CHECK=false \
7878
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
7979
echo "**** Jenkins job queue url: ${response%$'\r'} ****"
8080
echo "**** Sleeping 10 seconds until job starts ****"
@@ -89,7 +89,7 @@ jobs:
8989
--data-urlencode "description=GHA external trigger https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
9090
--data-urlencode "Submit=Submit"
9191
echo "**** Notifying Discord ****"
92-
TRIGGER_REASON="A version change was detected for unifi-controller tag latest. Old version:${IMAGE_VERSION} New version:${EXT_RELEASE}"
92+
TRIGGER_REASON="A version change was detected for unifi-controller tag mongoless. Old version:${IMAGE_VERSION} New version:${EXT_RELEASE}"
9393
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903,
9494
"description": "**Build Triggered** \n**Reason:** '"${TRIGGER_REASON}"' \n**Build URL:** '"${buildurl}display/redirect"' \n"}],
9595
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}

.github/workflows/greetings.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ jobs:
99
- uses: actions/first-interaction@v1
1010
with:
1111
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.'
12-
pr-message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/linuxserver/docker-unifi-controller/blob/master/.github/PULL_REQUEST_TEMPLATE.md)!'
12+
pr-message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/linuxserver/docker-unifi-controller/blob/mongoless/.github/PULL_REQUEST_TEMPLATE.md)!'
1313
repo-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/package_trigger.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,25 @@ on:
44
workflow_dispatch:
55

66
jobs:
7-
package-trigger-master:
7+
package-trigger-mongoless:
88
runs-on: ubuntu-latest
99
steps:
1010
- uses: actions/checkout@v3.1.0
1111

1212
- name: Package Trigger
13-
if: github.ref == 'refs/heads/master'
13+
if: github.ref == 'refs/heads/mongoless'
1414
run: |
15-
if [ -n "${{ secrets.PAUSE_PACKAGE_TRIGGER_UNIFI_CONTROLLER_MASTER }}" ]; then
16-
echo "**** Github secret PAUSE_PACKAGE_TRIGGER_UNIFI_CONTROLLER_MASTER is set; skipping trigger. ****"
15+
if [ -n "${{ secrets.PAUSE_PACKAGE_TRIGGER_UNIFI_CONTROLLER_MONGOLESS }}" ]; then
16+
echo "**** Github secret PAUSE_PACKAGE_TRIGGER_UNIFI_CONTROLLER_MONGOLESS is set; skipping trigger. ****"
1717
exit 0
1818
fi
19-
if [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-unifi-controller/job/master/lastBuild/api/json | jq -r '.building') == "true" ]; then
19+
if [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-unifi-controller/job/mongoless/lastBuild/api/json | jq -r '.building') == "true" ]; then
2020
echo "**** There already seems to be an active build on Jenkins; skipping package trigger ****"
2121
exit 0
2222
fi
23-
echo "**** Package trigger running off of master branch. To disable, set a Github secret named \"PAUSE_PACKAGE_TRIGGER_UNIFI_CONTROLLER_MASTER\". ****"
23+
echo "**** Package trigger running off of mongoless branch. To disable, set a Github secret named \"PAUSE_PACKAGE_TRIGGER_UNIFI_CONTROLLER_MONGOLESS\". ****"
2424
response=$(curl -iX POST \
25-
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-unifi-controller/job/master/buildWithParameters?PACKAGE_CHECK=true \
25+
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-unifi-controller/job/mongoless/buildWithParameters?PACKAGE_CHECK=true \
2626
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
2727
echo "**** Jenkins job queue url: ${response%$'\r'} ****"
2828
echo "**** Sleeping 10 seconds until job starts ****"

Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# syntax=docker/dockerfile:1
22

3-
FROM ghcr.io/linuxserver/baseimage-ubuntu:focal
3+
FROM ghcr.io/linuxserver/baseimage-ubuntu:jammy
44

55
# set version label
66
ARG BUILD_DATE
@@ -21,7 +21,6 @@ RUN \
2121
jsvc \
2222
libcap2 \
2323
logrotate \
24-
mongodb-server \
2524
openjdk-11-jre-headless \
2625
wget && \
2726
echo "**** install unifi ****" && \
@@ -35,7 +34,7 @@ RUN \
3534
curl -o \
3635
/tmp/unifi.deb -L \
3736
"https://dl.ui.com/unifi/${UNIFI_VERSION}/unifi_sysvinit_all.deb" && \
38-
dpkg -i /tmp/unifi.deb && \
37+
dpkg -i --ignore-depends=mongodb-org-server /tmp/unifi.deb && \
3938
echo "**** cleanup ****" && \
4039
apt-get clean && \
4140
rm -rf \

Dockerfile.aarch64

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# syntax=docker/dockerfile:1
22

3-
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-focal
3+
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-jammy
44

55
# set version label
66
ARG BUILD_DATE
@@ -21,7 +21,6 @@ RUN \
2121
jsvc \
2222
libcap2 \
2323
logrotate \
24-
mongodb-server \
2524
openjdk-11-jre-headless \
2625
wget && \
2726
echo "**** install unifi ****" && \
@@ -35,7 +34,7 @@ RUN \
3534
curl -o \
3635
/tmp/unifi.deb -L \
3736
"https://dl.ui.com/unifi/${UNIFI_VERSION}/unifi_sysvinit_all.deb" && \
38-
dpkg -i /tmp/unifi.deb && \
37+
dpkg -i --ignore-depends=mongodb-org-server /tmp/unifi.deb && \
3938
echo "**** cleanup ****" && \
4039
apt-get clean && \
4140
rm -rf \

0 commit comments

Comments
 (0)