I have this pipeline file to unittest my project:
image: jameslin/python-test pipelines: default: - step: script: - service mysql start - pip install -r requirements/test.txt - export DJANGO_CONFIGURATION=Test - python manage.py test
but is it possible to switch to another docker image to deploy?
image: jameslin/python-deploy pipelines: default: - step: script: - ansible-playbook deploy
I cannot seem to find any documentation saying either Yes or No.
Each step has 4 GB of memory available. A single pipeline can have up to 100 steps. Each step in your pipeline runs a separate Docker container. If you want, you can use different types of containers for each step by selecting different images.
By default, docker pull pulls a single image from the registry. A repository can contain multiple images.
If there is a real need of putting docker image to github/bitbucket you can try to save it into archive (by using https://docs.docker.com/engine/reference/commandline/save/) and commit/push it to your repository.
In later versions of Docker, it provides the use of multi-stage dockerfiles. Using multi-stage dockerfiles, you can use several base images as well as previous intermediate image layers to build a new image layer.
You can specify an image for each step. Like that:
pipelines: default: - step: name: Build and test image: node:8.6 script: - npm install - npm test - npm run build artifacts: - dist/** - step: name: Deploy image: python:3.5.1 trigger: manual script: - python deploy.py
Finally found it:
https://confluence.atlassian.com/bitbucket/configure-bitbucket-pipelines-yml-792298910.html#Configurebitbucket-pipelines.yml-ci_stepstep(required)
step (required) Defines a build execution unit. Steps are executed in the order in which they appear in the pipeline. Currently, each pipeline can have only one step (one for the default pipeline and one for each branch). You can override the main Docker image by specifying an image in a step.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With