Skip to content
Snippets Groups Projects
Verified Commit 3542792e authored by Rafael László's avatar Rafael László :speech_balloon:
Browse files

Always deploy to prod on master change

parent 8d95380b
Branches
No related tags found
No related merge requests found
stages: stages:
- build - build
- container
- deploy - deploy
variables: variables:
...@@ -24,7 +23,6 @@ build: ...@@ -24,7 +23,6 @@ build:
- public - public
only: only:
- master - master
- tags
prod-ftp: prod-ftp:
stage: deploy stage: deploy
...@@ -37,40 +35,5 @@ prod-ftp: ...@@ -37,40 +35,5 @@ prod-ftp:
- "eval $(ssh-agent -s)" - "eval $(ssh-agent -s)"
- 'echo -e "Host *\n\tStrictHostKeyChecking no\nport 10022\n\n" > ~/.ssh/config' - 'echo -e "Host *\n\tStrictHostKeyChecking no\nport 10022\n\n" > ~/.ssh/config'
- lftp -e "set dns:order 'inet inet6'; set net:timeout 5; set net:max-retries 2; set net:reconnect-interval-base 5; mirror --parallel=10 --delete --verbose -R public/ site/kszk/ ; quit" -u $FTP_USER,$FTP_PASS $FTP_HOST -p 10022 - lftp -e "set dns:order 'inet inet6'; set net:timeout 5; set net:max-retries 2; set net:reconnect-interval-base 5; mirror --parallel=10 --delete --verbose -R public/ site/kszk/ ; quit" -u $FTP_USER,$FTP_PASS $FTP_HOST -p 10022
only:
- tags
container:
stage: container
dependencies:
- build
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
before_script:
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"auth\":\"$(echo -n ${CI_REGISTRY_USER}:${CI_REGISTRY_PASSWORD} | base64)\"}}}" > /kaniko/.docker/config.json
script:
- |
/kaniko/executor --context ${CI_PROJECT_DIR} \
--dockerfile ${CI_PROJECT_DIR}/Dockerfile \
--destination ${CI_REGISTRY_IMAGE}:latest
only:
- master
except:
- tags
staging-k8s:
stage: deploy
image:
name: harbor.sch.bme.hu/kszk/kube-tools:latest
entrypoint: [""]
before_script:
- chmod 600 ${!KUBECONFIG_VAR_NAME}
- export KUBECONFIG=${!KUBECONFIG_VAR_NAME}
script:
- kubectl rollout restart deployment kszk-website
only: only:
- master - master
except:
- tags
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment