Suppose I have the following bitbucket-pipelines.yml
pipelines:
default:
- step:
script:
- chmod +x gradlew
- ./gradlew build
- ./gradlew publishSnapshot
tags:
release-*:
- step:
script:
- chmod +x gradlew
- ./gradlew build
- ./gradlew publishRelease
So bitbucket pipelines' documentation says that the default step is run every time no other rule is matched (such as branch or tag).
So for example, if I have a tag release-* rule:
The problem is that the bold lines are shared code and therefore redundant.
Is it possible to have a kind of setup step that will run before all?
This is an example of what I mean:
pipelines: setup: - step: script: - chmod +x gradlew - ./gradlew build default: - step: script: - ./gradlew publishSnapshot tags: release-*: - step: script: - ./gradlew publishRelease
There is already an issue for this here: https://bitbucket.org/site/master/issues/12751/allow-more-capable-steps-that-can-be
Closing this post
Please upvote the most recent post with the solution to help others find the answer as this post comes up as the 2nd listing on google search results.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Why is this no longer open ? As long as I know this requirement is not available in any form neither any workaround
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What Danielo said. As far as I can see, what Jad asks for is not resolved yet?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Created an issue for it here: https://bitbucket.org/site/master/issues/15652/shared-steps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.