Skip to content

Commit

Permalink
build: prepare tag 4.9.1-0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
WoozyMasta committed Dec 15, 2021
1 parent d7ef745 commit 72a509e
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 19 deletions.
70 changes: 52 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,21 @@ You can check the operation of the container using the [example][]
* [Container image](#container-image)
* [Run Container](#run-container)
* [Configuration](#configuration)
* [GitHub Actions Configuration](#github-actions-configuration)
* [Variables](#variables)
* [Inputs](#inputs)
* [GitHub Actions Configuration](#github-actions-configuration)
* [Variables](#variables)
* [Inputs](#inputs)
* [GitHub Actions Example](#github-actions-example)
* [GitLab CI Example](#gitlab-ci-example)
* [Build Container](#build-container)
* [Solving Potential Problems](#solving-potential-problems)

## Container image

You can pull image from registries:

* `ghcr.io/woozymasta/archimate-ci:4.9.1`
* `quay.io/woozymasta/archimate-ci:4.9.1`
* `docker.io/woozymasta/archimate-ci:4.9.1`
* `ghcr.io/woozymasta/archimate-ci:4.9.1-0.5`
* `quay.io/woozymasta/archimate-ci:4.9.1-0.5`
* `docker.io/woozymasta/archimate-ci:4.9.1-0.5`

## Run Container

Expand All @@ -56,7 +57,7 @@ docker run --rm -ti \
-e ARCHI_JASPER_REPORT_ENABLED=false \
-e ARCHI_CSV_REPORT_ENABLED=true \
-e ARCHI_EXPORT_MODEL_ENABLED=true \
ghcr.io/woozymasta/archimate-ci:4.9.1
ghcr.io/woozymasta/archimate-ci:4.9.1-0.5
```

An example with handling a local repository:
Expand All @@ -69,13 +70,13 @@ chmod o+rw ./report
docker run --rm -ti \
-v $(pwd):/archi/project \
-v $(pwd)/report:/archi/report \
ghcr.io/woozymasta/archimate-ci:4.9.1
ghcr.io/woozymasta/archimate-ci:4.9.1-0.5
```

Working with the CLI directly:

```bash
docker run --rm -ti ghcr.io/woozymasta/archimate-ci:4.9.1 --help
docker run --rm -ti ghcr.io/woozymasta/archimate-ci:4.9.1-0.5 --help
```

## Configuration
Expand Down Expand Up @@ -112,9 +113,9 @@ Options for managing model export:
* **`ARCHI_EXPORT_MODEL_PATH`**=`$ARCHI_REPORT_PATH` - Path for save model;
* **`ARCHI_APP`**=`com.archimatetool.commandline.app` application name.

## GitHub Actions Configuration
### GitHub Actions Configuration

### Variables
#### Variables

* **`GITHUB_TOKEN`** - Use default token, or you can set some token from secrret `${{ secrets.ACCESS_TOKEN }}`
* **`GITHUB_SERVER_URL`**=`https://github.com` - GitHub server URL;
Expand All @@ -123,7 +124,7 @@ Options for managing model export:
* **`GIT_SUBTREE_PREFIX`**=`.archi_report` - Directory for store reports in
model branch.

### Inputs
#### Inputs

All inputs equivalent to environment variables:

Expand Down Expand Up @@ -155,21 +156,54 @@ jobs:

- name: Deploy Archi report
id: archi
uses: WoozyMasta/[email protected].1
uses: WoozyMasta/[email protected].5
with:
archiHtmlReportEnabled: true
archiJasperReportEnabled: true
archiJasperReportFormats: PDF
archiJasperReportFormats: PDF,DOCX
archiCsvReportEnabled: false
archiExportModelEnabled: true
```
## GitLab CI Example
```yml
pages:
stage: build
image:
name: woozymasta/archimate-ci-image:4.9.1-0.5

script:
- /opt/Archi/docker-entrypoint.sh

variables:
MODEL_PATH: "$CI_PROJECT_DIR"
REPORT_PATH: "$CI_PROJECT_DIR/report"
HTML_REPORT_ENABLED: "true"
JASPER_REPORT_ENABLED: "true"
JASPER_REPORT_FORMATS: "PDF,DOCX"
JASPER_REPORT_TITLE: "true"
CSV_REPORT_ENABLED: "true"
EXPORT_MODEL_ENABLED: "true"

rules:
- if: $CI_COMMIT_BRANCH != null || $CI_PIPELINE_SOURCE == "merge_request_event"
exists:
- model/folder.xml

artifacts:
name: "$CI_JOB_NAME from $CI_PROJECT_NAME on $CI_COMMIT_REF_SLUG"
expire_in: 1 week
paths:
- report/html
```
## Build Container
```bash
docker build \
--tag archimate-ci:4.9.1 \
--build-arg="ARCHI_VERSION=4.9.1" \
--tag archimate-ci:4.9.1-0.5 \
--build-arg="ARCHI_VERSION=4.9.1-0.5" \
--build-arg="COARCHI_VERSION=0.8.1.202112061132" \
./
```
Expand All @@ -192,7 +226,7 @@ podman run --rm -ti \
-v $(pwd)/report:/archi/report \
-e GIT_REPOSITORY=https://github.com/WoozyMasta/archimate-ci-image-example.git \
-e ARCHI_JASPER_REPORT_ENABLED=false \
ghcr.io/woozymasta/archimate-ci:4.9.1
ghcr.io/woozymasta/archimate-ci:4.9.1-0.5
```

---
Expand All @@ -207,7 +241,7 @@ docker run --rm -ti \
-e GIT_REPOSITORY=https://github.com/WoozyMasta/archimate-ci-image-example.git
--network=host
--add-host="$(getent hosts gitlab.internal.tld | awk '{print $2 ":" $1}')"
ghcr.io/woozymasta/archimate-ci:4.9.1
ghcr.io/woozymasta/archimate-ci:4.9.1-0.5
```

<!-- links -->
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ branding:
color: blue
runs:
using: docker
image: docker://ghcr.io/woozymasta/archimate-ci-image:4.9.1-0.3
image: docker://ghcr.io/woozymasta/archimate-ci-image:4.9.1-0.5
env:
GITHUB_TOKEN: ${{ inputs.githubToken }}
ARCHI_HTML_REPORT_ENABLED: ${{ inputs.archiHtmlReportEnabled }}
Expand Down

0 comments on commit 72a509e

Please sign in to comment.