Use credentials from docker login
continuous-integration/drone/push Build was killed

This commit is contained in:
2023-08-15 00:27:21 +02:00
parent 216496f168
commit f12ba2542a
2 changed files with 6 additions and 9 deletions
+6 -3
View File
@@ -49,13 +49,16 @@ clone:
steps:
- name: build Docker container
image: gradle:8.2-jdk17
environment:
USERNAME:
from_secret: docker_username
PASSWORD:
from_secret: docker_password
volumes:
- name: cache
path: /home/gradle/.gradle
commands:
- wget https://github.com/docker/docker-credential-helpers/releases/download/v0.8.0/docker-credential-pass-v0.8.0.linux-arm64
- mv docker-credential-pass-v0.8.0.linux-arm64 docker-credential-pass
- chmod +x ./docker-credential-pass
- docker login -u $USERNAME -p $PASSWORD
- ./gradlew jib
volumes:
-6
View File
@@ -6,9 +6,6 @@ dependencies {
implementation(project(":server"))
}
val dockerUsername = System.getenv("DOCKER_USERNAME") ?: "UNKNOWN"
val dockerPassword = System.getenv("DOCKER_PASSWORD") ?: "UNKNOWN"
jib {
from {
image = "amazoncorretto:" + properties["projectSourceCompatibility"]
@@ -28,9 +25,6 @@ jib {
tags = setOf(
"latest",
properties["version"].toString().replace("+", "-"))
credHelper {
helper = "pass"
}
}
container {
extraClasspath = listOf("/configmap")