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

Commit

Permalink
Bot Updating Templated Files
Browse files Browse the repository at this point in the history
  • Loading branch information
LinuxServer-CI committed Mar 2, 2019
1 parent 15eddf1 commit e777ca2
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 19 deletions.
33 changes: 32 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pipeline {
script: '''curl -s https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases | jq -r 'first(.[] | select(.prerelease == true)) | .tag_name' ''',
returnStdout: true).trim()
env.LS_RELEASE_NOTES = sh(
script: '''git log -1 --pretty=%B | sed -E ':a;N;$!ba;s/\\r{0,1}\\n/\\\\n/g' ''',
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' ''',
Expand Down Expand Up @@ -292,6 +292,9 @@ pipeline {
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${META_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
sh "docker tag ${IMAGE}:arm32v6-${META_TAG} lsiodev/buildcache:arm32v6-${COMMIT_SHA}-${BUILD_NUMBER}"
sh "docker push lsiodev/buildcache:arm32v6-${COMMIT_SHA}-${BUILD_NUMBER}"
sh '''docker rmi \
${IMAGE}:arm32v6-${META_TAG} \
lsiodev/buildcache:arm32v6-${COMMIT_SHA}-${BUILD_NUMBER} '''
}
}
}
Expand All @@ -318,6 +321,9 @@ pipeline {
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${META_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
sh "docker tag ${IMAGE}:arm64v8-${META_TAG} lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}"
sh "docker push lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}"
sh '''docker rmi \
${IMAGE}:arm64v8-${META_TAG} \
lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} '''
}
}
}
Expand Down Expand Up @@ -479,6 +485,10 @@ pipeline {
sh "docker tag ${IMAGE}:${META_TAG} ${IMAGE}:stable"
sh "docker push ${IMAGE}:stable"
sh "docker push ${IMAGE}:${META_TAG}"
sh '''docker rmi \
${IMAGE}:${META_TAG} \
${IMAGE}:stable '''

}
}
}
Expand Down Expand Up @@ -526,6 +536,15 @@ pipeline {
sh "docker manifest annotate ${IMAGE}:${META_TAG} ${IMAGE}:arm64v8-${META_TAG} --os linux --arch arm64 --variant v8"
sh "docker manifest push --purge ${IMAGE}:stable"
sh "docker manifest push --purge ${IMAGE}:${META_TAG}"
sh '''docker rmi \
${IMAGE}:amd64-${META_TAG} \
${IMAGE}:amd64-stable \
${IMAGE}:arm32v6-${META_TAG} \
${IMAGE}:arm32v6-stable \
${IMAGE}:arm64v8-${META_TAG} \
${IMAGE}:arm64v8-stable \
lsiodev/buildcache:arm32v6-${COMMIT_SHA}-${BUILD_NUMBER} \
lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} '''
}
}
}
Expand Down Expand Up @@ -586,6 +605,18 @@ pipeline {
}
}
}
// 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: 'CI', value: 'true'
environment name: 'EXIT_STATUS', value: ''
}
steps {
sh '''curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST 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 '${CI_URL}'"}' '''
}
}
}
/* ######################
Send status to Discord
Expand Down
40 changes: 22 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ Find us at:
* [Blog](https://blog.linuxserver.io) - all the things you can do with our containers including How-To guides, opinions and much more!
* [Podcast](https://anchor.fm/linuxserverio) - on hiatus. Coming back soon (late 2018).

# PSA: Changes are happening

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.

TLDR: Multi-arch support is changing from multiple repos to one repo per container image.

# [linuxserver/domoticz](https://github.com/linuxserver/docker-domoticz)
[![](https://img.shields.io/discord/354974912613449730.svg?logo=discord&label=LSIO%20Discord&style=flat-square)](https://discord.gg/YWrKVTn)
[![](https://images.microbadger.com/badges/version/linuxserver/domoticz.svg)](https://microbadger.com/images/linuxserver/domoticz "Get your own version badge on microbadger.com")
Expand All @@ -35,7 +29,7 @@ TLDR: Multi-arch support is changing from multiple repos to one repo per contain

## Supported Architectures

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).
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/).

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

Expand Down Expand Up @@ -68,8 +62,8 @@ Here are some example snippets to help you get started creating a container.
```
docker create \
--name=domoticz \
-e PUID=1001 \
-e PGID=1001 \
-e PUID=1000 \
-e PGID=1000 \
-e TZ=Europe/London \
-p 8080:8080 \
-p 6144:6144 \
Expand Down Expand Up @@ -105,8 +99,8 @@ services:
image: linuxserver/domoticz
container_name: domoticz
environment:
- PUID=1001
- PGID=1001
- PUID=1000
- PGID=1000
- TZ=Europe/London
volumes:
- <path to data>:/config
Expand All @@ -116,7 +110,6 @@ services:
- 1443:1443
devices:
- <path to device>:<path to device>
mem_limit: 4096m
restart: unless-stopped
```

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

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

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

```
$ id username
uid=1001(dockeruser) gid=1001(dockergroup) groups=1001(dockergroup)
uid=1000(dockeruser) gid=1000(dockergroup) groups=1000(dockergroup)
```


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

### Via Taisun auto-updater (especially useful if you don't remember the original parameters)
* Pull the latest image at its tag and replace it with the same env variables in one shot:
```
docker run --rm \
-v /var/run/docker.sock:/var/run/docker.sock taisun/updater \
--oneshot domoticz
```
* You can also remove the old dangling images: `docker image prune`

### Via Docker Compose
* Update the image: `docker-compose pull linuxserver/domoticz`
* Let compose update containers as necessary: `docker-compose up -d`
* Update all images: `docker-compose pull`
* or update a single image: `docker-compose pull domoticz`
* Let compose update all containers as necessary: `docker-compose up -d`
* or update a single container: `docker-compose up -d domoticz`
* You can also remove the old dangling images: `docker image prune`

## Versions
Expand Down

0 comments on commit e777ca2

Please sign in to comment.