Skip to content

Commit

Permalink
Let's use daps2docker everywhere
Browse files Browse the repository at this point in the history
- dev-env
- ci
- deploy job
  • Loading branch information
hennevogel committed Mar 25, 2022
1 parent 90ff23a commit 6a88402
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 111 deletions.
35 changes: 15 additions & 20 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,23 @@ on:
jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Info
run: |
env | sort
- name: Build container
- name: Checkout repo
uses: actions/checkout@v3
- name: Checkout daps2docker repo
uses: actions/checkout@v3
with:
repository: openSUSE/daps2docker
path: daps2docker
- name: Build
run: |
sed "s/REPLACE_THIS_WITH_YOUR_ID/`id -u`/" docker-compose.override.yml.example > docker-compose.override.yml
docker-compose build
pushd daps2docker
./daps2docker.sh ../DC-obs-all html || exit 1
- name: Upload artifacts for inspection
uses: actions/upload-artifact@v2
with:
name: obs-docu-html
path: /tmp/daps2docker-*/obs-all/html/obs-all/

- name: Validate
run: |
docker-compose run --rm obs-docu daps -d DC-obs-all validate

- name: Generate HTML
run: |
docker-compose run --rm obs-docu daps -vv -d DC-obs-all html

- uses: actions/upload-artifact@v2
with:
name: obs-docu-html
path: build/obs-all/html/obs-all/
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ images/online
images/print
profiled
tmp
.cache
.config
.bash_history
/build/
*.sw?
*~
Expand Down
7 changes: 0 additions & 7 deletions .travis.yml

This file was deleted.

13 changes: 0 additions & 13 deletions Dockerfile

This file was deleted.

13 changes: 0 additions & 13 deletions Dockerfile.base

This file was deleted.

53 changes: 11 additions & 42 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,53 +17,22 @@ Publishing Suite ([daps](https://github.com/openSUSE/daps)).
After editing the document validate your changes via the following
commands, for example:

$ daps -d DC-obs-user-guide validate
```
daps -d DC-obs-user-guide validate
```

Similar for other guides. HTML documentation can get generated via

$ daps -d DC-obs-user-guide html
```
daps -d DC-obs-user-guide html
```

## Development Environment
We are also shipping a [docker/docker-compose](https://www.docker.com/) based
development environment that you can use.

1. Since we mount the repository into our container, we need to map
your local user id to the one of the container user:

```bash
sed "s/REPLACE_THIS_WITH_YOUR_ID/`id -u`/" docker-compose.override.yml.example > docker-compose.override.yml
```

1. Then you can build the development environment with:

```bash
docker-compose build
```
You can also also use a docker/podman based development environment.

1. And after it's built, you can run any command in it via:
Install the [daps2docker](https://software.opensuse.org//download.html?project=Documentation%3ATools&package=daps2docker)
package and run

```bash
docker-compose run --rm obs-docu daps -vv -d DC-obs-all html
```

### Podman-based Development Environment

If you are not using docker and docker-compose, then you can achieve the same
using [podman](https://podman.io/) and [buildah](https://buildah.io/):
```ShellSession
$ buildah bud --layers --build-arg CONTAINER_USERID=0 --build-arg USER=root --tag obs-docu .
$ podman run --rm -v $(pwd):/obs-docu:Z localhost/obs-docu daps -vv -d DC-obs-all html
```


## Update Documentation

The first steps to update the documentation are:

- Fork [obs-docu](https://github.com/openSUSE/obs-docu) project and clone the fork on your computer.
- Prepare the development environment following the instructions above.
- Add or correct a piece of documentation.
- Commit your changes in a new branch and send a Pull Request (as in any other repository).
- Wait until your changes are merged.

Once the Pull Request is approved and merged, your changes are ready to be deployed. However, the OBS documentation is hosted online at openbuildservice.org, so you should move to [obs-landing](https://github.com/openSUSE/obs-landing) repository where you'll find the [instructions to deploy](https://github.com/openSUSE/obs-landing#updating-obs-documentation).
daps2docker .
```
7 changes: 0 additions & 7 deletions docker-compose.override.yml.example

This file was deleted.

9 changes: 0 additions & 9 deletions docker-compose.yml

This file was deleted.

0 comments on commit 6a88402

Please sign in to comment.