Skip to content
Snippets Groups Projects
.gitlab-ci.yml 560 B
Newer Older
Michael Filz's avatar
Michael Filz committed
---

image: "registry.gitlab.cc-asp.fraunhofer.de:4567/iam/docker-images/ansible-ci:latest"

stages:
  - test
  - build

test_library:
  script:
    - cd library
    - python3 setup.py test

build_collection:
  stage: build
  script:
    - cd collection
    - ansible-galaxy collection build
    - gunzip *.tar.gz
Michael Filz's avatar
Michael Filz committed
    - mv $(ls *.tar) $(ls *.tar).gz
Michael Filz's avatar
Michael Filz committed
    - 'curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file *.tar.gz "https://gitlab.cc-asp.fraunhofer.de/api/v4/projects/${CI_PROJECT_ID}/packages/generic/collection/${CI_COMMIT_REF_NAME}/$(ls *.tar.gz)"'