Skip to content

Commit

Permalink
add syntax test for BitBucket Pipe
Browse files Browse the repository at this point in the history
  • Loading branch information
keith-hall committed Jul 11, 2023
1 parent edd3e3d commit ce225f8
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions tests/syntax_test_bitbucket_pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# SYNTAX TEST "Packages/YamlPipelines/BitBucket.sublime-syntax"
image:
name: atlassian/default-image:2

pipelines:
default:
- step:
name: Build and Push
script:
# ^^^^^^ string.unquoted.plain.out keyword.control.flow.script
# ^ punctuation.separator.key-value
# Build and push image
# ^^^^^^^^^^^^^^^^^^^^^^^ comment.line.number-sign
- VERSION="1.$BITBUCKET_BUILD_NUMBER"
# ^ punctuation.definition.block.sequence.item
# ^^^^^^^ source.shell meta.variable variable.other.readwrite
- echo ${DOCKERHUB_PASSWORD} | docker login --username "$DOCKERHUB_USERNAME" --password-stdin
# ^^ variable.parameter.option punctuation.definition.parameter
- IMAGE="$DOCKERHUB_USERNAME/$BITBUCKET_REPO_SLUG"
- docker build -t ${IMAGE}:${VERSION} .
- docker tag ${IMAGE}:${VERSION} ${IMAGE}:latest
- docker push ${IMAGE}
# Push tags
- git tag -a "${VERSION}" -m "Tagging for release ${VERSION}"
- git push origin ${VERSION}
services:
# ^^^^^^^^ meta.mapping.key meta.string string.unquoted.plain.out - source.shell
- docker
# ^ punctuation.definition.block.sequence.item
# ^^^^^^ meta.string string.unquoted.plain.out - source.shell

0 comments on commit ce225f8

Please sign in to comment.