revert b5dde662bf
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Some checks reported errors
continuous-integration/drone/push Build encountered an error
ci: debug
This commit is contained in:
parent
b5dde662bf
commit
c84d285a66
2 changed files with 44 additions and 59 deletions
|
|
@ -1,59 +0,0 @@
|
||||||
{
|
|
||||||
kind: 'pipeline',
|
|
||||||
type: 'docker',
|
|
||||||
name: 'build',
|
|
||||||
trigger: {
|
|
||||||
ref: [
|
|
||||||
'refs/heads/**',
|
|
||||||
'refs/tags/v*',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
environment: {
|
|
||||||
REGISTRY_HOST: 'https://git.roboces.dev',
|
|
||||||
DESTINATION_PREFIX: 'git.roboces.dev/catalin/halig', //
|
|
||||||
},
|
|
||||||
steps: [
|
|
||||||
{
|
|
||||||
name: 'build_base',
|
|
||||||
image: 'gcr.io/kaniko-project/executor:debug',
|
|
||||||
environment: {
|
|
||||||
REGISTRY_USERNAME: {
|
|
||||||
from_secret: 'REGISTRY_USERNAME',
|
|
||||||
},
|
|
||||||
REGISTRY_PASSWORD: {
|
|
||||||
from_secret: 'REGISTRY_PASSWORD',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
commands: [
|
|
||||||
'set -euo pipefail',
|
|
||||||
'mkdir -p /kaniko/.docker',
|
|
||||||
'echo "{\\"auths\\":{\\"$REGISTRY_HOST\\":{\\"username\\":\\"$REGISTRY_USERNAME\\",\\"password\\":\\"$REGISTRY_PASSWORD\\"}}}" > /kaniko/.docker/config.json',
|
|
||||||
|||
|
|
||||||
/kaniko/executor \
|
|
||||||
--cache=true \
|
|
||||||
--target base \
|
|
||||||
--context /drone/src \
|
|
||||||
--dockerfile Dockerfile \
|
|
||||||
--destination "$DESTINATION_PREFIX:base-$DRONE_COMMIT_SHA"
|
|
||||||
|
|
||||||
|||,
|
|
||||||
|||
|
|
||||||
/kaniko/executor \
|
|
||||||
--cache=true \
|
|
||||||
--target linters \
|
|
||||||
--context /drone/src \
|
|
||||||
--dockerfile Dockerfile \
|
|
||||||
--destination "$DESTINATION_PREFIX:linters-$DRONE_COMMIT_SHA"
|
|
||||||
|
|
||||||
|||, //
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'lint',
|
|
||||||
image: '$DESTINATION_PREFIX:linters-$DRONE_COMMIT_SHA',
|
|
||||||
commands: [
|
|
||||||
'pre-commit run --all-files --color always',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
}
|
|
||||||
44
.drone.yml
Normal file
44
.drone.yml
Normal file
|
|
@ -0,0 +1,44 @@
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: build
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
ref:
|
||||||
|
- refs/heads/**
|
||||||
|
- refs/tags/v*
|
||||||
|
environment:
|
||||||
|
REGISTRY_HOST: https://git.roboces.dev
|
||||||
|
DESTINATION_PREFIX: git.roboces.dev/catalin/halig
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: build_base
|
||||||
|
image: gcr.io/kaniko-project/executor:debug
|
||||||
|
environment:
|
||||||
|
REGISTRY_USERNAME:
|
||||||
|
from_secret: REGISTRY_USERNAME
|
||||||
|
REGISTRY_PASSWORD:
|
||||||
|
from_secret: REGISTRY_PASSWORD
|
||||||
|
commands:
|
||||||
|
- set -euo pipefail
|
||||||
|
- mkdir -p /kaniko/.docker
|
||||||
|
- echo "{\"auths\":{\"$REGISTRY_HOST\":{\"username\":\"$REGISTRY_USERNAME\",\"password\":\"$REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
|
||||||
|
- >
|
||||||
|
/kaniko/executor \
|
||||||
|
--cache=true \
|
||||||
|
--target base \
|
||||||
|
--context /drone/src \
|
||||||
|
--dockerfile Dockerfile \
|
||||||
|
--destination "$DESTINATION_PREFIX:base-$DRONE_COMMIT_SHA"
|
||||||
|
- >
|
||||||
|
/kaniko/executor \
|
||||||
|
--cache=true \
|
||||||
|
--target linters \
|
||||||
|
--context /drone/src \
|
||||||
|
--dockerfile Dockerfile \
|
||||||
|
--destination "$DESTINATION_PREFIX:linters-$DRONE_COMMIT_SHA"
|
||||||
|
|
||||||
|
- name: lint
|
||||||
|
image: $DESTINATION_PREFIX:linters-$DRONE_COMMIT_SHA
|
||||||
|
commands:
|
||||||
|
- pre-commit run --all-files --color always
|
||||||
Loading…
Add table
Add a link
Reference in a new issue