{"id":14986045,"url":"https://github.com/woozymasta/archimate-ci-image","last_synced_at":"2025-04-11T20:32:02.300Z","repository":{"id":44675850,"uuid":"388300787","full_name":"WoozyMasta/archimate-ci-image","owner":"WoozyMasta","description":"Archi container image for use in continuous integration pipelines","archived":false,"fork":false,"pushed_at":"2024-03-06T15:23:18.000Z","size":226,"stargazers_count":45,"open_issues_count":7,"forks_count":27,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-25T18:16:47.984Z","etag":null,"topics":["archi","archimate","archimatetool","coarchi","continuous-delivery","continuous-integration","docker","github-actions","github-pages","gitlab","gitlab-ci"],"latest_commit_sha":null,"homepage":"https://woozymasta.github.io/archimate-ci-image-example/?view=6213","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WoozyMasta.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-22T02:12:05.000Z","updated_at":"2025-03-04T02:40:22.000Z","dependencies_parsed_at":"2024-06-21T02:41:03.562Z","dependency_job_id":"85609f84-15bc-4eed-886a-1795b98b6d11","html_url":"https://github.com/WoozyMasta/archimate-ci-image","commit_stats":{"total_commits":48,"total_committers":2,"mean_commits":24.0,"dds":0.04166666666666663,"last_synced_commit":"e818b8a7fa609246d0fc76fde184163f9d7d260d"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WoozyMasta%2Farchimate-ci-image","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WoozyMasta%2Farchimate-ci-image/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WoozyMasta%2Farchimate-ci-image/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WoozyMasta%2Farchimate-ci-image/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WoozyMasta","download_url":"https://codeload.github.com/WoozyMasta/archimate-ci-image/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248476372,"owners_count":21110264,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["archi","archimate","archimatetool","coarchi","continuous-delivery","continuous-integration","docker","github-actions","github-pages","gitlab","gitlab-ci"],"created_at":"2024-09-24T14:12:11.608Z","updated_at":"2025-04-11T20:31:57.288Z","avatar_url":"https://github.com/WoozyMasta.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Archimate container image for CI \u003c!-- omit in toc --\u003e\n\n[Archi][Archi repository] container image for use in continuous integration\npipelines. With this container, you can implement automatic report generation\nand model export in your pipeline.\n\nThe [Archi][] modelling toolkit is targeted toward all levels of Enterprise\nArchitects and Modellers.\n\nFor collaboration with models in the git repository, the [coArchi][] plugin\nis installed in the container.\n\n\u003c!-- markdownlint-disable --\u003e\n\u003cp align=\"center\" width=\"100%\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/WoozyMasta/archimate-ci-image/master/extras/scheme.png\" /\u003e\n\u003c/p\u003e\n\nFor ease of use, the entrypoint.sh script is run in the container,\nwhich processes the environment variables, and the native git client is used\nfor cloning.\n\n## Table of Contents \u003c!-- omit in toc --\u003e\n\n* [Examples and Demo](#examples-and-demo)\n* [Container image](#container-image)\n* [Run Container](#run-container)\n* [Configuration](#configuration)\n  * [GitHub Actions Configuration](#github-actions-configuration)\n    * [Variables](#variables)\n    * [Inputs](#inputs)\n* [GitHub Actions Example](#github-actions-example)\n* [GitLab CI Example](#gitlab-ci-example)\n* [Build Container](#build-container)\n* [Solving Potential Problems](#solving-potential-problems)\n\n## Examples and Demo\n\n[View GitHub Pages demo][demo-gh-pages] | [Example GitHub repository][example-gh]\n\n[View GitLab Pages demo][demo-gl-pages] | [Example GitLab repository][example-gl]\n\n## Container image\n\nYou can pull image from registries:\n\n* `ghcr.io/woozymasta/archimate-ci-image:5.0.2-1.0.4`\n* `docker.io/woozymasta/archimate-ci-image:5.0.2-1.0.4`\n\nAnd rootless image:\n\n* `ghcr.io/woozymasta/archimate-ci-image:5.0.2-1.0.4-rootless`\n* `docker.io/woozymasta/archimate-ci-image:5.0.2-1.0.4-rootless`\n\n## Run Container\n\nExample with cloning a remote repository and render HTML report:\n\n```bash\nmkdir -p ./report\nchmod o+rw ./report\n\ndocker run --rm -ti \\\n  -v $(pwd)/report:/archi/report \\\n  -e GIT_REPOSITORY=https://github.com/WoozyMasta/archimate-ci-image-example.git \\\n  -e ARCHI_HTML_REPORT_ENABLED=true \\\n  -e ARCHI_JASPER_REPORT_ENABLED=false \\\n  -e ARCHI_CSV_REPORT_ENABLED=true \\\n  -e ARCHI_EXPORT_MODEL_ENABLED=true \\\n  ghcr.io/woozymasta/archimate-ci-image:5.0.2-1.0.4\n```\n\nAn example with handling a local repository:\n\n```bash\ncd /path/to/exist/repository\nmkdir -p ./report\nchmod o+rw ./report\n\ndocker run --rm -ti \\\n  -v $(pwd):/archi/project \\\n  -v $(pwd)/report:/archi/report \\\n  ghcr.io/woozymasta/archimate-ci-image:5.0.2-1.0.4\n```\n\nWorking with the CLI directly:\n\n```bash\ndocker run --rm -ti ghcr.io/woozymasta/archimate-ci-image:5.0.2-1.0.4 --help\n```\n\nExample on how to write preferences:\n\n```bash\nmkdir -p ./settings\n\n# Change the setting to increase the resolution of the images in the HTML report.\n\ncat \u003c\u003c EOF \u003e ./settings/com.archimatetool.editor.prefs\neclipse.preferences.version=1\nscaleImageExport=true\nEOF\n\ndocker run --rm -ti \\\n  -v $(pwd)/settings:/root/.archi/.metadata/.plugins/org.eclipse.core.runtime/.settings \\\n  ...\n```\n\n## Configuration\n\nConfiguration for connecting to the git repository:\n\n* **`GIT_REPOSITORY`** - Git repository address;\n* **`GIT_TOKEN`** - Token for accessing the git repository. Preferred\n  for private repositories, or use a key mounted in an ssh container;\n* **`GIT_USERNAME`** - Username (_it is better to use token or ssh key_);\n* **`GIT_PASSWORD`** - Password (_it is better to use token or ssh key_).\n\nOptions for managing model export:\n\n* **`ARCHI_PROJECT_PATH`**=`/archi/project` - The path where the git repository\n  with the architectural model will be cloned or connected;\n* **`ARCHI_REPORT_PATH`**=`/archi/report` - Path where reports will be saved;\n* **`ARCHI_HTML_REPORT_ENABLED`**=`true` - Generate HTML report;\n* **`ARCHI_HTML_REPORT_PATH`**=`$ARCHI_REPORT_PATH/html` - Path for save HTML\n  report;\n* **`ARCHI_JASPER_REPORT_ENABLED`**=`false` - Generate Jasper reports;\n* **`ARCHI_JASPER_REPORT_PATH`**=`$ARCHI_REPORT_PATH/jasper` - Path for save\n  Jasper report;\n* **`ARCHI_JASPER_REPORT_FORMATS`**=`PDF,DOCX` - Formats for Jasper reports\n  should be separated by commas. Valid values: `PDF`, `HTML`, `RTF`, `PPT`,\n  `ODT`, `DOCX`;\n* **`ARCHI_JASPER_REPORT_TITLE`** - The title for the Jasper report, the\n  default is the model/project name;\n* **`ARCHI_CSV_REPORT_ENABLED`**=`false` - Generate CSV report;\n* **`ARCHI_CSV_REPORT_PATH`**=`$ARCHI_REPORT_PATH/csv` - Path for save CSV\n  report;\n* **`ARCHI_EXPORT_MODEL_ENABLED`**=`true` - Export model in `*.archimate`\n  format.\n* **`ARCHI_EXPORT_MODEL_PATH`**=`$ARCHI_REPORT_PATH` - Path for save model;\n* **`ARCHI_APP`**=`com.archimatetool.commandline.app` application name.\n* **`DEBUG`**=`false` - enable `bash -x`\n\n### GitHub Actions Configuration\n\n#### Variables\n\n* **`GITHUB_TOKEN`** - Use default token, or you can set some token from secrret `${{ secrets.ACCESS_TOKEN }}`\n* **`GITHUB_SERVER_URL`**=`https://github.com` - GitHub server URL;\n* **`GITHUB_PAGES_DOMAIN`** - Custom domain CNAME for pages;\n* **`GITHUB_PAGES_BRANCH`**=`gh-pages` - Branch for store reports used in pages;\n* **`GIT_SUBTREE_PREFIX`**=`.archi_report` - Directory for store reports in\n  model branch.\n\n#### Inputs\n\nAll inputs equivalent to environment variables:\n\n* `githubToken` **required**\n* `archiHtmlReportEnabled`\n* `archiJasperReportEnabled`\n* `archiJasperReportFormats`\n* `archiJasperReportTitle`\n* `archiCsvReportEnabled`\n* `archiExportModelEnabled`\n* `githubServerURL`\n* `githubPagesDomain`\n* `githubPagesBranch`\n* `gitSubtreePrefix`\n* `debugAction`\n\n## GitHub Actions Example\n\nAdd a configuration like this to your actions `.github/workflows/main.yml` file:\n\n```yml\njobs:\n  archi_report:\n    permissions:\n      contents: write\n      pages: write\n    runs-on: ubuntu-latest\n    name: Deploy Archi report HTML to GitHub Pages\n    steps:\n      - name: Check out the repo\n        uses: actions/checkout@v2\n\n      - name: Deploy Archi report\n        id: archi\n        uses: WoozyMasta/archimate-ci-image@5.0.2-1.0.4\n        with:\n          archiHtmlReportEnabled: true\n          archiJasperReportEnabled: true\n          archiJasperReportFormats: PDF,DOCX\n          archiCsvReportEnabled: false\n          archiExportModelEnabled: true\n          githubToken: ${{ secrets.GITHUB_TOKEN }}\n```\n\nIn the repository settings, set the branch for publishing pages that you\nspecified in `githubPagesBranch` or the `GITHUB_PAGES_BRANCH` variable\n(`gh-pages` by default).\n\n![pages](extras/github_pages.png)\n\n## GitLab CI Example\n\nAdd a configuration like this to your `./.gitlab-ci.yml` file:\n\n```yml\npages:\n  stage: build\n  image:\n    name: ghcr.io/woozymasta/archimate-ci-image:5.0.2-1.0.4\n    entrypoint: [\"\"]\n\n  script:\n    - /opt/Archi/entrypoint.sh\n    \n  variables:\n    ARCHI_HTML_REPORT_ENABLED: \"true\"\n    ARCHI_JASPER_REPORT_ENABLED: \"true\"\n    ARCHI_JASPER_REPORT_FORMATS: \"PDF,DOCX\"\n    ARCHI_CSV_REPORT_ENABLED: \"false\"\n    ARCHI_EXPORT_MODEL_ENABLED: \"true\"\n\n  rules:\n    - if: $CI_COMMIT_BRANCH != null || $CI_PIPELINE_SOURCE == \"merge_request_event\"\n      exists:\n        - model/folder.xml\n\n  artifacts:\n    name: \"$CI_JOB_NAME from $CI_PROJECT_NAME on $CI_COMMIT_REF_SLUG\"\n    expire_in: 30d\n    paths:\n      - public\n```\n\nIn GitLab CI if `ARCHI_PROJECT_PATH` is undefined is set to `$CI_PROJECT_DIR`\nand all report paths are automatically set to `$CI_PROJECT_DIR/public`\n\n## Build Container\n\n```bash\nARCHI_VERSION=5.0.2\nCOARCHI_VERSION=0.8.7\n\ndocker build \\\n  --tag \"archimate-ci-image:$ARCHI_VERSION-dev\" \\\n  --build-arg=\"ARCHI_VERSION=$ARCHI_VERSION\" \\\n  --build-arg=\"COARCHI_VERSION=$COARCHI_VERSION\" \\\n  ./\n\ndocker build \\\n  --file Dockerfile.rootless \\\n  --tag \"archimate-ci-image:$ARCHI_VERSION-dev-rootless\" \\\n  --build-arg=\"ARCHIMATE_CI_IMAGE=archimate-ci\" \\\n  --build-arg=\"ARCHIMATE_CI_VERSION=$ARCHI_VERSION-dev\" \\\n  ./\n```\n\n## Solving Potential Problems\n\nIf you use podman, unshare mounted volumes to user with id 1000.\n\n```bash\nmkdir -p ./report\n\npodman unshare chown 1000 -R $(pwd)/model\npodman run --rm -ti \\\n  -v $(pwd)/report:/archi/report \\\n  -e GIT_REPOSITORY=https://github.com/WoozyMasta/archimate-ci-image-example.git \\\n  -e ARCHI_JASPER_REPORT_ENABLED=false \\\n  ghcr.io/woozymasta/archimate-ci-image:5.0.2-1.0.4\n```\n\n---\n\nIf you are using a private git repository hosted behind a VPN, the tunnel\ninterface or name resolution might not be available in the container, use the\nhost network in the container and force the DNS record forward.\n\n```bash\ndocker run --rm -ti \\\n  -v $(pwd)/archi:/archi \\\n  -e GIT_REPOSITORY=https://github.com/WoozyMasta/archimate-ci-image-example.git\n  --network=host\n  --add-host=\"$(getent hosts gitlab.internal.tld | awk '{print $2 \":\" $1}')\"\n  ghcr.io/woozymasta/archimate-ci-image:5.0.2-1.0.4\n```\n\n\u003c!-- links --\u003e\n\n[Archi]: https://www.archimatetool.com \"The Open Source modelling toolkit for creating ArchiMate models and sketches.\"\n[Archi repository]: https://github.com/archimatetool/archi \"Archi: ArchiMate Modelling Tool\"\n[coArchi]: https://github.com/archimatetool/archi-modelrepository-plugin \"coArchi – Model Collaboration for Archi\"\n\n[example-gh]: https://github.com/WoozyMasta/archimate-ci-image-example.git\n[demo-gh-pages]: https://woozymasta.github.io/archimate-ci-image-example/?view=6213\n[example-gl]: https://gitlab.com/WoozyMasta/archimate-ci-image-example\n[demo-gl-pages]: https://woozymasta.gitlab.io/archimate-ci-image-example/?view=6213\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwoozymasta%2Farchimate-ci-image","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwoozymasta%2Farchimate-ci-image","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwoozymasta%2Farchimate-ci-image/lists"}