The resource to get Fyzon translations inside your ConcourseCI pipeline.
The simplest example:
---
# declare custom resource type:
resource_types:
- name: fyzon-resource
type: docker-image
source:
repository: w32blaster/fyzon-resource
# declare resource
resources:
- name: fyzon
type: fyzon-resource
source:
url: "http://ci.my.fyzon.host"
# use it in your job
jobs:
- name: "Job Get Translations"
plan:
- get: fyzon
params:
project_id: 3
format: properties
delimeter: ":"
countries:
- gb: messages-en.properties
- ru: messages-ru.properties
# Build
- task: "Task to deonstrate how to consume translation files"
config:
platform: linux
image_resource:
type: docker-image
source: {repository: "alpine"}
inputs:
- name: fyzon
run:
path: sh
args:
- -exc
- |
ls fyzon
# ... here you will find two files:
# "messages-en.properties" and "messages-ru.properties"
# copy them to the destination folder
Have fun.
We store logic in the functions.js
file and we test it using shunit2 library. To run tests, please do:
$ ./functions_test.sh
Example of payload expected from Concourse is stored in the file payload.json
, it is used in Unit tests.