ci: standardize woodpecker secret names
This commit is contained in:
parent
83cacb8c62
commit
5f6199290e
2 changed files with 28 additions and 6 deletions
|
|
@ -9,6 +9,8 @@ steps:
|
|||
- name: login-and-push
|
||||
image: docker:28-cli
|
||||
environment:
|
||||
REGISTRY_HOSTPORT:
|
||||
from_secret: REGISTRY_HOSTPORT
|
||||
REGISTRY_USERNAME:
|
||||
from_secret: REGISTRY_USERNAME
|
||||
REGISTRY_PASSWORD:
|
||||
|
|
@ -16,9 +18,9 @@ steps:
|
|||
SERVICE_NAME:
|
||||
from_secret: SERVICE_NAME
|
||||
commands:
|
||||
- echo "${REGISTRY_PASSWORD}" | docker login registry.nxtgauge.com -u "${REGISTRY_USERNAME}" --password-stdin
|
||||
- docker build -t registry.nxtgauge.com/nxtgauge-rust-${SERVICE_NAME} --build-arg SERVICE_NAME=${SERVICE_NAME} -f Dockerfile.simple .
|
||||
- docker push registry.nxtgauge.com/nxtgauge-rust-${SERVICE_NAME}
|
||||
- echo "${REGISTRY_PASSWORD}" | docker login "${REGISTRY_HOSTPORT}" -u "${REGISTRY_USERNAME}" --password-stdin
|
||||
- docker build -t "${REGISTRY_HOSTPORT}/nxtgauge-rust-${SERVICE_NAME}" --build-arg SERVICE_NAME=${SERVICE_NAME} -f Dockerfile.simple .
|
||||
- docker push "${REGISTRY_HOSTPORT}/nxtgauge-rust-${SERVICE_NAME}"
|
||||
|
||||
---
|
||||
when:
|
||||
|
|
@ -29,11 +31,13 @@ steps:
|
|||
- name: login-and-push-migrate
|
||||
image: docker:28-cli
|
||||
environment:
|
||||
REGISTRY_HOSTPORT:
|
||||
from_secret: REGISTRY_HOSTPORT
|
||||
REGISTRY_USERNAME:
|
||||
from_secret: REGISTRY_USERNAME
|
||||
REGISTRY_PASSWORD:
|
||||
from_secret: REGISTRY_PASSWORD
|
||||
commands:
|
||||
- echo "${REGISTRY_PASSWORD}" | docker login registry.nxtgauge.com -u "${REGISTRY_USERNAME}" --password-stdin
|
||||
- docker build -t registry.nxtgauge.com/nxtgauge-db-migrate -f Dockerfile.migrate .
|
||||
- docker push registry.nxtgauge.com/nxtgauge-db-migrate
|
||||
- echo "${REGISTRY_PASSWORD}" | docker login "${REGISTRY_HOSTPORT}" -u "${REGISTRY_USERNAME}" --password-stdin
|
||||
- docker build -t "${REGISTRY_HOSTPORT}/nxtgauge-db-migrate" -f Dockerfile.migrate .
|
||||
- docker push "${REGISTRY_HOSTPORT}/nxtgauge-db-migrate"
|
||||
|
|
|
|||
18
.woodpecker/README.md
Normal file
18
.woodpecker/README.md
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
# Woodpecker CI Secrets
|
||||
|
||||
The following Woodpecker secrets are required for CI/CD pipelines:
|
||||
|
||||
| Secret Name | Purpose |
|
||||
| -------------------- | -------------------------------------------------------------- |
|
||||
| `REGISTRY_HOSTPORT` | Registry host:port (e.g., `registry.nxtgauge.com`) |
|
||||
| `REGISTRY_USERNAME` | Registry username for authentication |
|
||||
| `REGISTRY_PASSWORD` | Registry password/token for authentication |
|
||||
| `DOCKERHUB_USERNAME` | Docker Hub username (optional, for Docker Hub pushes) |
|
||||
| `DOCKERHUB_TOKEN` | Docker Hub access token (optional, for Docker Hub pushes) |
|
||||
| `GHCR_USERNAME` | GitHub Container Registry username (optional, for GHCR pushes) |
|
||||
| `GHCR_TOKEN` | GitHub Container Registry token (optional, for GHCR pushes) |
|
||||
| `GITOPS_REPO_URL` | GitOps repository URL (optional) |
|
||||
|
||||
## Usage
|
||||
|
||||
All build/push steps use these secrets via `from_secret:` references. No credentials are hardcoded in pipeline files.
|
||||
Loading…
Add table
Reference in a new issue