Skip to content

The ConcourseCI resource to get fresh translations from Fyzon translating system

License

Notifications You must be signed in to change notification settings

w32blaster/fyzon-resource

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fyzon-resource

The resource to get Fyzon translations inside your ConcourseCI pipeline.

Fyzon resource ConcourseCI Screenshot

Use the resource

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.

Development

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.

About

The ConcourseCI resource to get fresh translations from Fyzon translating system

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages