mirror of
https://github.com/mickael-kerjean/filestash
synced 2025-12-06 16:32:31 +01:00
build (ci): automatically generate the docker build in the CI environment
This commit is contained in:
parent
bf269bf0af
commit
45f5754dca
2 changed files with 15 additions and 2 deletions
13
.drone.yml
Normal file
13
.drone.yml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
pipeline:
|
||||
docker:
|
||||
image: docker
|
||||
secrets: [ docker_username, docker_password ]
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
when:
|
||||
branch: master
|
||||
commands:
|
||||
- echo $DOCKER_PASSWORD | docker login -u=$DOCKER_USERNAME --password-stdin
|
||||
- docker pull alpine:latest
|
||||
- docker build --no-cache -t machines/nuage:master docker/prod
|
||||
- docker push machines/nuage:master
|
||||
|
|
@ -60,7 +60,7 @@ type Config struct {
|
|||
Port *string `json:"port,omitempty"`
|
||||
Path *string `json:"path,omitempty"`
|
||||
Passphrase *string `json:"passphrase,omitempty"`
|
||||
Conn *string `json:"conn"`
|
||||
Conn *string `json:"conn,omitempty"`
|
||||
SecretAccessKey *string `json:"secret_access_key,omitempty"`
|
||||
AccessKeyId *string `json:"access_key_id,omitempty"`
|
||||
Endpoint *string `json:"endpoint,omitempty"`
|
||||
|
|
@ -84,7 +84,7 @@ func (c *Config) Initialise() {
|
|||
c.Runtime.ConfigPath = filepath.Join(c.Runtime.Dirname, CONFIG_PATH)
|
||||
os.MkdirAll(c.Runtime.ConfigPath, os.ModePerm)
|
||||
if err := c.loadConfig(filepath.Join(c.Runtime.ConfigPath, "config.json")); err != nil {
|
||||
log.Println("> Can't load configuration file")
|
||||
log.Println("> Can't load configuration file ", err)
|
||||
}
|
||||
if err := c.loadMimeType(filepath.Join(c.Runtime.ConfigPath, "mime.json")); err != nil {
|
||||
log.Println("> Can't load mimetype config")
|
||||
|
|
|
|||
Loading…
Reference in a new issue