Skip to content

Commit

Permalink
Merge pull request #2 from linuxserver/fix-jenkins-type
Browse files Browse the repository at this point in the history
Fix jenkins type
  • Loading branch information
alex-phillips committed Sep 17, 2020
2 parents 456d252 + 43f7291 commit 71446fb
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
14 changes: 7 additions & 7 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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://github.com/gitapi/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq -r '. | .tag_name' ''',
script: '''curl -s https://github.com/gitapi/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
}
}
}
Expand Down Expand Up @@ -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://github.com/gitapi/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq '. |.body' | sed 's:^.\\(.*\\).$:\\1:' > releasebody.json
curl -s https://github.com/gitapi/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}'",\
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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://github.com/raw/RobinLinus/snapdrop/master/client/images/logo_transparent_512x512.png)](https://github.com/RobinLinus/snapdrop)

## Supported Architectures

Expand Down Expand Up @@ -68,6 +68,7 @@ docker create \
-e TZ=Europe/London \
-p 80:80 \
-p 443:443 \
-v <path to config>:/config \
--restart unless-stopped \
linuxserver/snapdrop
```
Expand All @@ -88,6 +89,8 @@ services:
- PUID=1000
- PGID=1000
- TZ=Europe/London
volumes:
- <path to config>:/config
ports:
- 80:80
- 443:443
Expand All @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion jenkins-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# project information
project_name: snapdrop
project_url: "https://github.com/RobinLinus/snapdrop"
project_logo: ""
project_logo: "https://github.com/raw/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 }}"

Expand All @@ -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: "<path to config>", desc: "Persistent configs and logs." }

param_usage_include_ports: true
param_ports:
- { external_port: "80", internal_port: "80", port_desc: "http gui" }
Expand Down

0 comments on commit 71446fb

Please sign in to comment.