Sha256: bf755814ce0befd81dd25d74ef2bd0e445dca2c094171918c070e4004e73eb03

Contents?: true

Size: 1.62 KB

Versions: 1

Compression:

Stored size: 1.62 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
  artifacts:
    paths:
     - ./*.gem
    expire_in: 1 week
  tags:
  - docker

Release_Staging:
  stage: staging
  script:
    - ls -la
#   - deployctl release .... need to build the website for release, who? deployd ?
  artifacts:
    paths:
    - ./*.gem
  only:
  - tags
  except:
  - branches
  tags:
  - docker

Release_Production:
  stage: production
  environment: production
  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.2 .gitlab-ci.yml