Skip to content
Snippets Groups Projects
Commit 18e68ba2 authored by Thomas Van Vark's avatar Thomas Van Vark
Browse files

Add build and deploy stages

parent b10c2128
No related branches found
No related tags found
1 merge request!3Feature/deploy
Pipeline #6329403 passed
stages: stages:
- lint - lint
- build
- deploy
flake8: flake8:
image: "python:latest" image: "python:latest"
stage: lint stage: lint
script: script:
- pip install flake8 - pip install flake8
- flake8 - flake8
\ No newline at end of file
build-docker-image:
stage: build
image:
name: gitlab-registry.cern.ch/ci-tools/docker-image-builder
entrypoint: [""]
script:
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor
--context "${CI_PROJECT_DIR}"
--dockerfile "${CI_PROJECT_DIR}/Dockerfile"
--destination "${CI_REGISTRY_IMAGE}:${CI_COMMIT_TAG}"
deploy:
stage: deploy
variables:
APP_NAME: data-management-updater
OPENSHIFT_SERVER: https://api.paas.okd.cern.ch
NAMESPACE: caimira-data-service
image: gitlab-registry.cern.ch/paas-tools/openshift-client:latest
script:
- oc tag --source=docker ${CI_REGISTRY_IMAGE}:latest ${APP_NAME}:latest --token ${DEPLOY_TOKEN} --server=${OPENSHIFT_SERVER} -n ${NAMESPACE}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment