Skip to content

Commit

Permalink
fix: [#571] Upload docker images
Browse files Browse the repository at this point in the history
  • Loading branch information
030 committed Apr 27, 2024
1 parent f4869d1 commit 6ae8db4
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 28 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
---
name: Docker
'on': push
'on':
# required by gomod-go-version-updater to trigger this action once pr has
# been reviewed
pull_request_review:
types: [submitted]
push:
jobs:
mcvs-docker-action:
runs-on: ubuntu-20.04
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/golang.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: golang
name: Golang
'on':
# required by gomod-go-version-updater to trigger this action once pr has
# been reviewed
Expand Down
29 changes: 3 additions & 26 deletions docs/quickstarts/DOCKER.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,11 @@

- [Download N3DR](./snippets/n3dr/DOWNLOAD.md).
- [Start a Nexus3 server](./snippets/nexus3/SERVER.md).
- Populate it with artifacts:

```bash
docker login localhost:8082 \
-p $(docker exec -it nexus3-n3dr-src cat /nexus-data/admin.password) \
-u admin && \
for d in $(seq 5); do
docker_registry_tag=localhost:8082/repository/docker-images/utrecht/n3dr:6.${d}.0
docker pull "utrecht/n3dr:6.${d}.0"
docker tag "utrecht/n3dr:6.${d}.0" localhost:8082/repository/docker-images/utrecht/n3dr:6.${d}.0
docker push localhost:8082/repository/docker-images/utrecht/n3dr:6.${d}.0
done
```

- [Create a repository in the Nexus3 server that has just been started](./snippets/n3dr/docker/CONFIG_REPOSITORY.md).
- [Populate it with artifacts](./snippets/n3dr/docker/POPULATE_ARTIFACTS.md).
- [Backup all artifacts](./snippets/n3dr/BACKUP.md).
- [Start another Nexus3 server](./snippets/nexus3/ANOTHERSERVER.md).
- Create a repository in the other Nexus3 server:

```bash
./n3dr configRepository \
-u admin \
-p $(docker exec -it nexus3-n3dr-dest cat /nexus-data/admin.password) \
-n localhost:9000 \
--https=false \
--configRepoName docker-images \
--configRepoType docker
```

- [Create a repository in the other Nexus3 server](./snippets/n3dr/docker/CONFIG_REPOSITORY_DEST.md).
- [Upload the artifacts to the other Nexus3 server](./snippets/n3dr/UPLOAD.md).
- [Validate](./snippets/n3dr/VALIDATE.md).
- [Cleanup](./snippets/nexus3/CLEANUP.md).
11 changes: 11 additions & 0 deletions docs/quickstarts/snippets/n3dr/docker/CONFIG_REPOSITORY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# config repository docker

```bash
./n3dr configRepository \
-u admin \
-p $(docker exec -it nexus3-n3dr-src cat /nexus-data/admin.password) \
-n localhost:8081 \
--https=false \
--configRepoName docker-images \
--configRepoType docker
```
11 changes: 11 additions & 0 deletions docs/quickstarts/snippets/n3dr/docker/CONFIG_REPOSITORY_DEST.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# config repository docker dest

```bash
./n3dr configRepository \
-u admin \
-p $(docker exec -it nexus3-n3dr-dest cat /nexus-data/admin.password) \
-n localhost:9000 \
--https=false \
--configRepoName docker-images \
--configRepoType docker
```
13 changes: 13 additions & 0 deletions docs/quickstarts/snippets/n3dr/docker/POPULATE_ARTIFACTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# populate artifacts

```bash
docker login localhost:8082 \
-p $(docker exec -it nexus3-n3dr-src cat /nexus-data/admin.password) \
-u admin && \
for d in $(seq 5); do
docker_registry_tag=localhost:8082/repository/docker-images/utrecht/n3dr:6.${d}.0
docker pull "utrecht/n3dr:6.${d}.0"
docker tag "utrecht/n3dr:6.${d}.0" localhost:8082/repository/docker-images/utrecht/n3dr:6.${d}.0
docker push localhost:8082/repository/docker-images/utrecht/n3dr:6.${d}.0
done
```

0 comments on commit 6ae8db4

Please sign in to comment.