Sha256: 62f737c7e01a70c3a94d241ee64f26c0ac4bef68eac538e4c656c3df0978021a

Contents?: true

Size: 1.7 KB

Versions: 1

Compression:

Stored size: 1.7 KB

Contents

image: "ruby:2.3"

stages:
- build
- test
- staging
- production

Buid:
  stage: build
  script:
    - bundle install
    - rake set_git_tag
    - rake
    - gem build jekyll-plantuml-url.gemspec
  artifacts:
    paths:
     - ./*.gem
    expire_in: 1 week
  tags:
  - docker

test:
  stage: test
  script:
    - gem install jekyll bundler rake
    - export myGem=`ls *.gem`
    - export git_version=`git describe --tags --always`
    - export gem_version="$(sed s/-/\./g <<<$git_version)"
    - gem install "./$myGem"
    - mkdir test; cd test
    - jekyll new test_plantuml
    - cd test_plantuml
    - 'echo "gem \"jekyll-plantuml-url\", \"$gem_version\"" >> Gemfile'
    - 'echo -e "gems:\n  - jekyll-plantuml-url\n" >> _config.yml'
    - 'echo "{% plantuml %}\n[First] - [Second]\n{% endplantuml %}\n" >> index.md'
    - bundle install
    - bundle exec jekyll build
  tags:
  - docker

Release_Staging:
  stage: staging
  environment: staging
  variables:
    GIT_STRATEGY: none
  script:
    - ls -la
#   - deployctl release .... need to build the website for release, who? deployd ?
# or push to private repo
  artifacts:
    paths:
      - ./*.gem
  except:
  - branches
  tags:
  - docker

Release_Production:
  stage: production
  environment: production
  dependencies:
     - Release_Staging
  variables:
    GIT_STRATEGY: none
  script:
    - ls -la
    - mkdir -pv ~/.gem
    - export Fail=0
    - touch ~/.gem/credentials
    - chmod 0600 ~/.gem/credentials
    - 'echo -e "---\n:rubygems_api_key: $GEM_API_PUSH\n" >> ~/.gem/credentials'
    - 'gem push *.gem && echo Success || export Fail=1'
    - rm -f ~/.gem/credentials
    - '[ "$Fail" -eq 0 ]'
  only:
  - tags
  except:
  - branches
  tags:
  - docker
  when: manual

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jekyll-plantuml-url-0.1.3 .gitlab-ci.yml