version: '2'
pipelines:
  - mpp-import-pipelines:
      path: fedora-vars.ipp.yaml
  - mpp-import-pipeline:
      path: fedora-build-v2.ipp.yaml
      id: build
    runner:
      mpp-format-string: org.osbuild.fedora{release}
  - name: ostree-tree
    build: name:build
    stages:
      - type: org.osbuild.rpm
        options:
          gpgkeys:
            mpp-eval: gpgkeys
        inputs:
          packages:
            type: org.osbuild.files
            origin: org.osbuild.source
            mpp-depsolve:
              architecture: $arch
              module-platform-id: $module_platform_id
              repos:
                mpp-eval: repos
              packages:
                - '@cloud-server-environment'
                - chrony
                - dracut-config-generic
                - grub2-pc
                - kernel-core
                - langpacks-en
                - nss-altfiles
                - ostree
                - polkit
                - rpm-ostree
                - selinux-policy-targeted
                - systemd-udev
              excludes:
                - dracut-config-rescue
      - type: org.osbuild.locale
        options:
          language: en_US.UTF-8
      - type: org.osbuild.selinux
        options:
          file_contexts: etc/selinux/targeted/contexts/files/file_contexts
      - type: org.osbuild.ostree.preptree
        options:
          etc_group_members:
            - wheel
            - docker
  - name: ostree-commit
    build: name:build
    stages:
      - type: org.osbuild.ostree.init
        options:
          path: /repo
      - type: org.osbuild.ostree.commit
        inputs:
          tree:
            type: org.osbuild.tree
            origin: org.osbuild.pipeline
            references:
              - name:ostree-tree
        options:
          ref:
            mpp-format-string: '{ref}'
          os_version:
            mpp-format-string: '{release}'
  - name: tarball-tree
    build: name:build
    stages:
      - type: org.osbuild.ostree.init
        options:
          path: /repo
      - type: org.osbuild.ostree.pull
        options:
          repo: /repo
        inputs:
          commits:
            type: org.osbuild.ostree
            origin: org.osbuild.pipeline
            references:
              name:ostree-commit:
                ref:
                  mpp-format-string: '{ref}'
  - name: tarball
    build: name:build
    stages:
      - type: org.osbuild.tar
        options:
          filename: fedora-commit.tar
          acls: false
          selinux: false
          xattrs: false
        inputs:
          tree:
            type: org.osbuild.tree
            origin: org.osbuild.pipeline
            references:
              name:tarball-tree: {}
