I'm trying to streamline my pipeline a little bit to speed things up (using parallel steps).
The issue that I'm running into is that it downloads the base image for each step; is there a way to avoid that?
I'd like it to use the image I state, but then use a cached version of that for each step afterward. Is that possible??
I've tried a few things but haven't been able to manage it. My pipelines file looks like this:
######
# Docker Image
######
image: my_user/test_ci:latest
######
# Step Definitions
######
definitions:
- step: &build-dev
name: Build Project With Dev Branches
caches:
- pip
script:
- git clone --branch dev git@bitbucket.org:my_user/launcher.git
- git clone --branch dev git@bitbucket.org:my_user/reports.git
artifacts:
- reports/**
- launcher/**
- step: &install-requirements
name: Install Requirements
caches:
- pip
script:
- virtualenv venv
- source venv/bin/activate
- pip install -r requirements-dev.txt
artifacts:
- reports/**
- launcher/**
- venv/**
######
# Pipelines
######
pipelines:
pull-requests:
dev:
- step: *build-dev
- step: *install-requirements
- parallel:
- step:
name: Test Launcher
caches:
- pip
script:
- source venv/bin/activate
- pytest launcher
- step:
name: Test Reports
caches:
- pip
script:
- source venv/bin/activate
- pytest reports
In the past we just put everything together in one big step that ran the tests in the same step.
I'm trying to break them up to run each independently at the same time (parallel); but downloading our image for every single step is very time consuming.
I wasn't able to implement either of those in a way that did what I was looking for unfortunately.
We've since reverted our pipeline to just do everything in one step.
I'll keep looking and hopefully eventually we'll find something.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.