From 68165591c822d64790e5634aa0e7324efc59b954 Mon Sep 17 00:00:00 2001 From: thelamer Date: Sat, 23 Mar 2019 16:25:42 -0700 Subject: [PATCH] Switching to new Base images, shift to arm32v7 tag. --- Dockerfile | 2 +- Dockerfile.aarch64 | 5 +-- Dockerfile.armhf | 5 +-- Jenkinsfile | 93 ++++++++++++++++++++++++++++++---------------- README.md | 4 +- readme-vars.yml | 3 +- 6 files changed, 68 insertions(+), 44 deletions(-) diff --git a/Dockerfile b/Dockerfile index 35d21ca..9e24e99 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM lsiobase/alpine.nginx:3.9 +FROM lsiobase/nginx:3.9 # set version label ARG BUILD_DATE diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 7e0d727..e680c0c 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -1,7 +1,4 @@ -FROM lsiobase/alpine.nginx.arm64:3.9 - -# Add qemu to build on x86_64 systems -COPY qemu-aarch64-static /usr/bin +FROM lsiobase/nginx:arm64v8-3.9 # set version label ARG BUILD_DATE diff --git a/Dockerfile.armhf b/Dockerfile.armhf index 563ee5e..9cabf15 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -1,7 +1,4 @@ -FROM lsiobase/alpine.nginx.armhf:3.9 - -# Add qemu to build on x86_64 systems -COPY qemu-arm-static /usr/bin +FROM lsiobase/nginx:arm32v7-3.9 # set version label ARG BUILD_DATE diff --git a/Jenkinsfile b/Jenkinsfile index 4e59dbb..f0f72d4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -120,7 +120,7 @@ pipeline { script{ env.IMAGE = env.DOCKERHUB_IMAGE if (env.MULTIARCH == 'true') { - env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm32v6-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm32v7-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER } else { env.CI_TAGS = env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER } @@ -138,7 +138,7 @@ pipeline { script{ env.IMAGE = env.DEV_DOCKERHUB_IMAGE if (env.MULTIARCH == 'true') { - env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm32v6-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm32v7-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA } else { env.CI_TAGS = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA } @@ -156,7 +156,7 @@ pipeline { script{ env.IMAGE = env.PR_DOCKERHUB_IMAGE if (env.MULTIARCH == 'true') { - env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + '|arm32v6-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + '|arm32v7-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST } else { env.CI_TAGS = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST } @@ -166,6 +166,35 @@ pipeline { } } } + // Run ShellCheck + stage('ShellCheck') { + when { + environment name: 'CI', value: 'true' + } + steps { + withCredentials([ + string(credentialsId: 'spaces-key', variable: 'DO_KEY'), + string(credentialsId: 'spaces-secret', variable: 'DO_SECRET') + ]) { + script{ + env.SHELLCHECK_URL = 'https://lsio-ci.ams3.digitaloceanspaces.com/' + env.IMAGE + '/' + env.META_TAG + '/shellcheck-result.xml' + } + sh '''curl -sL https://raw.githubusercontent.com/linuxserver/docker-shellcheck/master/checkrun.sh | /bin/bash''' + sh '''#! /bin/bash + set -e + docker pull lsiodev/spaces-file-upload:latest + docker run --rm \ + -e DESTINATION=\"${IMAGE}/${META_TAG}/shellcheck-result.xml\" \ + -e FILE_NAME="shellcheck-result.xml" \ + -e MIMETYPE="text/xml" \ + -v ${WORKSPACE}:/mnt \ + -e SECRET_KEY=\"${DO_SECRET}\" \ + -e ACCESS_KEY=\"${DO_KEY}\" \ + -t lsiodev/spaces-file-upload:latest \ + python /upload.py''' + } + } + } // Use helper containers to render templated files stage('Update-Templates') { when { @@ -240,7 +269,7 @@ pipeline { environment name: 'EXIT_STATUS', value: '' } steps { - sh "docker build --no-cache -t ${IMAGE}:${META_TAG} \ + sh "docker build --no-cache --pull -t ${IMAGE}:${META_TAG} \ --build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${META_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ." } } @@ -253,7 +282,7 @@ pipeline { parallel { stage('Build X86') { steps { - sh "docker build --no-cache -t ${IMAGE}:amd64-${META_TAG} \ + sh "docker build --no-cache --pull -t ${IMAGE}:amd64-${META_TAG} \ --build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${META_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ." } } @@ -276,13 +305,13 @@ pipeline { ''' sh "curl https://lsio-ci.ams3.digitaloceanspaces.com/qemu-arm-static -o qemu-arm-static" sh "chmod +x qemu-*" - sh "docker build --no-cache -f Dockerfile.armhf -t ${IMAGE}:arm32v6-${META_TAG} \ + sh "docker build --no-cache --pull -f Dockerfile.armhf -t ${IMAGE}:arm32v7-${META_TAG} \ --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 tag ${IMAGE}:arm32v7-${META_TAG} lsiodev/buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER}" + sh "docker push lsiodev/buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER}" sh '''docker rmi \ - ${IMAGE}:arm32v6-${META_TAG} \ - lsiodev/buildcache:arm32v6-${COMMIT_SHA}-${BUILD_NUMBER} ''' + ${IMAGE}:arm32v7-${META_TAG} \ + lsiodev/buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} ''' } } } @@ -305,7 +334,7 @@ pipeline { ''' sh "curl https://lsio-ci.ams3.digitaloceanspaces.com/qemu-aarch64-static -o qemu-aarch64-static" sh "chmod +x qemu-*" - sh "docker build --no-cache -f Dockerfile.aarch64 -t ${IMAGE}:arm64v8-${META_TAG} \ + sh "docker build --no-cache --pull -f Dockerfile.aarch64 -t ${IMAGE}:arm64v8-${META_TAG} \ --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}" @@ -335,13 +364,13 @@ pipeline { fi if [ "${DIST_IMAGE}" == "alpine" ]; then docker run --rm --entrypoint '/bin/sh' -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} -c '\ - apk info > packages && \ - apk info -v > versions && \ - paste -d " " packages versions > /tmp/package_versions.txt && \ + apk info -v > /tmp/package_versions.txt && \ + sort -o /tmp/package_versions.txt /tmp/package_versions.txt && \ chmod 777 /tmp/package_versions.txt' elif [ "${DIST_IMAGE}" == "ubuntu" ]; then docker run --rm --entrypoint '/bin/sh' -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} -c '\ - apt list -qq --installed | cut -d" " -f1-2 > /tmp/package_versions.txt && \ + apt list -qq --installed | sed "s#/.*now ##g" | cut -d" " -f1 > /tmp/package_versions.txt && \ + sort -o /tmp/package_versions.txt /tmp/package_versions.txt && \ chmod 777 /tmp/package_versions.txt' fi NEW_PACKAGE_TAG=$(md5sum ${TEMPDIR}/package_versions.txt | cut -c1-8 ) @@ -421,9 +450,9 @@ pipeline { set -e docker pull lsiodev/ci:latest if [ "${MULTIARCH}" == "true" ]; then - docker pull lsiodev/buildcache:arm32v6-${COMMIT_SHA}-${BUILD_NUMBER} + docker pull lsiodev/buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} docker pull lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} - docker tag lsiodev/buildcache:arm32v6-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm32v6-${META_TAG} + docker tag lsiodev/buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm32v7-${META_TAG} docker tag lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm64v8-${META_TAG} fi docker run --rm \ @@ -500,38 +529,38 @@ pipeline { ''' sh '''#! /bin/bash if [ "${CI}" == "false" ]; then - docker pull lsiodev/buildcache:arm32v6-${COMMIT_SHA}-${BUILD_NUMBER} + docker pull lsiodev/buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} docker pull lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} - docker tag lsiodev/buildcache:arm32v6-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm32v6-${META_TAG} + docker tag lsiodev/buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm32v7-${META_TAG} docker tag lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm64v8-${META_TAG} fi''' sh "docker tag ${IMAGE}:amd64-${META_TAG} ${IMAGE}:amd64-latest" - sh "docker tag ${IMAGE}:arm32v6-${META_TAG} ${IMAGE}:arm32v6-latest" + sh "docker tag ${IMAGE}:arm32v7-${META_TAG} ${IMAGE}:arm32v7-latest" sh "docker tag ${IMAGE}:arm64v8-${META_TAG} ${IMAGE}:arm64v8-latest" sh "docker push ${IMAGE}:amd64-${META_TAG}" - sh "docker push ${IMAGE}:arm32v6-${META_TAG}" + sh "docker push ${IMAGE}:arm32v7-${META_TAG}" sh "docker push ${IMAGE}:arm64v8-${META_TAG}" sh "docker push ${IMAGE}:amd64-latest" - sh "docker push ${IMAGE}:arm32v6-latest" + sh "docker push ${IMAGE}:arm32v7-latest" sh "docker push ${IMAGE}:arm64v8-latest" sh "docker manifest push --purge ${IMAGE}:latest || :" - sh "docker manifest create ${IMAGE}:latest ${IMAGE}:amd64-latest ${IMAGE}:arm32v6-latest ${IMAGE}:arm64v8-latest" - sh "docker manifest annotate ${IMAGE}:latest ${IMAGE}:arm32v6-latest --os linux --arch arm" + sh "docker manifest create ${IMAGE}:latest ${IMAGE}:amd64-latest ${IMAGE}:arm32v7-latest ${IMAGE}:arm64v8-latest" + sh "docker manifest annotate ${IMAGE}:latest ${IMAGE}:arm32v7-latest --os linux --arch arm" sh "docker manifest annotate ${IMAGE}:latest ${IMAGE}:arm64v8-latest --os linux --arch arm64 --variant v8" sh "docker manifest push --purge ${IMAGE}:${META_TAG} || :" - sh "docker manifest create ${IMAGE}:${META_TAG} ${IMAGE}:amd64-${META_TAG} ${IMAGE}:arm32v6-${META_TAG} ${IMAGE}:arm64v8-${META_TAG}" - sh "docker manifest annotate ${IMAGE}:${META_TAG} ${IMAGE}:arm32v6-${META_TAG} --os linux --arch arm" + sh "docker manifest create ${IMAGE}:${META_TAG} ${IMAGE}:amd64-${META_TAG} ${IMAGE}:arm32v7-${META_TAG} ${IMAGE}:arm64v8-${META_TAG}" + sh "docker manifest annotate ${IMAGE}:${META_TAG} ${IMAGE}:arm32v7-${META_TAG} --os linux --arch arm" sh "docker manifest annotate ${IMAGE}:${META_TAG} ${IMAGE}:arm64v8-${META_TAG} --os linux --arch arm64 --variant v8" sh "docker manifest push --purge ${IMAGE}:latest" sh "docker manifest push --purge ${IMAGE}:${META_TAG}" sh '''docker rmi \ ${IMAGE}:amd64-${META_TAG} \ ${IMAGE}:amd64-latest \ - ${IMAGE}:arm32v6-${META_TAG} \ - ${IMAGE}:arm32v6-latest \ + ${IMAGE}:arm32v7-${META_TAG} \ + ${IMAGE}:arm32v7-latest \ ${IMAGE}:arm64v8-${META_TAG} \ ${IMAGE}:arm64v8-latest \ - lsiodev/buildcache:arm32v6-${COMMIT_SHA}-${BUILD_NUMBER} \ + lsiodev/buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} \ lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} ''' } } @@ -602,7 +631,7 @@ pipeline { } 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}'"}' ''' + -d '{"body": "I am a bot, here are the test results for this PR: \\n'${CI_URL}' \\n'${SHELLCHECK_URL}'"}' ''' } } } @@ -617,12 +646,12 @@ pipeline { } else if (currentBuild.currentResult == "SUCCESS"){ sh ''' curl -X POST --data '{"avatar_url": "https://wiki.jenkins-ci.org/download/attachments/2916393/headshot.png","embeds": [{"color": 1681177,\ - "description": "**Build:** '${BUILD_NUMBER}'\\n**CI Results:** '${CI_URL}'\\n**Status:** Success\\n**Job:** '${RUN_DISPLAY_URL}'\\n**Change:** '${CODE_URL}'\\n**External Release:**: '${RELEASE_LINK}'\\n**DockerHub:** '${DOCKERHUB_LINK}'\\n"}],\ + "description": "**Build:** '${BUILD_NUMBER}'\\n**CI Results:** '${CI_URL}'\\n**ShellCheck Results:** '${SHELLCHECK_URL}'\\n**Status:** Success\\n**Job:** '${RUN_DISPLAY_URL}'\\n**Change:** '${CODE_URL}'\\n**External Release:**: '${RELEASE_LINK}'\\n**DockerHub:** '${DOCKERHUB_LINK}'\\n"}],\ "username": "Jenkins"}' ${BUILDS_DISCORD} ''' } else { sh ''' curl -X POST --data '{"avatar_url": "https://wiki.jenkins-ci.org/download/attachments/2916393/headshot.png","embeds": [{"color": 16711680,\ - "description": "**Build:** '${BUILD_NUMBER}'\\n**CI Results:** '${CI_URL}'\\n**Status:** failure\\n**Job:** '${RUN_DISPLAY_URL}'\\n**Change:** '${CODE_URL}'\\n**External Release:**: '${RELEASE_LINK}'\\n**DockerHub:** '${DOCKERHUB_LINK}'\\n"}],\ + "description": "**Build:** '${BUILD_NUMBER}'\\n**CI Results:** '${CI_URL}'\\n**ShellCheck Results:** '${SHELLCHECK_URL}'\\n**Status:** failure\\n**Job:** '${RUN_DISPLAY_URL}'\\n**Change:** '${CODE_URL}'\\n**External Release:**: '${RELEASE_LINK}'\\n**DockerHub:** '${DOCKERHUB_LINK}'\\n"}],\ "username": "Jenkins"}' ${BUILDS_DISCORD} ''' } } diff --git a/README.md b/README.md index 57fc555..3e27c00 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,6 @@ Find us at: * [Discord](https://discord.gg/YWrKVTn) - realtime support / chat with the community and the team. * [IRC](https://irc.linuxserver.io) - on freenode at `#linuxserver.io`. Our primary support channel is Discord. * [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). # [linuxserver/nginx](https://github.com/linuxserver/docker-nginx) [![](https://img.shields.io/discord/354974912613449730.svg?logo=discord&label=LSIO%20Discord&style=flat-square)](https://discord.gg/YWrKVTn) @@ -39,7 +38,7 @@ The architectures supported by this image are: | :----: | --- | | x86-64 | amd64-latest | | arm64 | arm64v8-latest | -| armhf | arm32v6-latest | +| armhf | arm32v7-latest | ## Usage @@ -162,6 +161,7 @@ Below are the instructions for updating containers: ## Versions +* **23.03.19:** - Switching to new Base images, shift to arm32v7 tag. * **02.03.19:** - Add php intl and posix modules. * **28.02.19:** - Add php7-opcache, remove memcached service due to issues on aarch64 (let us know if you need to enable it). * **22.02.19:** - Rebasing to alpine 3.9. diff --git a/readme-vars.yml b/readme-vars.yml index f540026..aebfd2d 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -11,7 +11,7 @@ project_lsio_github_repo_url: "https://github.com/linuxserver/docker-{{ project_ available_architectures: - { arch: "{{ arch_x86_64 }}", tag: "amd64-latest"} - { arch: "{{ arch_arm64 }}", tag: "arm64v8-latest"} - - { arch: "{{ arch_armhf }}", tag: "arm32v6-latest"} + - { arch: "{{ arch_armhf }}", tag: "arm32v7-latest"} # container parameters common_param_env_vars_enabled: true @@ -40,6 +40,7 @@ app_setup_block: | # changelog changelogs: + - { date: "23.03.19:", desc: "Switching to new Base images, shift to arm32v7 tag." } - { date: "02.03.19:", desc: "Add php intl and posix modules." } - { date: "28.02.19:", desc: "Add php7-opcache, remove memcached service due to issues on aarch64 (let us know if you need to enable it)." } - { date: "22.02.19:", desc: "Rebasing to alpine 3.9." }