To fix the Woodpecker build that's failing to push to Nexus:
# Use the working configuration
cp .woodpecker-working.yml .woodpecker.yml
# Commit and push
git add .woodpecker.yml
git commit -m "fix: use explicit Docker commands for Nexus push"
git pushThe original configuration tried to use the woodpeckerci/plugin-docker-buildx plugin's built-in authentication, which doesn't work properly with our Nexus setup. The plugin fails to authenticate even with correct credentials.
The new configuration (.woodpecker-working.yml) uses the same pattern as the working openspp-packaging-v2 project:
- Explicit Docker login instead of plugin authentication
- Direct buildx commands instead of plugin settings
- Internal IP address (172.20.0.26:8082) for the Docker registry
- Fallback secret names (supports both nexus_username and nexus_user)
build:
image: woodpeckerci/plugin-docker-buildx
settings:
username:
from_secret: nexus_username
password:
from_secret: nexus_password
registry: docker-push.acn.fr
# ... plugin handles login internallybuild:
image: docker:latest
commands:
# Explicit login
- echo "$NEXUS_PASS" | docker login 172.20.0.26:8082 -u "$NEXUS_USER" --password-stdin
# Direct buildx commands
- docker buildx build --push -t 172.20.0.26:8082/openspp/openspp:latest .Ensure these secrets are configured in Woodpecker:
nexus_usernameornexus_usernexus_password
Test the Docker push manually:
# Set credentials
export NEXUS_USER="your-username"
export NEXUS_PASSWORD="your-password"
# Build image
docker build -t openspp:latest .
# Test push
./ci-docker-push.sh openspp:latest.woodpecker-working.yml- Working CI configurationci-docker-push.sh- Manual push script for testingNEXUS_DOCKER_SETUP.md- Complete documentation
- Replace
.woodpecker.ymlwith.woodpecker-working.yml - Ensure secrets are configured in Woodpecker
- Push changes to trigger a build
- Monitor the build logs for success