Skip to content

Commit

Permalink
Fix isoline herev8
Browse files Browse the repository at this point in the history
  • Loading branch information
beatrizlfernandes committed Jun 25, 2024
1 parent 26ff137 commit 05bf18e
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 2 deletions.
62 changes: 62 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
image: docker:latest

services:
- docker:dind

variables:
PROJECT_NAME: ${CI_PROJECT_NAME}
REGISTRY_URL: registry.mapotempo.com

stages:
- deliver

workflow:
rules:
- if: $CI_COMMIT_TAG
- if: $CI_COMMIT_BRANCH

Deliver API:
image: carlallen/docker:buildx
stage: deliver
cache:
- key:
files:
- Gemfile.lock
prefix: ${CI_PROJECT_NAME}
paths:
- vendor/bundle
when: "always"
- key: ${CI_PROJECT_NAME}
paths:
- .buildx-cache
when: "always"
services:
- docker:dind
environment:
name: ${CI_COMMIT_REF_NAME}
variables:
DOCKER_DRIVER: overlay2
DOCKER_HOST: tcp://docker:2375
before_script:
- apk update > /dev/null && apk add git bash jq curl rsync > /dev/null
- docker login -u $USER -p $PASSWORD $REGISTRY_URL
script:
- |
DOCKER_FILE='./Dockerfile' \
ci-utils/build_app.sh
rules:
- if: $CI_COMMIT_TAG
- if: $CI_COMMIT_BRANCH =~ /^(alpha|beta|prod)/
# changes:
# - api/**/*
# - config/environments/**/*
# - config/initializers/**/*
# - config/locales/**/*
# - docker/Dockerfile
# - docker/env.d/**/*
# - docker/snippets/**/*
# - docker/webapp.conf
# - lib/**/*
# - public/**/*
# - wrappers/**/*
when: always
9 changes: 9 additions & 0 deletions ci-utils/build_app.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

echo "SLACK_CHANNELS: $SLACK_CHANNELS"
echo "PROJECT_NAME: $PROJECT_NAME"

git clone --depth 1 --single-branch --branch "${BRANCH:-master}" "https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/${GITLAB_USER}/ci-utils.git" ci-tmp
rsync -a ci-tmp/* ./ci-utils

./ci-utils/build_and_push.sh "${PROJECT_NAME}" "${SLACK_CHANNELS}"
3 changes: 1 addition & 2 deletions wrappers/here8.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ def initialize(cache, hash = {})
super(cache, hash)
@url_router = 'https://router.hereapi.com'
@url_matrix = 'https://matrix.router.hereapi.com'
@url_isoline = 'https://isoline.route.api.here.com/routing'
@url_tce = 'https://tce.api.here.com'
@url_isoline = 'https://isoline.router.hereapi.com'
@apikey = hash[:apikey]
@mode = hash[:mode]
@over_400km = hash[:over_400km]
Expand Down

0 comments on commit 05bf18e

Please sign in to comment.