From 00ada6b42358dcda2dc480d4a9971b228c57575d Mon Sep 17 00:00:00 2001 From: alex-phillips Date: Wed, 16 Sep 2020 15:23:16 -0400 Subject: [PATCH 1/8] swapped stable for commit since they aren't tagging proper releases --- jenkins-vars.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins-vars.yml b/jenkins-vars.yml index d4124c0..fb6f048 100644 --- a/jenkins-vars.yml +++ b/jenkins-vars.yml @@ -2,7 +2,7 @@ # jenkins variables project_name: docker-snapdrop -external_type: github_stable +external_type: github_commit release_type: stable release_tag: latest ls_branch: master From e3600b7140949a45ec585bc3a078cfbf46eb9382 Mon Sep 17 00:00:00 2001 From: alex-phillips Date: Wed, 16 Sep 2020 15:23:40 -0400 Subject: [PATCH 2/8] updated docs --- Jenkinsfile | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index d40fb4a..041db81 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -58,7 +58,7 @@ pipeline { env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/commit/' + env.GIT_COMMIT env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DOCKERHUB_IMAGE + '/tags/' env.PULL_REQUEST = env.CHANGE_ID - env.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE ./.github/FUNDING.yml ./.github/ISSUE_TEMPLATE.md ./.github/PULL_REQUEST_TEMPLATE.md ./.github/workflows/greetings.yml ./.github/workflows/stale.yml' + env.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE ./.github/FUNDING.yml ./.github/ISSUE_TEMPLATE.md ./.github/PULL_REQUEST_TEMPLATE.md' } script{ env.LS_RELEASE_NUMBER = sh( @@ -101,21 +101,21 @@ pipeline { /* ######################## External Release Tagging ######################## */ - // If this is a stable github release use the latest endpoint from github to determine the ext tag - stage("Set ENV github_stable"){ + // If this is a github commit trigger determine the current commit at head + stage("Set ENV github_commit"){ steps{ script{ env.EXT_RELEASE = sh( - script: '''curl -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq -r '. | .tag_name' ''', + script: '''curl -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/commits/${EXT_GIT_BRANCH} | jq -r '. | .sha' | cut -c1-8 ''', returnStdout: true).trim() } } } - // If this is a stable or devel github release generate the link for the build message - stage("Set ENV github_link"){ + // If this is a github commit trigger Set the external release link + stage("Set ENV commit_link"){ steps{ script{ - env.RELEASE_LINK = 'https://github.com/' + env.EXT_USER + '/' + env.EXT_REPO + '/releases/tag/' + env.EXT_RELEASE + env.RELEASE_LINK = 'https://github.com/' + env.EXT_USER + '/' + env.EXT_REPO + '/commit/' + env.EXT_RELEASE } } } @@ -244,7 +244,7 @@ pipeline { cd ${TEMPDIR}/repo/${LS_REPO} git checkout -f master cd ${TEMPDIR}/docker-${CONTAINER_NAME} - mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/workflows + mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github cp --parents ${TEMPLATED_FILES} ${TEMPDIR}/repo/${LS_REPO}/ cd ${TEMPDIR}/repo/${LS_REPO}/ git add ${TEMPLATED_FILES} @@ -672,7 +672,7 @@ pipeline { "tagger": {"name": "LinuxServer Jenkins","email": "jenkins@linuxserver.io","date": "'${GITHUB_DATE}'"}}' ''' echo "Pushing New release for Tag" sh '''#! /bin/bash - curl -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq '. |.body' | sed 's:^.\\(.*\\).$:\\1:' > releasebody.json + curl -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/commits/${EXT_GIT_BRANCH} | jq '. | .commit.message' | sed 's:^.\\(.*\\).$:\\1:' > releasebody.json echo '{"tag_name":"'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\ "target_commitish": "master",\ "name": "'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\ @@ -698,10 +698,6 @@ pipeline { ] ]) { sh '''#! /bin/bash - set -e - TEMPDIR=$(mktemp -d) - docker pull linuxserver/jenkins-builder:latest - docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH=master -v ${TEMPDIR}:/ansible/jenkins linuxserver/jenkins-builder:latest docker pull lsiodev/readme-sync docker run --rm=true \ -e DOCKERHUB_USERNAME=$DOCKERUSER \ @@ -709,9 +705,7 @@ pipeline { -e GIT_REPOSITORY=${LS_USER}/${LS_REPO} \ -e DOCKER_REPOSITORY=${IMAGE} \ -e GIT_BRANCH=master \ - -v ${TEMPDIR}/docker-${CONTAINER_NAME}:/mnt \ - lsiodev/readme-sync bash -c 'node sync' - rm -Rf ${TEMPDIR} ''' + lsiodev/readme-sync bash -c 'node sync' ''' } } } From bf13ee916b15de1bc77b920d6ddf6ae4f24722cb Mon Sep 17 00:00:00 2001 From: alex-phillips Date: Thu, 17 Sep 2020 09:18:37 -0400 Subject: [PATCH 3/8] Added logo --- readme-vars.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme-vars.yml b/readme-vars.yml index 50a1abd..1d47679 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -3,7 +3,7 @@ # project information project_name: snapdrop project_url: "https://github.com/RobinLinus/snapdrop" -project_logo: "" +project_logo: "https://raw.githubusercontent.com/RobinLinus/snapdrop/master/client/images/logo_transparent_512x512.png" project_blurb: "[{{ project_name|capitalize }}]({{ project_url }}) A local file sharing in your browser. Inspired by Apple's Airdrop." project_lsio_github_repo_url: "https://github.com/linuxserver/docker-{{ project_name }}" From 3780aec8ad1be10dcec61a0a51db29da92f5aff4 Mon Sep 17 00:00:00 2001 From: alex-phillips Date: Thu, 17 Sep 2020 09:25:07 -0400 Subject: [PATCH 4/8] update generated docs --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bd937f1..f497151 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ Find us at: [Snapdrop](https://github.com/RobinLinus/snapdrop) A local file sharing in your browser. Inspired by Apple's Airdrop. -[![snapdrop]()](https://github.com/RobinLinus/snapdrop) +[![snapdrop](https://raw.githubusercontent.com/RobinLinus/snapdrop/master/client/images/logo_transparent_512x512.png)](https://github.com/RobinLinus/snapdrop) ## Supported Architectures From 7ff41526ea0161adf179bb0a0e02bc99b309cb88 Mon Sep 17 00:00:00 2001 From: alex-phillips Date: Thu, 17 Sep 2020 09:29:22 -0400 Subject: [PATCH 5/8] updated with latest jenkins builder --- Jenkinsfile | 12 +++++++++--- README.lite | 20 ++++++++++++++++++++ 2 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 README.lite diff --git a/Jenkinsfile b/Jenkinsfile index 041db81..5fa1349 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -58,7 +58,7 @@ pipeline { env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/commit/' + env.GIT_COMMIT env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DOCKERHUB_IMAGE + '/tags/' env.PULL_REQUEST = env.CHANGE_ID - env.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE ./.github/FUNDING.yml ./.github/ISSUE_TEMPLATE.md ./.github/PULL_REQUEST_TEMPLATE.md' + env.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE ./.github/FUNDING.yml ./.github/ISSUE_TEMPLATE.md ./.github/PULL_REQUEST_TEMPLATE.md ./.github/workflows/greetings.yml ./.github/workflows/stale.yml' } script{ env.LS_RELEASE_NUMBER = sh( @@ -244,7 +244,7 @@ pipeline { cd ${TEMPDIR}/repo/${LS_REPO} git checkout -f master cd ${TEMPDIR}/docker-${CONTAINER_NAME} - mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github + mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/workflows cp --parents ${TEMPLATED_FILES} ${TEMPDIR}/repo/${LS_REPO}/ cd ${TEMPDIR}/repo/${LS_REPO}/ git add ${TEMPLATED_FILES} @@ -698,6 +698,10 @@ pipeline { ] ]) { sh '''#! /bin/bash + set -e + TEMPDIR=$(mktemp -d) + docker pull linuxserver/jenkins-builder:latest + docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH=master -v ${TEMPDIR}:/ansible/jenkins linuxserver/jenkins-builder:latest docker pull lsiodev/readme-sync docker run --rm=true \ -e DOCKERHUB_USERNAME=$DOCKERUSER \ @@ -705,7 +709,9 @@ pipeline { -e GIT_REPOSITORY=${LS_USER}/${LS_REPO} \ -e DOCKER_REPOSITORY=${IMAGE} \ -e GIT_BRANCH=master \ - lsiodev/readme-sync bash -c 'node sync' ''' + -v ${TEMPDIR}/docker-${CONTAINER_NAME}:/mnt \ + lsiodev/readme-sync bash -c 'node sync' + rm -Rf ${TEMPDIR} ''' } } } diff --git a/README.lite b/README.lite new file mode 100644 index 0000000..2b9f8bb --- /dev/null +++ b/README.lite @@ -0,0 +1,20 @@ +# [linuxserver/snapdrop](https://github.com/linuxserver/docker-snapdrop) + +This readme has been truncated from the full version found [HERE](https://github.com/linuxserver/docker-snapdrop) + +[Snapdrop](https://github.com/RobinLinus/snapdrop) A local file sharing in your browser. Inspired by Apple's Airdrop. + +## Usage + +``` +docker create \ + --name=snapdrop \ + -e PUID=1000 \ + -e PGID=1000 \ + -e TZ=Europe/London \ + -p 80:80 \ + -p 443:443 \ + --restart unless-stopped \ + linuxserver/snapdrop +``` + From 4fb4b11aa5cb60c323cd7a6c91a8516385c3852c Mon Sep 17 00:00:00 2001 From: alex-phillips Date: Thu, 17 Sep 2020 09:33:15 -0400 Subject: [PATCH 6/8] Removed readme.lite --- README.lite | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 README.lite diff --git a/README.lite b/README.lite deleted file mode 100644 index 2b9f8bb..0000000 --- a/README.lite +++ /dev/null @@ -1,20 +0,0 @@ -# [linuxserver/snapdrop](https://github.com/linuxserver/docker-snapdrop) - -This readme has been truncated from the full version found [HERE](https://github.com/linuxserver/docker-snapdrop) - -[Snapdrop](https://github.com/RobinLinus/snapdrop) A local file sharing in your browser. Inspired by Apple's Airdrop. - -## Usage - -``` -docker create \ - --name=snapdrop \ - -e PUID=1000 \ - -e PGID=1000 \ - -e TZ=Europe/London \ - -p 80:80 \ - -p 443:443 \ - --restart unless-stopped \ - linuxserver/snapdrop -``` - From 03043abed6d0860bcedfdbf72f8d87993abbd139 Mon Sep 17 00:00:00 2001 From: alex-phillips Date: Thu, 17 Sep 2020 12:15:53 -0400 Subject: [PATCH 7/8] added /config volume mount --- README.lite | 21 +++++++++++++++++++++ README.md | 4 ++++ readme-vars.yml | 4 ++++ 3 files changed, 29 insertions(+) create mode 100644 README.lite diff --git a/README.lite b/README.lite new file mode 100644 index 0000000..fd0a91b --- /dev/null +++ b/README.lite @@ -0,0 +1,21 @@ +# [linuxserver/snapdrop](https://github.com/linuxserver/docker-snapdrop) + +This readme has been truncated from the full version found [HERE](https://github.com/linuxserver/docker-snapdrop) + +[Snapdrop](https://github.com/RobinLinus/snapdrop) A local file sharing in your browser. Inspired by Apple's Airdrop. + +## Usage + +``` +docker create \ + --name=snapdrop \ + -e PUID=1000 \ + -e PGID=1000 \ + -e TZ=Europe/London \ + -p 80:80 \ + -p 443:443 \ + -v :/config \ + --restart unless-stopped \ + linuxserver/snapdrop +``` + diff --git a/README.md b/README.md index f497151..a4764e4 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,7 @@ docker create \ -e TZ=Europe/London \ -p 80:80 \ -p 443:443 \ + -v :/config \ --restart unless-stopped \ linuxserver/snapdrop ``` @@ -88,6 +89,8 @@ services: - PUID=1000 - PGID=1000 - TZ=Europe/London + volumes: + - :/config ports: - 80:80 - 443:443 @@ -105,6 +108,7 @@ Container images are configured using parameters passed at runtime (such as thos | `-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` | Persistent configs and logs. | ## Environment variables from files (Docker secrets) diff --git a/readme-vars.yml b/readme-vars.yml index 1d47679..0960143 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -30,6 +30,10 @@ param_usage_include_env: true param_env_vars: - { env_var: "TZ", env_value: "Europe/London", desc: "Specify a timezone to use EG Europe/London." } +param_usage_include_vols: true +param_volumes: + - { vol_path: "/config", vol_host_path: "", desc: "Persistent configs and logs." } + param_usage_include_ports: true param_ports: - { external_port: "80", internal_port: "80", port_desc: "http gui" } From 43f7291e8d7420073ee786f7f08c86ff2117705a Mon Sep 17 00:00:00 2001 From: alex-phillips Date: Thu, 17 Sep 2020 13:15:37 -0400 Subject: [PATCH 8/8] Removed readme.lite --- README.lite | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 README.lite diff --git a/README.lite b/README.lite deleted file mode 100644 index fd0a91b..0000000 --- a/README.lite +++ /dev/null @@ -1,21 +0,0 @@ -# [linuxserver/snapdrop](https://github.com/linuxserver/docker-snapdrop) - -This readme has been truncated from the full version found [HERE](https://github.com/linuxserver/docker-snapdrop) - -[Snapdrop](https://github.com/RobinLinus/snapdrop) A local file sharing in your browser. Inspired by Apple's Airdrop. - -## Usage - -``` -docker create \ - --name=snapdrop \ - -e PUID=1000 \ - -e PGID=1000 \ - -e TZ=Europe/London \ - -p 80:80 \ - -p 443:443 \ - -v :/config \ - --restart unless-stopped \ - linuxserver/snapdrop -``` -