Online Repo for Snapshots has moved to Artifactory

All,

So far, the online repo of all 2.1 snapshot add-ons was uploaded on every successful distro build to Bintray (https://bintray.com/openhab/mvn/online-repo/2.1.nightly).

I received a (friendly) reminder from the Bintray team that Bintray is not meant for snapshots and only release versions should be uploaded there as it otherwise puts undue load to their CDN infrastructure.

Fair point, so I took action last weekend and moved the repo over to our Artifactory instance, which also hosts the Debian snapshot packages since a little while.

The new location is therefore: https://openhab.jfrog.io/openhab/online-repo-snapshot/2.1/

If you install a recent distro, you will see that this url is defined in userdata/etc/version.properties:

openHAB Distribution Version Information
----------------------------------------
build-no        : Build #904
online-repo     : https://openhab.jfrog.io/openhab/online-repo-snapshot/2.1

I haven’t tested it yet, but afaik, an apt-get upgrade will also update this file so that your installations should automatically switch to the new url, so this should work rather transparently for you.

As many people still use older snapshot distro builds, I will leave the old repo on Bintray available for the time being - please just note that the last update is from April 26 and it won’t get any further ones anymore.

TL;DR: 2.1-snapshot add-ons are now loaded from a different location; no action from users required :slight_smile:

Best regards,
Kai

5 Likes

Can confirm this to be the case!

1 Like

Hi @Kai,

thanks for all the great work :slight_smile:!
As I use an M$-System to host my OH installation I used a .ps script to download the & install the snapshots. Can you re-enable the .zip packes on the new location as well? Or did I just not look closely enough - then please point me to the right location.

with kind regards,
Patrik

You mean the distro as a zip? That’s available in a Maven repo on Artifactory right here - if you need a fixed download url, the easiest is to grab it directly from cloudbees.

1 Like

Hi all,

below a power shell script I use on M$ to keep my system on the latest snaps; maybe of use to others as well:

###
# CodeOmega 2017 - P. Gfeller
###
# Target OS: Windows 10, PowerShell 5.0 (Set-ExecutionPolicy Unrestricted)
# Version  : 1.0.1.0
###
# Credits and additional information:
# -> openHAB - Documentation: http://docs.openhab.org/installation/windows.html
###
# History
#  - 1.0.1.0: Backup step & header added.
###
Write-Host "PowerShell Version: " $PSVersionTable.PSVersion

# Configuration
$archiveFileName     = "openhab-2.1.0-SNAPSHOT.zip"
$lastSuccessfulBuild = "https://openhab.ci.cloudbees.com/job/openHAB-Distribution/lastSuccessfulBuild/artifact/distributions/openhab/target/" + $archiveFileName
$downloadLocation    = "./Download/"
$backupLocation      = "./../../../openHAB2-Backup/"
$openHABLocation     = "./../../"
$designerLocation    = "./../Designer/"

$designerArchiveName = "eclipsesmarthome-incubation-0.9.0-SNAPSHOT-designer-win64.zip"
$lastDesignerBuild   = "http://eclipse.org/downloads/download.php?file=/smarthome/nightly-snapshots/" + $designerArchiveName

$fullDownloadFilePath = $downloadLocation + $archiveFileName 
$fullDownloadFilePathDesigner = $downloadLocation + $designerArchiveName

# Create directory structure ...
New-Item -ItemType Directory -Force -Path $downloadLocation, $openHABLocation, $designerLocation, $backupLocation

# Create backup of current setup ...
Compress-Archive $openHABLocation -DestinationPath ($backupLocation + (get-date -Format yyyyMMdd) + '.zip')

# Download .zip archive with current builds of openHAB & Eclipse SmartHome-Designer ...
Invoke-WebRequest $lastSuccessfulBuild -OutFile $fullDownloadFilePath
Invoke-WebRequest $lastDesignerBuild -OutFile $fullDownloadFilePathDesigner

# backup configuration ...
Copy-Item ($openHABLocation + "conf/services/addons.cfg") ($openHABLocation + "conf/services/addons.cfg.bak")

# delete old files ...
Remove-Item -Force -Recurse -Path ($openHABLocation + "addons"), 
                                  ($openHABLocation + "runtime"), 
                                  ($openHABLocation + "userdata/etc"),
                                  ($openHABLocation + "userdata/tmp"),
                                  ($openHABLocation + "userdata/cache")
                                  
# extract archives ...
Expand-Archive -Force -LiteralPath $fullDownloadFilePath -DestinationPath $openHABLocation
Expand-Archive -Force -LiteralPath $fullDownloadFilePathDesigner -DestinationPath $designerLocation

# delete unix specific files ...
Remove-Item -Force -Recurse -Path ($openHABLocation + "start.sh"),
                                  ($openHABLocation + "start_debug.sh")

# restore configuration ...
Copy-Item ($openHABLocation + "conf/services/addons.cfg.bak") ($openHABLocation + "conf/services/addons.cfg")                               
                                  
Read-Host -Prompt "Press Enter to exit"

with kind regards,
Patrik

3 Likes

Thanks @patrik_gfeller for sharing the script,

i am trying to update and upgrade via apt-get, but my version is 2.0.0-Snapshot Build #701 and nothing seems to happen with the upgrade&update command. Is for the snapshot version always a full install necessary?

thanks
Matthias

hello,

does the snapshot always include the newest versions off the addons, too, or do i have to upgrade them also? i didnt get an update for the addons, yet.

thanks, Alexander

Hi @maetz

That’s a fairly old snapshot build! Can you make sure that your /etc/apt/sources.list.d/openhab2.list file contains:

deb https://openhab.jfrog.io/openhab/openhab-linuxpkg unstable main

The update&upgrade combination should be all that is necessary to move to a new version.

Hi @e36Alex,

Since openHAB downloads the latest version of addons automatically when required, it should only be necessary to follow the instructions on the docs relevant to your operating system. Specifically, when you upgrade the userdata/tmp and userdata/cache folders should be deleted.

Hi @Benjy,

yes, i followed

http://docs.openhab.org/installation/linux.html

echo 'deb https://openhab.jfrog.io/openhab/openhab-linuxpkg unstable main' | sudo tee /etc/apt/sources.list.d/openhab2.list

maybe i was just to lazy with the update and upgrade, i will try with

sudo apt-get install openhab2

Thanks