Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

4 Commits

Repository files navigation

docker-node-10-rsync-python-ssh

Node 10 container with rsync, python and ssh support

Links

Example how to use this image in GitLab CI/CD

  1. Create file .gitlab-ci.yml, e.g.:
image: kirbownz/node10-rsync-python-ssh###### STAGES #################################################################stages:
- install
- test
- build
- deploy###### TEMPLATES ##############################################################.general: &generalvariables:
GIT_STRATEGY: fetchvariables:
# Docker in Docker variablesDOCKER_HOST: "tcp://docker:2375"###### JOBS ###################################################################install:
<<: *generalstage: installartifacts:
paths:
- node_modulesexpire_in: 1 dayscript:
- rm yarn.lock
- yarntest:
<<: *generalstage: testdependencies:
- installscript:
- yarn testbuild:
<<: *generalstage: builddependencies:
- installartifacts:
paths:
- buildexpire_in: 1 weekscript:
- yarn builddeployment:
<<: *generalstage: deploydependencies:
- buildscript:
- mkdir -p ~/.ssh
- echo "${ssh_key}" > ~/.ssh/id_rsa
- chmod 700 ~/.ssh
- chmod 600 ~/.ssh/id_rsa
- echo "${gitconfig}" > ~/.gitconfig
- ssh-keyscan -t rsa ${demo_host} >> ~/.ssh/known_hosts
- rsync build/ ${demo_user}@${demo_host}:${demo_path} --delete-after -r -v
  1. Add the variables above in GitLab -> Project -> Settings -> CI / CD -> Variables:
TypeKeyValueProtectedMaskedScope
Variabledemo_hostexample.com--All environments
Variabledemo_path~/project/dist/--All environments
Variabledemo_useruser--All environments
Variablegitconfig[user]
name = Firstname Lastname
email = email@me.com
--All environments
Variablessh_key-----BEGIN RSA...--All environments

About

Node 10 container with rsync, python and ssh support

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages