Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,463,706
Community Members
 
Community Events
176
Community Groups

bitbucket pipelines images definitions

Edited

Hello,

 

could anybody give me example of how make docker images definitions.

 

definitions for steps, need same for docker images

 

definitions: 
  steps:
    - step: &build-test
        name: Build and test
        script:
          - mvn package
        artifacts:
          - target/**

pipelines:
  branches:
    develop:
      - step: *build-test
    master:
      - step: *build-test

 

Thanks

1 answer

0 votes

Hello @Viktor Ivershin,

I'm not sure this is what you meant: one of the simplest ways of building a Docker image basically consists of two steps:

  • Prepare a Dockerfile. This file explains what should your image contain and where should it get that content from. It also describes how the image will work by default (some parts of the config can be overridden at runtime).
  • Build an image using that file. This command reads the file prepared earlier and builds an image following instructions there. You can use the resulting image to run containers. You can also upload it to the registry so that it could be used on another machines.

I hope I understood your question correctly. Please elaborate the details otherwise.

Cheers,
Daniil

definitions for steps, need same for docker images

 

definitions: 
  steps:
    - step: &build-test
        name: Build and test
        script:
          - mvn package
        artifacts:
          - target/**

pipelines:
  branches:
    develop:
      - step: *build-test
    master:
      - step: *build-test

Then these pages are probably what you're after:

They both contain examples on how to use Docker in the configuration.

Cheers,
Daniil

I need example how to use definitions for docker images in pipelines, not docker builds or something

Like Pedro Ramos likes this

definitions:

  image: &name-of-definition

    {{image configuration}}

...

 

branch:

  master:

    - step

        image:

          <<: *name-of-definition

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events