aboutsummaryrefslogtreecommitdiff
path: root/pipeline.yml
blob: 82691813bc0ed66cc4a99a6a53931b8b8c04fff5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
resources:
  - name: trackermap-server-git
    type: git
    source:
      uri: ((git-repo))
      tag_filter: trackermap-*
      fetch_tags: "true"

  - name: docker-image
    type: registry-image
    icon: docker
    source:
      repository: ((registry-repo))
      username: ((registry-username))
      password: ((registry-password))
      tag: latest

jobs:
  - name: build-and-publish
    plan:
      - get: trackermap-server-git
        trigger: true
      - task: build-docker
        privileged: true
        config:
          platform: linux
          image_resource:
            type: registry-image
            source:
              repository: concourse/oci-build-task
              tag: latest
          inputs:
            - name: trackermap-server-git
          outputs:
            - name: image
          run:
            path: sh
            args:
              - -exc
              - |
                cd trackermap-server-git/
                git describe --tags | sed 's/trackermap-//'  > ../image/tag
                export BUILD_ARG_GIT_COMMIT=$(git rev-parse HEAD)
                cd ../
                export CONTEXT=trackermap-server-git
                build
      - put: docker-image
        params:
          image: image/image.tar
          additional_tags: image/tag