Skip to content
Snippets Groups Projects
.gitlab-ci.yml 807 B
Newer Older
  • Learn to ignore specific revisions
  • image: obarun/pkgbuild:latest
    
    variables:
      repo: "$CI_PROJECT_DIR"
      pkg_name: "$CI_PROJECT_NAME"
      ssh_private_key: "$SSH_PRIVATE_KEY"
      ssh_known_host: "$SSH_KNOWN_HOSTS"
      pkg_target: "$CI_COMMIT_REF_NAME"
      repo_conf: ".repositories.conf"
      # followed variable are ignored but
      # need to be set
      pkg_track: "branch"
      pkg_address: "$CI_PROJECT_URL"
    
    Eric Vidal's avatar
    Eric Vidal committed
    
    
    stages:
      - build
      - deploy
    
    build_repo:
      stage: build
      script:
        - cp ./${repo_conf} /etc/${repo_conf}
    
    Eric Vidal's avatar
    Eric Vidal committed
        - builder.sh --chdir=trunk --use-repo
    
    
      retry:
        max: 2
    
    Eric Vidal's avatar
    Eric Vidal committed
    
    
      artifacts:
        name: $CI_PROJECT_NAME-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHORT_SHA
        expire_in: 2 days
        paths:
         - "*.pkg.tar.xz"
    
    Eric Vidal's avatar
    Eric Vidal committed
    
    
      only:
        changes:
          - trunk/PKGBUILD
    
    Eric Vidal's avatar
    Eric Vidal committed
    
    
    deploy:
      stage: deploy
      only:
        changes:
          - trunk/PKGBUILD
    
    Eric Vidal's avatar
    Eric Vidal committed
    
      script:
        - deploy.sh