Coder Social home page Coder Social logo

Comments (6)

mihaeu avatar mihaeu commented on August 16, 2024 1

Hey there, can you explain your use case a bit more to understand this? If I'm understanding you correctly, than this is kind of already possible by just looking at the cached files.

from cosmere.

hudrid avatar hudrid commented on August 16, 2024 1

Thanks for the quick response!
Our company has a monorepository, where documents (our documents are full of tables and different styles) are collected via pipeline from different repositories. Then the documents are published on our website and in Confluence. We have implemented a check that identical documents should not be published, but the publication of documents in Confluence is always performed, regardless of whether the documents are identical or not. Thus, the last date of changes is different for the document on the site and the document in Confluence.

an example of a document that will always be published
# AdminGuide

### **Document card**

<table>
<tr>
<td> <div style="width:200px"> <b> Doc version </b></div> </td>
<td> <div style="width:300px"> 1.0 </div> </td>
</tr>
<tr>
<td> <b> Date: </b> </td>
<td> 16.08.2028 </td>
</tr>
<tr>
<td> <b> Version </b> </td>
<td> 2.0 </td>
</tr>
<tr>
<td> <b> Document type </b> </td>
<td> AdminGuide </td>
</tr>
<tr>
<td> <b> Customer </b> </td>
<td> Cust </td>
</tr>
<tr>
<td> <b> Document Status </b> </td>
<td> <span style="background-color: #DEEBFF; color: #0747A6"> <b> Validation </b> </span></td>
</tr>
</table>

from cosmere.

mihaeu avatar mihaeu commented on August 16, 2024 1

from cosmere.

mihaeu avatar mihaeu commented on August 16, 2024 1

This looks like GitLab pipelines if I'm not mistaken. The default cache path is build unless you specified another one in your comere.json configuration. If you add the cache to the cache layer/artifact of your build step/action cosmere will check the cache before doing anything and if things match, won't do any work on Confluence.

paths:
      - node_modules/
      - build/

In case you are using GitLab pipelines make sure to consider which steps write and read from and to your cache. E.g. an npm install step should write to the cache, all other steps should only read from that folder. The step in which cosmere converts and publishes the information has to both read and write,

from cosmere.

hudrid avatar hudrid commented on August 16, 2024

The cache is not used.

What value should be specified for the paths parameter in pipeline? Maybe:

paths:
      - node_modules/

Сan you provide an example?

from cosmere.

hudrid avatar hudrid commented on August 16, 2024
gitlab-ci.yml:
confluence:
  image: ...
  stage: publish
  tags:
    - pages
  cache:
    paths:
      - node_modules/
      - build/
  before_script:
    - rm -rf $DOCS_DIR
    - cp -R $CI_PROJECT_DIR/release/ $DOCS_DIR
    - ls -la $DOCS_DIR
  script:
    - npm install
    #- npm run lint
    - npm run publish
  artifacts:
    paths:
      - build
  only:
    - master
  needs:
    - job: collect_docs
      artifacts: true

Works only for documents without pictures.

Job Information

image

from cosmere.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.