Skip to content

Commit

Permalink
Merge pull request #184 from leonardehrenfried/otp-upgrade
Browse files Browse the repository at this point in the history
Upgrade to newest version of OTP
  • Loading branch information
dulvui authored Mar 25, 2024
2 parents 2e079c7 + afaed14 commit 5be6e47
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 8 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,16 +113,18 @@ jobs:
key: input-data

- name: Build graph
run: sh build-graph.sh
run: bash build-graph.sh

- name: Build and push
- name: Build and push
if: github.repository_owner == 'noi-techpark'
uses: noi-techpark/github-actions/docker-build-and-push@v2
with:
docker-username: ${{ github.actor }}
docker-password: ${{ secrets.GITHUB_TOKEN }}
docker-compose-file: docker-compose.build.yml

- name: Deploy application
if: github.repository_owner == 'noi-techpark'
uses: noi-techpark/github-actions/docker-deploy@v2
with:
hosts: 'test'
Expand Down
4 changes: 4 additions & 0 deletions .otp-version
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# SPDX-FileCopyrightText: NOI Techpark <[email protected]>
#
# SPDX-License-Identifier: CC0-1.0
export OTP_IMAGE="opentripplanner/opentripplanner:2.6.0_2024-03-21T15-09"
6 changes: 3 additions & 3 deletions build-graph.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#
# SPDX-License-Identifier: CC0-1.0

source .otp-version

WGET="wget --progress=bar:force:noscroll"

# OSM
Expand All @@ -14,9 +16,6 @@ SOUTH_TYROL_PBF=data/south-tyrol.osm.pbf
ELEVATION_URL=https://srtm.csi.cgiar.org/wp-content/uploads/files/srtm_5x5/TIFF/srtm_39_03.zip
ELEVATION_ZIP=data/srtm_39_03.zip

# OTP
OTP_IMAGE=docker.io/opentripplanner/opentripplanner:2.5.0_2024-01-19T14-50

# when on github actions then install the required tools
if [ -n "${CI+isset}" ]; then
sudo apt-get -qq install osmium-tool pyosmium wget
Expand All @@ -32,6 +31,7 @@ else
fi

# cut out South Tyrol from the large North East Italy extract
echo "Extracting ${SOUTH_TYROL_PBF} from ${NORTH_EAST_PBF}"
osmium extract ${NORTH_EAST_PBF} --polygon south-tyrol.geojson -o ${SOUTH_TYROL_PBF} --overwrite

if [ ! -f "${ELEVATION_ZIP}" ]; then
Expand Down
3 changes: 2 additions & 1 deletion infrastructure/docker/otp/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM docker.io/opentripplanner/opentripplanner:2.5.0_2024-01-19T14-50
# Simon, do you know how we could use the value from .otp-version here?
FROM opentripplanner/opentripplanner:2.6.0_2024-03-21T15-09

WORKDIR /var/otp

Expand Down
4 changes: 2 additions & 2 deletions run-otp.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/bin/sh
#!/bin/bash -e

# SPDX-FileCopyrightText: NOI Techpark <[email protected]>
#
# SPDX-License-Identifier: CC0-1.0

OTP_IMAGE=docker.io/opentripplanner/opentripplanner:2.5.0_2024-01-19T14-50
source .otp-version

docker run \
-it \
Expand Down

0 comments on commit 5be6e47

Please sign in to comment.