diff --git a/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/after-script.yml.snap b/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/after-script.yml.snap deleted file mode 100644 index cb606256..00000000 --- a/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/after-script.yml.snap +++ /dev/null @@ -1,7 +0,0 @@ ---- -steps: -- commands: - - npm install - - npm test - - "# The after-script property should be configured as a pre-exit repository hook" - label: Build and test diff --git a/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/artifacts.yml.snap b/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/artifacts.yml.snap deleted file mode 100644 index c8ca7b76..00000000 --- a/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/artifacts.yml.snap +++ /dev/null @@ -1,38 +0,0 @@ ---- -steps: -- group: default - steps: - - artifact_paths: - - dist/** - - reports/*.txt - commands: - - npm install - - npm test - - npm run build - - "# IMPORTANT: artifacts are not automatically downloaded in future steps" - plugins: - - docker#v5.10.0: - image: node:10.15.0 - label: Build and test - - wait - - commands: - - cat reports/tests.txt - - npm run integration-test - plugins: - - docker#v5.10.0: - image: node:10.15.0 - label: Integration test - - wait - - commands: - - python deploy-to-beanstalk.py - plugins: - - docker#v5.10.0: - image: python:3.5.1 - label: Deploy to beanstalk - - wait - - artifact_paths: - - success.txt - commands: - - echo "Deployment successful!" > success.txt - - "# IMPORTANT: artifacts are not automatically downloaded in future steps" - label: Display success message diff --git a/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/branches.yml.snap b/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/branches.yml.snap deleted file mode 100644 index abb9252d..00000000 --- a/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/branches.yml.snap +++ /dev/null @@ -1,24 +0,0 @@ ---- -steps: -- commands: - - echo "This script runs on all branches that don't have any specific pipeline assigned - in 'branches'." - plugins: - - docker#v5.10.0: - image: node:lts - label: Script step -- commands: - - echo "This script runs only on commit to the main branch." - plugins: - - docker#v5.10.0: - image: node:lts - label: Script step - if: build.branch =~ /main/ -- commands: - - echo "This script runs only on commit to branches with names that match the feature/* - pattern." - plugins: - - docker#v5.10.0: - image: openjdk:8 - label: Script step - if: build.branch =~ /feature\/*/ diff --git a/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/caches.yml.snap b/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/caches.yml.snap deleted file mode 100644 index 9aa61d97..00000000 --- a/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/caches.yml.snap +++ /dev/null @@ -1,100 +0,0 @@ ---- -steps: -- group: default - steps: - - commands: - - docker version - - "# caching works differently (invalidations have to be explicit)" - - "# docker layer caching is best implemented by docker" - - "# Use BUILDKIT_INLINE_CACHE when building/pushing images and then --cache-from - IMAGE" - label: cache docker - - wait - - commands: - - composer install - - "# caching works differently (invalidations have to be explicit)" - plugins: - - cache: - path: "~/.composer/cache" - restore: file - save: file - manifest: composer.json - label: cache composer - - wait - - commands: - - dotnet restore - - "# caching works differently (invalidations have to be explicit)" - plugins: - - cache: - path: "~/.nuget/packages" - restore: file - save: file - manifest: packages.config - label: cache dotnetcore - - wait - - commands: - - gradle build - - "# caching works differently (invalidations have to be explicit)" - plugins: - - cache: - path: "~/.gradle/caches" - restore: file - save: file - manifest: settings.gradle - label: cache gradle - - wait - - commands: - - ant build - - "# caching works differently (invalidations have to be explicit)" - plugins: - - cache: &1 - path: "~/.ivy2/cache" - restore: file - save: file - manifest: ivy.xml - label: cache ivy2 - - wait - - commands: - - mvn -B verify --file pom.xml - - "# caching works differently (invalidations have to be explicit)" - plugins: - - cache: - path: "~/.m2/repository" - restore: file - save: file - manifest: pom.xml - label: cache maven - - wait - - commands: - - npm ci - - "# caching works differently (invalidations have to be explicit)" - plugins: - - cache: - path: node_modules - restore: file - save: file - manifest: packages.json - label: cache node - - wait - - commands: - - pip install -r requirements.txt - - "# caching works differently (invalidations have to be explicit)" - plugins: - - cache: - path: "~/.cache/pip" - restore: file - save: file - manifest: requirements.txt - label: cache pip - - wait - - commands: - - sbt clean compile - - "# caching works differently (invalidations have to be explicit)" - plugins: - - cache: - path: "~/.sbt" - restore: file - save: file - manifest: build.sbt - - cache: *1 - label: cache sbt diff --git a/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/clone.yml.snap b/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/clone.yml.snap deleted file mode 100644 index 42a589ad..00000000 --- a/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/clone.yml.snap +++ /dev/null @@ -1,83 +0,0 @@ ---- -steps: -- group: default - steps: - - commands: - - echo 'no cloning' - - "# repository interactions (clone options) should be configured in the agent - itself" - env: - BUILKITE_REPO: '' - label: no clone - - wait - - commands: - - echo 'depth' - - "# repository interactions (clone options) should be configured in the agent - itself" - label: shallow depth - - wait - - commands: - - echo 'full depth' - - "# repository interactions (clone options) should be configured in the agent - itself" - label: full depth - - wait - - commands: - - echo 'filter' - - "# repository interactions (clone options) should be configured in the agent - itself" - label: filter - - wait - - commands: - - echo 'no cloning' - - "# repository interactions (clone options) should be configured in the agent - itself" - label: lfs - - wait - - commands: - - echo 'ssl' - - "# repository interactions (clone options) should be configured in the agent - itself" - label: ssl - - wait - - commands: - - echo 'strategy' - - "# repository interactions (clone options) should be configured in the agent - itself" - label: strategy - - wait - - commands: - - echo 'tags' - - "# repository interactions (clone options) should be configured in the agent - itself" - label: tags - - wait - - commands: - - echo 'sparse' - - "# repository interactions (clone options) should be configured in the agent - itself" - plugins: - - sparse-checkout: - paths: - - path1/* - - path2 - no-cone: false - label: sparse - - wait - - commands: - - echo 'sparse no-cone' - - "# repository interactions (clone options) should be configured in the agent - itself" - plugins: - - sparse-checkout: - paths: - - path3/* - - path4 - no-cone: true - label: sparse no-cone - - wait - - commands: - - echo 'sparse disabled' - - "# repository interactions (clone options) should be configured in the agent - itself" - label: sparse disabled diff --git a/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/condition.yml.snap b/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/condition.yml.snap deleted file mode 100644 index 940c209c..00000000 --- a/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/condition.yml.snap +++ /dev/null @@ -1,22 +0,0 @@ ---- -steps: -- group: default - steps: - - commands: - - if git diff --exit-code --name-only HEAD "${BUILDKITE_PULL_REQUEST_BASE_BRANCH:HEAD^}" - -- 'singlefile'; then - - " echo '+++ :warning: no changes found in 'singlefile', exiting step as OK" - - " exit 0" - - fi - - echo 'should never run' - label: single file condition - - wait - - commands: - - if git diff --exit-code --name-only HEAD "${BUILDKITE_PULL_REQUEST_BASE_BRANCH:HEAD^}" - -- 'file1' 'path1/*' '**/glob.ext'; then - - " echo '+++ :warning: no changes found in 'file1' 'path1/*' '**/glob.ext', - exiting step as OK" - - " exit 0" - - fi - - echo 'should never run' - label: multiple files condition diff --git a/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/custom.yml.snap b/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/custom.yml.snap deleted file mode 100644 index f0f28397..00000000 --- a/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/custom.yml.snap +++ /dev/null @@ -1,10 +0,0 @@ ---- -steps: -- key: execute-38b94beadd5dd409695a3453e7887d68b07bb632 - prompt: Execute step 38b94beadd5dd409695a3453e7887d68b07bb632? - input: execute-38b94beadd5dd409695a3453e7887d68b07bb632 -- commands: - - echo "Manual triggers for Sonar are awesome!" - depends_on: - - execute-38b94beadd5dd409695a3453e7887d68b07bb632 - label: Script step diff --git a/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/deployment.yml.snap b/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/deployment.yml.snap deleted file mode 100644 index be4cac87..00000000 --- a/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/deployment.yml.snap +++ /dev/null @@ -1,6 +0,0 @@ ---- -steps: -- commands: - - python deploy.py prod_env_1 - - "# `deployments` has no direct translation." - label: Deploy to production diff --git a/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/empty.yml.snap b/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/empty.yml.snap deleted file mode 100644 index 2a639aa4..00000000 --- a/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/empty.yml.snap +++ /dev/null @@ -1,2 +0,0 @@ ---- -steps: [] diff --git a/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/fail-fast.yml.snap b/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/fail-fast.yml.snap deleted file mode 100644 index ae15baa5..00000000 --- a/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/fail-fast.yml.snap +++ /dev/null @@ -1,10 +0,0 @@ ---- -steps: -- commands: - - npm install - - npm test - - "# `fail-fast` has no direct translation - consider using `soft_fail`/`cancel_on_build_failing`." - plugins: - - docker#v5.10.0: - image: node:21-alpine - label: Build and test diff --git a/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/global-caches.yml.snap b/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/global-caches.yml.snap deleted file mode 100644 index a82a81b1..00000000 --- a/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/global-caches.yml.snap +++ /dev/null @@ -1,70 +0,0 @@ ---- -steps: -- group: default - steps: - - commands: - - echo 'no file cache' - - "# caching works differently (invalidations have to be explicit)" - plugins: - - cache: &2 - path: cached/folder - restore: pipeline - save: pipeline - label: no file cache - - wait - - commands: - - echo 'single file cache' - - "# caching works differently (invalidations have to be explicit)" - plugins: - - cache: &1 - path: other/folder - restore: file - save: file - manifest: manifest.file - label: single file cache - - wait - - commands: - - echo 'multiple files cache' - - "# caching works differently (invalidations have to be explicit)" - plugins: - - cache: - path: third/folder - restore: file - save: file - manifest: other.manifest - - cache: - path: third/folder - restore: file - save: file - manifest: glob/* - label: multiple files cache - - wait - - commands: - - echo 'multiple caches' - - "# caching works differently (invalidations have to be explicit)" - plugins: - - cache: *1 - - cache: *2 - label: multiple caches - - wait - - commands: - - echo 'global and docker caches' - - "# caching works differently (invalidations have to be explicit)" - - "# docker layer caching is best implemented by docker" - - "# Use BUILDKIT_INLINE_CACHE when building/pushing images and then --cache-from - IMAGE" - plugins: - - cache: *2 - label: global and docker caches - - wait - - commands: - - echo 'global and node caches' - - "# caching works differently (invalidations have to be explicit)" - plugins: - - cache: - path: node_modules - restore: file - save: file - manifest: packages.json - - cache: *2 - label: global and builtin caches diff --git a/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/global-clone.yml.snap b/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/global-clone.yml.snap deleted file mode 100644 index 0a989df6..00000000 --- a/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/global-clone.yml.snap +++ /dev/null @@ -1,29 +0,0 @@ ---- -steps: -- group: default - steps: - - commands: - - echo 'simple' - - "# repository interactions (clone options) should be configured in the agent - itself" - plugins: - - sparse-checkout: - paths: - - path1/* - - path2 - no-cone: false - label: simple - - wait - - commands: - - echo 'no cloning' - - "# repository interactions (clone options) should be configured in the agent - itself" - env: - BUILKITE_REPO: '' - label: no clone - - wait - - commands: - - echo 'no sparse' - - "# repository interactions (clone options) should be configured in the agent - itself" - label: no sparse diff --git a/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/global-options.yml.snap b/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/global-options.yml.snap deleted file mode 100644 index 2bcff247..00000000 --- a/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/global-options.yml.snap +++ /dev/null @@ -1,27 +0,0 @@ ---- -steps: -- group: default - steps: - - commands: - - echo 'no configuration' - - "# The availability of docker in steps depend on the agent configuration" - agents: - size: 8x - label: no conf - timeout_in_minutes: 50 - - wait - - commands: - - echo 'override max-time' - - "# The availability of docker in steps depend on the agent configuration" - agents: - size: 8x - label: with time - timeout_in_minutes: 100 - - wait - - commands: - - echo 'override size' - - "# The availability of docker in steps depend on the agent configuration" - agents: - size: 1x - label: with size - timeout_in_minutes: 50 diff --git a/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/image-auth.yml.snap b/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/image-auth.yml.snap deleted file mode 100644 index 3a6a9957..00000000 --- a/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/image-auth.yml.snap +++ /dev/null @@ -1,38 +0,0 @@ ---- -steps: -- group: default - steps: - - commands: - - echo 'basic auth' - plugins: - - docker#v5.10.0: - image: bash:latest - - docker-login#v3.0.0: - username: test-user - password-env: ENV_VAR - label: basic auth - - wait - - commands: - - echo 'from ecr key' - - "# use AWS_ACCESS_KEY and AWS_SECRET_ACCESS_KEY variables for authentication" - plugins: - - docker#v5.10.0: - image: ACCT.dkr.ecr.REGION.domain - - ecr#v2.7.0: - login: true - account-ids: ACCT - region: REGION - label: ecr key auth - - wait - - commands: - - echo 'aws odic' - plugins: - - docker#v5.10.0: - image: ACCT.dkr.ecr.REGION.domain - - ecr#v2.7.0: - login: true - account-ids: ACCT - region: REGION - assume-role: - role-arn: ROLE_ARN - label: ecr oidc auth diff --git a/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/image.yml.snap b/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/image.yml.snap deleted file mode 100644 index 4239a4ca..00000000 --- a/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/image.yml.snap +++ /dev/null @@ -1,26 +0,0 @@ ---- -steps: -- group: default - steps: - - commands: - - golangci-lint run -v - plugins: - - docker#v5.10.0: - image: golangci/golangci-lint:v1.31.0 - label: Lint - - wait - - commands: - - go build src/* - plugins: - - docker#v5.10.0: - image: golang:1.21 - label: Build - - wait - - commands: - - mkdir test-reports - - go get -u github.com/jstemmer/go-junit-report - - go test tests/* -v 2>&1 | go-junit-report > test-reports/report.xml - plugins: - - docker#v5.10.0: - image: golang:1.22 - label: Test diff --git a/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/manual.yml.snap b/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/manual.yml.snap deleted file mode 100644 index 0a382342..00000000 --- a/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/manual.yml.snap +++ /dev/null @@ -1,16 +0,0 @@ ---- -steps: -- group: default - steps: - - commands: - - echo 'running' - label: simple - - wait - - key: execute-cad93b8b7bf63eb33ffe9002d9b6932eb155ec3c - prompt: Execute step cad93b8b7bf63eb33ffe9002d9b6932eb155ec3c? - input: execute-cad93b8b7bf63eb33ffe9002d9b6932eb155ec3c - - commands: - - echo 'running' - depends_on: - - execute-cad93b8b7bf63eb33ffe9002d9b6932eb155ec3c - label: complex diff --git a/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/oidc.yml.snap b/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/oidc.yml.snap deleted file mode 100644 index 1060258e..00000000 --- a/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/oidc.yml.snap +++ /dev/null @@ -1,13 +0,0 @@ ---- -steps: -- commands: - - BITBUCKET_STEP_OIDC_TOKEN="$(buildkite-agent oidc request-token)" - - export BITBUCKET_STEP_OIDC_TOKEN - - echo "I can access data through OpenID Connect!" - - |- - aws sts assume-role-with-web-identity \ - --role-arn arn:aws:iam::XXXXXX:role/projectx-build \ - --role-session-name build-session \ - --web-identity-token "$BITBUCKET_STEP_OIDC_TOKEN" \ - --duration-seconds 1000 - label: Script step diff --git a/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/parallel.yml.snap b/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/parallel.yml.snap deleted file mode 100644 index 87b96e8e..00000000 --- a/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/parallel.yml.snap +++ /dev/null @@ -1,18 +0,0 @@ ---- -steps: -- group: default - steps: - - group: parallel-7745d6f42f7f67b5b911003efa6bdd7a809f392c - steps: - - commands: - - "./build.sh" - label: Build - - group: parallel-d0d6955d5365cdcbbd5215f583dbea2be5cbff7e - steps: - - commands: - - "./integration-tests.sh --batch 1" - label: Integration 1 - - commands: - - "./upload-metadata.sh" - - "# `fail-fast` has no direct translation - consider using `soft_fail`/`cancel_on_build_failing`." - label: Upload metadata diff --git a/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/pipes.yml.snap b/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/pipes.yml.snap deleted file mode 100644 index c82cffc4..00000000 --- a/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/pipes.yml.snap +++ /dev/null @@ -1,13 +0,0 @@ ---- -steps: -- group: default - steps: - - commands: - - echo 'testing pipe' - - "# Pipe test-pipe:v1.1 is not currently supported, maybe a plugin?" - label: simple pipe - - wait - - commands: - - echo 'testing vars pipe' - - "# Pipe test-pipe:v1.1 is not currently supported, maybe a plugin?" - label: pipe with vars diff --git a/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/pull-requests.yml.snap b/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/pull-requests.yml.snap deleted file mode 100644 index a25905d4..00000000 --- a/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/pull-requests.yml.snap +++ /dev/null @@ -1,14 +0,0 @@ ---- -steps: -- commands: - - echo "Hello, feature branch PR!" - label: Build for feature branch pull request - if: pull_request.id != null && build.branch =~ /feature\/*/ -- commands: - - echo "Hello, hotfix PR!" - label: Build for hotfix branch pull request - if: pull_request.id != null && build.branch =~ /hotfix\/*/ -- commands: - - echo "Hello, non-feature, non-hotfix pull request!" - label: Build for all other pull requests - if: pull_request.id != null && build.branch =~ /**/ diff --git a/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/runs-on.yml.snap b/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/runs-on.yml.snap deleted file mode 100644 index 145faa7c..00000000 --- a/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/runs-on.yml.snap +++ /dev/null @@ -1,37 +0,0 @@ ---- -steps: -- group: default - steps: - - commands: - - echo 'step 1' - agents: - linux: "*" - label: Simple label - - wait - - commands: - - echo 'step 2' - agents: - size: 2x - label: Simple size - - wait - - commands: - - echo 'step 3' - agents: - linux: "*" - aws: "*" - label: Complex label - - wait - - commands: - - echo 'step 4' - agents: - size: 4x - linux: "*" - label: Combination - - wait - - commands: - - echo 'step 1' - agents: - size: 8x - linux: "*" - aws: "*" - label: Complex combination diff --git a/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/services.yml.snap b/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/services.yml.snap deleted file mode 100644 index 74c3a7b1..00000000 --- a/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/services.yml.snap +++ /dev/null @@ -1,110 +0,0 @@ ---- -steps: -- group: default - steps: - - commands: - - echo 'nothing to see here' - label: no services - - wait - - commands: - - "# to user services, add the following composefile to your repository" - - "# and add the image used in the step as `app`" - - |- - cat > compose.yaml << EOF - --- - services: - app: - depends_on: - - simple - - mysql - - redis - simple: - image: bash:latest - mysql: - image: mysql:5.7 - environment: - - MYSQL_DATABASE=my-db - - MYSQL_ROOT_PASSWORD=$password - redis: - image: redis:3.2 - resources: - limits: - memory: 128M - - EOF - - echo 'should be able to connect to MySQL' - plugins: - - docker-compose#v5.0.0: &1 - run: app - agents: - executor_type: docker_compose - label: just the db - - wait - - commands: - - "# to user services, add the following composefile to your repository" - - "# and add the image used in the step as `app`" - - |- - cat > compose.yaml << EOF - --- - services: - app: - depends_on: - - simple - - mysql - - redis - simple: - image: bash:latest - mysql: - image: mysql:5.7 - environment: - - MYSQL_DATABASE=my-db - - MYSQL_ROOT_PASSWORD=$password - redis: - image: redis:3.2 - resources: - limits: - memory: 128M - - EOF - - echo 'should be able to connect to MySQL' - - echo 'should be able to connect to redis' - plugins: - - docker-compose#v5.0.0: *1 - agents: - executor_type: docker_compose - label: just redis - - wait - - commands: - - "# to user services, add the following composefile to your repository" - - "# and add the image used in the step as `app`" - - |- - cat > compose.yaml << EOF - --- - services: - app: - depends_on: - - simple - - mysql - - redis - simple: - image: bash:latest - mysql: - image: mysql:5.7 - environment: - - MYSQL_DATABASE=my-db - - MYSQL_ROOT_PASSWORD=$password - redis: - image: redis:3.2 - resources: - limits: - memory: 128M - - EOF - - echo 'should be able to connect to MySQL' - - echo 'should be able to connect to redis' - - echo 'should be able to connect to MySQL' - plugins: - - docker-compose#v5.0.0: *1 - agents: - executor_type: docker_compose - label: all of them diff --git a/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/simple.yml.snap b/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/simple.yml.snap deleted file mode 100644 index c8900469..00000000 --- a/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/simple.yml.snap +++ /dev/null @@ -1,8 +0,0 @@ ---- -steps: -- commands: - - IMAGE_NAME=$BITBUCKET_REPO_SLUG - - docker build . --file Dockerfile --tag ${IMAGE_NAME} - - docker save ${IMAGE_NAME} --output "${IMAGE_NAME}.tar" - label: Build and Test - timeout_in_minutes: 100 diff --git a/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/stages.yaml.snap b/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/stages.yaml.snap deleted file mode 100644 index 4091a333..00000000 --- a/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/stages.yaml.snap +++ /dev/null @@ -1,45 +0,0 @@ ---- -steps: -- group: default - steps: - - group: simple stage - steps: - - commands: - - sh ./build-app.sh - label: Build app - - wait - - commands: - - sh ./run-tests.sh - label: Run unit tests - - group: conditional stage - steps: - - commands: - - if git diff --exit-code --name-only HEAD "${BUILDKITE_PULL_REQUEST_BASE_BRANCH:HEAD^}" - -- 'path1/*.xml' 'path2/**'; then - - " echo '+++ :warning: no changes found in 'path1/*.xml' 'path2/**', exiting - step as OK" - - " exit 0" - - fi - - commands: - - sh ./build-app.sh - label: Build app - - wait - - commands: - - sh ./run-tests.sh - label: Run unit tests - - group: manual stage - steps: - - key: execute-5f4b7c80dda894d4254d2c5547b1c7dc5dc16891 - prompt: Execute step 5f4b7c80dda894d4254d2c5547b1c7dc5dc16891? - input: execute-5f4b7c80dda894d4254d2c5547b1c7dc5dc16891 - - commands: - - sh ./build-app.sh - depends_on: - - execute-5f4b7c80dda894d4254d2c5547b1c7dc5dc16891 - label: Build app - - wait - - commands: - - sh ./run-tests.sh - depends_on: - - execute-5f4b7c80dda894d4254d2c5547b1c7dc5dc16891 - label: Run unit tests diff --git a/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/tags.yml.snap b/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/tags.yml.snap deleted file mode 100644 index 523ed621..00000000 --- a/app/spec/lib/bk/compat/bitbucket/__snapshots__/spec/lib/bk/compat/bitbucket/examples/tags.yml.snap +++ /dev/null @@ -1,14 +0,0 @@ ---- -steps: -- commands: - - echo "Hello, Windows!" - label: Build for *-windows tags - if: build.tag =~ /*-windows/ -- commands: - - echo "Hello, macOS!" - label: Build for *-macos tags - if: build.tag =~ /*-macos/ -- commands: - - echo "Hello, Linux!" - label: Build for *-linux tags - if: build.tag =~ /*-linux/ diff --git a/app/spec/lib/bk/compat/bitbucket/bitbucket_spec.rb b/app/spec/lib/bk/compat/bitbucket/bitbucket_spec.rb index a084bfa4..69930cdb 100644 --- a/app/spec/lib/bk/compat/bitbucket/bitbucket_spec.rb +++ b/app/spec/lib/bk/compat/bitbucket/bitbucket_spec.rb @@ -5,8 +5,72 @@ RSpec.describe BK::Compat::BitBucket do let(:bitbucket) { BK::Compat::BitBucket } - context 'it runs a snapshot test on each example' do - directory_path = 'spec/lib/bk/compat/bitbucket/examples' + context 'it runs a snapshot test on each branch starting condition pipeline example' do + directory_path = 'spec/lib/bk/compat/bitbucket/examples/branches' + + Dir.glob("#{directory_path}/*").each do |file| + next if File.directory?(file) + + it "compares the generated pipeline for #{file} to the original" do + bb_content = File.read(file) + parsed_content = bitbucket.new(bb_content).parse + + actual = parsed_content.render(colors: false) + expect(actual).to match_snapshot(file) + end + end + end + + context 'it runs a snapshot test on each custom starting condition pipeline example' do + directory_path = 'spec/lib/bk/compat/bitbucket/examples/custom' + + Dir.glob("#{directory_path}/*").each do |file| + next if File.directory?(file) + + it "compares the generated pipeline for #{file} to the original" do + bb_content = File.read(file) + parsed_content = bitbucket.new(bb_content).parse + + actual = parsed_content.render(colors: false) + expect(actual).to match_snapshot(file) + end + end + end + + context 'it runs a snapshot test on each default starting condition pipeline example' do + directory_path = 'spec/lib/bk/compat/bitbucket/examples/default' + + Dir.glob("#{directory_path}/*").each do |file| + next if File.directory?(file) + + it "compares the generated pipeline for #{file} to the original" do + bb_content = File.read(file) + parsed_content = bitbucket.new(bb_content).parse + + actual = parsed_content.render(colors: false) + expect(actual).to match_snapshot(file) + end + end + end + + context 'it runs a snapshot test on each pull-request starting condition pipeline example' do + directory_path = 'spec/lib/bk/compat/bitbucket/examples/pull-request' + + Dir.glob("#{directory_path}/*").each do |file| + next if File.directory?(file) + + it "compares the generated pipeline for #{file} to the original" do + bb_content = File.read(file) + parsed_content = bitbucket.new(bb_content).parse + + actual = parsed_content.render(colors: false) + expect(actual).to match_snapshot(file) + end + end + end + + context 'it runs a snapshot test on each tags starting condition pipeline example' do + directory_path = 'spec/lib/bk/compat/bitbucket/examples/tags' Dir.glob("#{directory_path}/*").each do |file| next if File.directory?(file) diff --git a/app/spec/lib/bk/compat/bitbucket/examples/after-script.yml b/app/spec/lib/bk/compat/bitbucket/examples/after-script.yml deleted file mode 100644 index b23baf9b..00000000 --- a/app/spec/lib/bk/compat/bitbucket/examples/after-script.yml +++ /dev/null @@ -1,9 +0,0 @@ -pipelines: - default: - - step: - name: Build and test - script: - - npm install - - npm test - after-script: - - echo "after script has run!" \ No newline at end of file diff --git a/app/spec/lib/bk/compat/bitbucket/examples/artifacts.yml b/app/spec/lib/bk/compat/bitbucket/examples/artifacts.yml deleted file mode 100644 index 65b5269b..00000000 --- a/app/spec/lib/bk/compat/bitbucket/examples/artifacts.yml +++ /dev/null @@ -1,44 +0,0 @@ -# from https://support.atlassian.com/bitbucket-cloud/docs/use-artifacts-in-steps/#Use-artifacts -pipelines: - default: - - step: - name: Build and test - image: node:10.15.0 - #caches: - # - node - script: - - npm install - - npm test - - npm run build - artifacts: # defining the artifacts to be passed to each future step. - - dist/** - - reports/*.txt - - step: - name: Integration test - image: node:10.15.0 - #caches: - # - node - #services: - # - postgres - script: - # using one of the artifacts from the previous step - - cat reports/tests.txt - - npm run integration-test - - step: - name: Deploy to beanstalk - image: python:3.5.1 - script: - - python deploy-to-beanstalk.py - - step: - name: Display success message - artifacts: - download: false # do not download artifacts in this step - paths: # defining artifacts to be passed to each future step - - success.txt - script: - - echo "Deployment successful!" > success.txt - -#definitions: -# services: -# postgres: -# image: postgres:9.6.4 \ No newline at end of file diff --git a/app/spec/lib/bk/compat/bitbucket/examples/branches.yml b/app/spec/lib/bk/compat/bitbucket/examples/branches.yml deleted file mode 100644 index 203d6728..00000000 --- a/app/spec/lib/bk/compat/bitbucket/examples/branches.yml +++ /dev/null @@ -1,18 +0,0 @@ -# source: https://support.atlassian.com/bitbucket-cloud/docs/pipeline-start-conditions/#Branches - -image: node:lts -pipelines: - default: - - step: - script: - - echo "This script runs on all branches that don't have any specific pipeline assigned in 'branches'." - branches: - main: - - step: - script: - - echo "This script runs only on commit to the main branch." - feature/*: - - step: - image: openjdk:8 # This step uses its own image - script: - - echo "This script runs only on commit to branches with names that match the feature/* pattern." diff --git a/app/spec/lib/bk/compat/bitbucket/examples/caches.yml b/app/spec/lib/bk/compat/bitbucket/examples/caches.yml deleted file mode 100644 index 5f5f2f8c..00000000 --- a/app/spec/lib/bk/compat/bitbucket/examples/caches.yml +++ /dev/null @@ -1,58 +0,0 @@ -pipelines: - default: - - step: - name: cache docker - caches: - - docker - script: - - docker version - - step: - name: cache composer - caches: - - composer - script: - - composer install - - step: - name: cache dotnetcore - caches: - - dotnetcore - script: - - dotnet restore - - step: - name: cache gradle - caches: - - gradle - script: - - gradle build - - step: - name: cache ivy2 - caches: - - ivy2 - script: - - ant build - - step: - name: cache maven - caches: - - maven - script: - - mvn -B verify --file pom.xml - - step: - name: cache node - caches: - - node - script: - - npm ci - - step: - name: cache pip - caches: - - pip - script: - - pip install -r requirements.txt - - step: - name: cache sbt - caches: - # doc state sbt should always be used alongisde ivy2 - - sbt - - ivy2 - script: - - sbt clean compile diff --git a/app/spec/lib/bk/compat/bitbucket/examples/clone.yml b/app/spec/lib/bk/compat/bitbucket/examples/clone.yml deleted file mode 100644 index afaf7559..00000000 --- a/app/spec/lib/bk/compat/bitbucket/examples/clone.yml +++ /dev/null @@ -1,80 +0,0 @@ -pipelines: - default: - - step: - name: no clone - clone: - enabled: false - script: - - echo 'no cloning' - - step: - name: shallow depth - clone: - depth: 1 - script: - - echo 'depth' - - step: - name: full depth - clone: - depth: full - script: - - echo 'full depth' - - step: - name: filter - clone: - filter: blob:none - script: - - echo 'filter' - - step: - name: lfs - clone: - lfs: true - script: - - echo 'no cloning' - - step: - name: ssl - clone: - skip-ssl-verify: true - script: - - echo 'ssl' - - step: - name: strategy - clone: - strategy: fetch - script: - - echo 'strategy' - - step: - name: tags - clone: - tags: true - script: - - echo 'tags' - - step: - name: sparse - clone: - sparse-checkout: - patterns: - - path1/* - - path2 - script: - - echo 'sparse' - - step: - name: sparse no-cone - clone: - sparse-checkout: - cone-mode: false - patterns: - - path3/* - - path4 - script: - - echo 'sparse no-cone' - - step: - name: sparse disabled - clone: - sparse-checkout: - enabled: false - cone-mode: true - patterns: - - path5/* - - path6 - script: - - echo 'sparse disabled' diff --git a/app/spec/lib/bk/compat/bitbucket/examples/condition.yml b/app/spec/lib/bk/compat/bitbucket/examples/condition.yml deleted file mode 100644 index c1a754e1..00000000 --- a/app/spec/lib/bk/compat/bitbucket/examples/condition.yml +++ /dev/null @@ -1,20 +0,0 @@ -pipelines: - default: - - step: - name: single file condition - condition: - changesets: - includePaths: - - singlefile - script: - - echo 'should never run' - - step: - name: multiple files condition - condition: - changesets: - includePaths: - - file1 - - path1/* - - '**/glob.ext' - script: - - echo 'should never run' diff --git a/app/spec/lib/bk/compat/bitbucket/examples/custom.yml b/app/spec/lib/bk/compat/bitbucket/examples/custom.yml deleted file mode 100644 index 48350b7c..00000000 --- a/app/spec/lib/bk/compat/bitbucket/examples/custom.yml +++ /dev/null @@ -1,8 +0,0 @@ -# source: https://support.atlassian.com/bitbucket-cloud/docs/pipeline-start-conditions/#Custom--manual--pipelines - -pipelines: - custom: # Pipelines that are triggered manually - sonar: # The name that is displayed in the list in the Bitbucket Cloud GUI - - step: - script: - - echo "Manual triggers for Sonar are awesome!" \ No newline at end of file diff --git a/app/spec/lib/bk/compat/bitbucket/examples/deployment.yml b/app/spec/lib/bk/compat/bitbucket/examples/deployment.yml deleted file mode 100644 index 9b81a86b..00000000 --- a/app/spec/lib/bk/compat/bitbucket/examples/deployment.yml +++ /dev/null @@ -1,7 +0,0 @@ -pipelines: - default: - - step: - name: Deploy to production - deployment: production env 1 - script: - - python deploy.py prod_env_1 \ No newline at end of file diff --git a/app/spec/lib/bk/compat/bitbucket/examples/empty.yml b/app/spec/lib/bk/compat/bitbucket/examples/empty.yml deleted file mode 100644 index ecdda907..00000000 --- a/app/spec/lib/bk/compat/bitbucket/examples/empty.yml +++ /dev/null @@ -1 +0,0 @@ -pipelines: {} \ No newline at end of file diff --git a/app/spec/lib/bk/compat/bitbucket/examples/fail-fast.yml b/app/spec/lib/bk/compat/bitbucket/examples/fail-fast.yml deleted file mode 100644 index 1520081e..00000000 --- a/app/spec/lib/bk/compat/bitbucket/examples/fail-fast.yml +++ /dev/null @@ -1,10 +0,0 @@ -pipelines: - default: - - step: - name: Build and test - image: node:21-alpine - script: - - npm install - - npm test - fail-fast: true - diff --git a/app/spec/lib/bk/compat/bitbucket/examples/global-caches.yml b/app/spec/lib/bk/compat/bitbucket/examples/global-caches.yml deleted file mode 100644 index 41a55f24..00000000 --- a/app/spec/lib/bk/compat/bitbucket/examples/global-caches.yml +++ /dev/null @@ -1,56 +0,0 @@ -definitions: - caches: - - nofile: - path: cached/folder - - singlefile: - path: other/folder - key: - files: manifest.file - - multiplefiles: - path: third/folder - key: - files: - - other.manifest - - glob/* - -pipelines: - default: - - step: - name: no file cache - caches: - - nofile - script: - - echo 'no file cache' - - step: - name: single file cache - caches: - - singlefile - script: - - echo 'single file cache' - - step: - name: multiple files cache - caches: - - multiplefiles - script: - - echo 'multiple files cache' - - step: - name: multiple caches - caches: - - singlefile - - nofile - script: - - echo 'multiple caches' - - step: - name: global and docker caches - caches: - - docker - - nofile - script: - - echo 'global and docker caches' - - step: - name: global and builtin caches - caches: - - node - - nofile - script: - - echo 'global and node caches' diff --git a/app/spec/lib/bk/compat/bitbucket/examples/global-clone.yml b/app/spec/lib/bk/compat/bitbucket/examples/global-clone.yml deleted file mode 100644 index 1f418b7b..00000000 --- a/app/spec/lib/bk/compat/bitbucket/examples/global-clone.yml +++ /dev/null @@ -1,25 +0,0 @@ -clone: - sparse-checkout: - patterns: - - path1/* - - path2 - -pipelines: - default: - - step: - name: simple - script: - - echo 'simple' - - step: - name: no clone - clone: - enabled: false - script: - - echo 'no cloning' - - step: - name: no sparse - clone: - sparse-checkout: - enabled: false - script: - - echo 'no sparse' diff --git a/app/spec/lib/bk/compat/bitbucket/examples/global-options.yml b/app/spec/lib/bk/compat/bitbucket/examples/global-options.yml deleted file mode 100644 index cfebf4fe..00000000 --- a/app/spec/lib/bk/compat/bitbucket/examples/global-options.yml +++ /dev/null @@ -1,21 +0,0 @@ -options: - docker: true - max-time: 50 - size: 8x - -pipelines: - default: - - step: - name: no conf - script: - - echo 'no configuration' - - step: - name: with time - max-time: 100 - script: - - echo 'override max-time' - - step: - name: with size - size: 1x - script: - - echo 'override size' diff --git a/app/spec/lib/bk/compat/bitbucket/examples/image-auth.yml b/app/spec/lib/bk/compat/bitbucket/examples/image-auth.yml deleted file mode 100644 index f9a1d314..00000000 --- a/app/spec/lib/bk/compat/bitbucket/examples/image-auth.yml +++ /dev/null @@ -1,27 +0,0 @@ -pipelines: - default: - - step: - name: basic auth - image: - name: bash:latest - username: test-user - password: $ENV_VAR - script: - - echo 'basic auth' - - step: - name: ecr key auth - image: - name: ACCT.dkr.ecr.REGION.domain - aws: - access-key: AKIATEST - secret-key: SECRET_VALUE - script: - - echo 'from ecr key' - - step: - name: ecr oidc auth - image: - name: ACCT.dkr.ecr.REGION.domain - aws: - oidc-role: ROLE_ARN - script: - - echo 'aws odic' \ No newline at end of file diff --git a/app/spec/lib/bk/compat/bitbucket/examples/image.yml b/app/spec/lib/bk/compat/bitbucket/examples/image.yml deleted file mode 100644 index 10a5d5fb..00000000 --- a/app/spec/lib/bk/compat/bitbucket/examples/image.yml +++ /dev/null @@ -1,21 +0,0 @@ -image: golang:1.21 - -pipelines: - default: - - step: - name: Lint - image: golangci/golangci-lint:v1.31.0 - script: - - golangci-lint run -v - - step: - name: Build - script: - - go build src/* - - step: - name: Test - image: - name: golang:1.22 - script: - - mkdir test-reports - - go get -u github.com/jstemmer/go-junit-report - - go test tests/* -v 2>&1 | go-junit-report > test-reports/report.xml \ No newline at end of file diff --git a/app/spec/lib/bk/compat/bitbucket/examples/manual.yml b/app/spec/lib/bk/compat/bitbucket/examples/manual.yml deleted file mode 100644 index 115162cf..00000000 --- a/app/spec/lib/bk/compat/bitbucket/examples/manual.yml +++ /dev/null @@ -1,12 +0,0 @@ -pipelines: - default: - - step: - name: simple - trigger: 'automatic' - script: - - echo 'running' - - step: - name: complex - script: - - echo 'running' - trigger: 'manual' diff --git a/app/spec/lib/bk/compat/bitbucket/examples/oidc.yml b/app/spec/lib/bk/compat/bitbucket/examples/oidc.yml deleted file mode 100644 index 913df696..00000000 --- a/app/spec/lib/bk/compat/bitbucket/examples/oidc.yml +++ /dev/null @@ -1,12 +0,0 @@ -pipelines: - default: - - step: - oidc: true - script: - - echo "I can access data through OpenID Connect!" - - |- - aws sts assume-role-with-web-identity \ - --role-arn arn:aws:iam::XXXXXX:role/projectx-build \ - --role-session-name build-session \ - --web-identity-token "$BITBUCKET_STEP_OIDC_TOKEN" \ - --duration-seconds 1000 \ No newline at end of file diff --git a/app/spec/lib/bk/compat/bitbucket/examples/parallel.yml b/app/spec/lib/bk/compat/bitbucket/examples/parallel.yml deleted file mode 100644 index 57b26548..00000000 --- a/app/spec/lib/bk/compat/bitbucket/examples/parallel.yml +++ /dev/null @@ -1,22 +0,0 @@ -pipelines: - default: - - parallel: # simple direct translation - - step: - name: Build - script: - - ./build.sh - - parallel: - # these option alows to force stop all running steps if any step fails - fail-fast: true - steps: - - step: - name: Integration 1 - script: - - ./integration-tests.sh --batch 1 - - step: - # option can be disabled for a step - # and its failure won't stop other steps in a group - fail-fast: false - name: Upload metadata - script: - - ./upload-metadata.sh \ No newline at end of file diff --git a/app/spec/lib/bk/compat/bitbucket/examples/pipes.yml b/app/spec/lib/bk/compat/bitbucket/examples/pipes.yml deleted file mode 100644 index 5545fbcb..00000000 --- a/app/spec/lib/bk/compat/bitbucket/examples/pipes.yml +++ /dev/null @@ -1,17 +0,0 @@ -pipelines: - default: - - step: - name: simple pipe - script: - - echo 'testing pipe' - - pipe: test-pipe:v1.1 - - step: - name: pipe with vars - script: - - echo 'testing vars pipe' - - pipe: test-pipe:v1.1 - variables: - TEST: value - TEST_ARRAY: - - value1 - - value2 diff --git a/app/spec/lib/bk/compat/bitbucket/examples/pull-requests.yml b/app/spec/lib/bk/compat/bitbucket/examples/pull-requests.yml deleted file mode 100644 index 3d0ffd0a..00000000 --- a/app/spec/lib/bk/compat/bitbucket/examples/pull-requests.yml +++ /dev/null @@ -1,19 +0,0 @@ -# source https://support.atlassian.com/bitbucket-cloud/docs/pipeline-start-conditions/#Pull-Requests - -pipelines: - pull-requests: - feature/*: - - step: - name: Build for feature branch pull request - script: - - echo "Hello, feature branch PR!" - hotfix/*: - - step: - name: Build for hotfix branch pull request - script: - - echo "Hello, hotfix PR!" - '**': - - step: - name: Build for all other pull requests - script: - - echo "Hello, non-feature, non-hotfix pull request!" \ No newline at end of file diff --git a/app/spec/lib/bk/compat/bitbucket/examples/runs-on.yml b/app/spec/lib/bk/compat/bitbucket/examples/runs-on.yml deleted file mode 100644 index 2ab42cf5..00000000 --- a/app/spec/lib/bk/compat/bitbucket/examples/runs-on.yml +++ /dev/null @@ -1,33 +0,0 @@ -pipelines: - default: - - step: - name: Simple label - runs-on: linux - script: - - echo 'step 1' - - step: - name: Simple size - size: 2x - script: - - echo 'step 2' - - step: - name: Complex label - runs-on: - - linux - - aws - script: - - echo 'step 3' - - step: - name: Combination - runs-on: linux - size: 4x - script: - - echo 'step 4' - - step: - name: Complex combination - runs-on: - - linux - - aws - size: 8x - script: - - echo 'step 1' diff --git a/app/spec/lib/bk/compat/bitbucket/examples/services.yml b/app/spec/lib/bk/compat/bitbucket/examples/services.yml deleted file mode 100644 index 1c335764..00000000 --- a/app/spec/lib/bk/compat/bitbucket/examples/services.yml +++ /dev/null @@ -1,39 +0,0 @@ -definitions: - services: - simple: - image: bash:latest - mysql: - image: mysql:5.7 - variables: - MYSQL_DATABASE: my-db - MYSQL_ROOT_PASSWORD: $password - redis: - image: redis:3.2 - memory: 128 - -pipelines: - default: - - step: - name: no services - script: - - echo 'nothing to see here' - - step: - name: just the db - services: - - mysql - script: - - echo 'should be able to connect to MySQL' - - step: - name: just redis - services: - - redis - script: - - echo 'should be able to connect to redis' - - step: - name: all of them - services: - - simple - - redis - - mysql - script: - - echo 'should be able to connect to MySQL' diff --git a/app/spec/lib/bk/compat/bitbucket/examples/simple.yml b/app/spec/lib/bk/compat/bitbucket/examples/simple.yml deleted file mode 100644 index db790f6f..00000000 --- a/app/spec/lib/bk/compat/bitbucket/examples/simple.yml +++ /dev/null @@ -1,9 +0,0 @@ -pipelines: - default: - - step: - name: Build and Test - max-time: 100 - script: - - IMAGE_NAME=$BITBUCKET_REPO_SLUG - - docker build . --file Dockerfile --tag ${IMAGE_NAME} - - docker save ${IMAGE_NAME} --output "${IMAGE_NAME}.tar" \ No newline at end of file diff --git a/app/spec/lib/bk/compat/bitbucket/examples/stages.yaml b/app/spec/lib/bk/compat/bitbucket/examples/stages.yaml deleted file mode 100644 index 9944ba99..00000000 --- a/app/spec/lib/bk/compat/bitbucket/examples/stages.yaml +++ /dev/null @@ -1,43 +0,0 @@ -pipelines: - default: - - stage: - name: simple stage - steps: - - step: - name: Build app - script: - - sh ./build-app.sh - - step: - name: Run unit tests - script: - - sh ./run-tests.sh - - stage: - name: conditional stage - condition: - changesets: - includePaths: - # only xml files directly under path1 directory - - "path1/*.xml" - # any changes in deeply nested directories under path2 - - "path2/**" - steps: - - step: - name: Build app - script: - - sh ./build-app.sh - - step: - name: Run unit tests - script: - - sh ./run-tests.sh - - stage: - name: manual stage - trigger: manual - steps: - - step: - name: Build app - script: - - sh ./build-app.sh - - step: - name: Run unit tests - script: - - sh ./run-tests.sh \ No newline at end of file diff --git a/app/spec/lib/bk/compat/bitbucket/examples/tags.yml b/app/spec/lib/bk/compat/bitbucket/examples/tags.yml deleted file mode 100644 index 374cca43..00000000 --- a/app/spec/lib/bk/compat/bitbucket/examples/tags.yml +++ /dev/null @@ -1,19 +0,0 @@ -# source: https://support.atlassian.com/bitbucket-cloud/docs/pipeline-start-conditions/#Tags - -pipelines: - tags: - '*-windows': - - step: - name: Build for *-windows tags - script: - - echo "Hello, Windows!" - '*-macos': - - step: - name: Build for *-macos tags - script: - - echo "Hello, macOS!" - '*-linux': - - step: - name: Build for *-linux tags - script: - - echo "Hello, Linux!" \ No newline at end of file