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

Commit e777ca2

Browse files
Bot Updating Templated Files
1 parent 15eddf1 commit e777ca2

File tree

2 files changed

+54
-19
lines changed

2 files changed

+54
-19
lines changed

Jenkinsfile

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pipeline {
4141
script: '''curl -s https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases | jq -r 'first(.[] | select(.prerelease == true)) | .tag_name' ''',
4242
returnStdout: true).trim()
4343
env.LS_RELEASE_NOTES = sh(
44-
script: '''git log -1 --pretty=%B | sed -E ':a;N;$!ba;s/\\r{0,1}\\n/\\\\n/g' ''',
44+
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' ''',
4545
returnStdout: true).trim()
4646
env.GITHUB_DATE = sh(
4747
script: '''date '+%Y-%m-%dT%H:%M:%S%:z' ''',
@@ -292,6 +292,9 @@ pipeline {
292292
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${META_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
293293
sh "docker tag ${IMAGE}:arm32v6-${META_TAG} lsiodev/buildcache:arm32v6-${COMMIT_SHA}-${BUILD_NUMBER}"
294294
sh "docker push lsiodev/buildcache:arm32v6-${COMMIT_SHA}-${BUILD_NUMBER}"
295+
sh '''docker rmi \
296+
${IMAGE}:arm32v6-${META_TAG} \
297+
lsiodev/buildcache:arm32v6-${COMMIT_SHA}-${BUILD_NUMBER} '''
295298
}
296299
}
297300
}
@@ -318,6 +321,9 @@ pipeline {
318321
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${META_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
319322
sh "docker tag ${IMAGE}:arm64v8-${META_TAG} lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}"
320323
sh "docker push lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}"
324+
sh '''docker rmi \
325+
${IMAGE}:arm64v8-${META_TAG} \
326+
lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} '''
321327
}
322328
}
323329
}
@@ -479,6 +485,10 @@ pipeline {
479485
sh "docker tag ${IMAGE}:${META_TAG} ${IMAGE}:stable"
480486
sh "docker push ${IMAGE}:stable"
481487
sh "docker push ${IMAGE}:${META_TAG}"
488+
sh '''docker rmi \
489+
${IMAGE}:${META_TAG} \
490+
${IMAGE}:stable '''
491+
482492
}
483493
}
484494
}
@@ -526,6 +536,15 @@ pipeline {
526536
sh "docker manifest annotate ${IMAGE}:${META_TAG} ${IMAGE}:arm64v8-${META_TAG} --os linux --arch arm64 --variant v8"
527537
sh "docker manifest push --purge ${IMAGE}:stable"
528538
sh "docker manifest push --purge ${IMAGE}:${META_TAG}"
539+
sh '''docker rmi \
540+
${IMAGE}:amd64-${META_TAG} \
541+
${IMAGE}:amd64-stable \
542+
${IMAGE}:arm32v6-${META_TAG} \
543+
${IMAGE}:arm32v6-stable \
544+
${IMAGE}:arm64v8-${META_TAG} \
545+
${IMAGE}:arm64v8-stable \
546+
lsiodev/buildcache:arm32v6-${COMMIT_SHA}-${BUILD_NUMBER} \
547+
lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} '''
529548
}
530549
}
531550
}
@@ -586,6 +605,18 @@ pipeline {
586605
}
587606
}
588607
}
608+
// If this is a Pull request send the CI link as a comment on it
609+
stage('Pull Request Comment') {
610+
when {
611+
not {environment name: 'CHANGE_ID', value: ''}
612+
environment name: 'CI', value: 'true'
613+
environment name: 'EXIT_STATUS', value: ''
614+
}
615+
steps {
616+
sh '''curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/issues/${PULL_REQUEST}/comments \
617+
-d '{"body": "I am a bot, here are the test results for this PR '${CI_URL}'"}' '''
618+
}
619+
}
589620
}
590621
/* ######################
591622
Send status to Discord

README.md

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,6 @@ Find us at:
1414
* [Blog](https://blog.linuxserver.io) - all the things you can do with our containers including How-To guides, opinions and much more!
1515
* [Podcast](https://anchor.fm/linuxserverio) - on hiatus. Coming back soon (late 2018).
1616

17-
# PSA: Changes are happening
18-
19-
From August 2018 onwards, Linuxserver are in the midst of switching to a new CI platform which will enable us to build and release multiple architectures under a single repo. To this end, existing images for `arm64` and `armhf` builds are being deprecated. They are replaced by a manifest file in each container which automatically pulls the correct image for your architecture. You'll also be able to pull based on a specific architecture tag.
20-
21-
TLDR: Multi-arch support is changing from multiple repos to one repo per container image.
22-
2317
# [linuxserver/domoticz](https://github.com/linuxserver/docker-domoticz)
2418
[![](https://img.shields.io/discord/354974912613449730.svg?logo=discord&label=LSIO%20Discord&style=flat-square)](https://discord.gg/YWrKVTn)
2519
[![](https://images.microbadger.com/badges/version/linuxserver/domoticz.svg)](https://microbadger.com/images/linuxserver/domoticz "Get your own version badge on microbadger.com")
@@ -35,7 +29,7 @@ TLDR: Multi-arch support is changing from multiple repos to one repo per contain
3529

3630
## Supported Architectures
3731

38-
Our images support multiple architectures such as `x86-64`, `arm64` and `armhf`. We utilise the docker manifest for multi-platform awareness. More information is available from docker [here](https://github.com/docker/distribution/blob/master/docs/spec/manifest-v2-2.md#manifest-list).
32+
Our images support multiple architectures such as `x86-64`, `arm64` and `armhf`. We utilise the docker manifest for multi-platform awareness. More information is available from docker [here](https://github.com/docker/distribution/blob/master/docs/spec/manifest-v2-2.md#manifest-list) and our announcement [here](https://blog.linuxserver.io/2019/02/21/the-lsio-pipeline-project/).
3933

4034
Simply pulling `linuxserver/domoticz` should retrieve the correct image for your arch, but you can also pull specific arch images via tags.
4135

@@ -68,8 +62,8 @@ Here are some example snippets to help you get started creating a container.
6862
```
6963
docker create \
7064
--name=domoticz \
71-
-e PUID=1001 \
72-
-e PGID=1001 \
65+
-e PUID=1000 \
66+
-e PGID=1000 \
7367
-e TZ=Europe/London \
7468
-p 8080:8080 \
7569
-p 6144:6144 \
@@ -105,8 +99,8 @@ services:
10599
image: linuxserver/domoticz
106100
container_name: domoticz
107101
environment:
108-
- PUID=1001
109-
- PGID=1001
102+
- PUID=1000
103+
- PGID=1000
110104
- TZ=Europe/London
111105
volumes:
112106
- <path to data>:/config
@@ -116,7 +110,6 @@ services:
116110
- 1443:1443
117111
devices:
118112
- <path to device>:<path to device>
119-
mem_limit: 4096m
120113
restart: unless-stopped
121114
```
122115

@@ -129,8 +122,8 @@ Container images are configured using parameters passed at runtime (such as thos
129122
| `-p 8080` | WebUI |
130123
| `-p 6144` | Domoticz communication port. |
131124
| `-p 1443` | Domoticz communication port. |
132-
| `-e PUID=1001` | for UserID - see below for explanation |
133-
| `-e PGID=1001` | for GroupID - see below for explanation |
125+
| `-e PUID=1000` | for UserID - see below for explanation |
126+
| `-e PGID=1000` | for GroupID - see below for explanation |
134127
| `-e TZ=Europe/London` | Specify a timezone to use EG Europe/London. |
135128
| `-v /config` | Where Domoticz stores config files and data. |
136129
| `--device <path to device>` | For passing through USB devices. |
@@ -141,11 +134,11 @@ When using volumes (`-v` flags) permissions issues can arise between the host OS
141134

142135
Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic.
143136

144-
In this instance `PUID=1001` and `PGID=1001`, to find yours use `id user` as below:
137+
In this instance `PUID=1000` and `PGID=1000`, to find yours use `id user` as below:
145138

146139
```
147140
$ id username
148-
uid=1001(dockeruser) gid=1001(dockergroup) groups=1001(dockergroup)
141+
uid=1000(dockeruser) gid=1000(dockergroup) groups=1000(dockergroup)
149142
```
150143

151144

@@ -180,9 +173,20 @@ Below are the instructions for updating containers:
180173
* Start the new container: `docker start domoticz`
181174
* You can also remove the old dangling images: `docker image prune`
182175

176+
### Via Taisun auto-updater (especially useful if you don't remember the original parameters)
177+
* Pull the latest image at its tag and replace it with the same env variables in one shot:
178+
```
179+
docker run --rm \
180+
-v /var/run/docker.sock:/var/run/docker.sock taisun/updater \
181+
--oneshot domoticz
182+
```
183+
* You can also remove the old dangling images: `docker image prune`
184+
183185
### Via Docker Compose
184-
* Update the image: `docker-compose pull linuxserver/domoticz`
185-
* Let compose update containers as necessary: `docker-compose up -d`
186+
* Update all images: `docker-compose pull`
187+
* or update a single image: `docker-compose pull domoticz`
188+
* Let compose update all containers as necessary: `docker-compose up -d`
189+
* or update a single container: `docker-compose up -d domoticz`
186190
* You can also remove the old dangling images: `docker image prune`
187191

188192
## Versions

0 commit comments

Comments
 (0)