test5
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone Build is failing

This commit is contained in:
2025-11-04 20:46:53 +01:00
parent 47f8161406
commit b521728619

View File

@@ -1,18 +1,30 @@
kind: pipeline kind: pipeline
type: docker type: docker
name: secret-test name: docker-build-and-push
steps: steps:
- name: show-env - name: build-and-push
image: alpine:3.19 image: docker:26
privileged: true
environment: environment:
TEST_VAR: "HelloWorld" DOCKER_HOST:
SECRET_VAR: from_secret: DOCKER_HOST
from_secret: test_secret DOCKER_USER:
from_secret: DOCKER_USER
DOCKER_PASS:
from_secret: DOCKER_PASS
volumes:
- name: docker_sock
path: /var/run/docker.sock
commands: commands:
- echo "==== ENVIRONMENT TEST ====" - echo "Logging in to Docker registry..."
- echo "All envs (filtered):" - docker login $DOCKER_HOST -u "$DOCKER_USER" -p "$DOCKER_PASS"
- env | grep -E "TEST_|SECRET_|DRONE_" - echo "Building image..."
- echo "Check via file:" - docker build -t $DOCKER_HOST/public/drone-test:latest .
- echo "$SECRET_VAR" > /tmp/secret_check.txt - echo "Pushing image..."
- cat /tmp/secret_check.txt - docker push $DOCKER_HOST/public/drone-test:latest
volumes:
- name: docker_sock
host:
path: /var/run/docker.sock