Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename library to ci-environment #34

Merged
merged 14 commits into from
Dec 8, 2021
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/release-github.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: Release create-meta on github
name: Release on github

on:
push:
branches:
- release/*

jobs:

pre-release-check:
uses: cucumber/create-meta/.github/workflows/prerelease-checks.yml@main
uses: cucumber/ci-environment/.github/workflows/prerelease-checks.yml@main

create-github-release:
name: Create GitHub Release and Git tag
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release-java.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release create-meta maven package
name: Release maven package

on:
push:
Expand All @@ -8,10 +8,10 @@ on:
jobs:

pre-release-check:
uses: cucumber/create-meta/.github/workflows/prerelease-checks.yml@main
uses: cucumber/ci-environment/.github/workflows/prerelease-checks.yml@main

test-java:
uses: cucumber/create-meta/.github/workflows/test-java.yml@main
uses: cucumber/ci-environment/.github/workflows/test-java.yml@main

publish-mvn:
name: Publish Maven Package
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release-javascript.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release create-meta npm module
name: Release ci-environment npm module

on:
push:
Expand All @@ -8,10 +8,10 @@ on:
jobs:

pre-release-check:
uses: cucumber/create-meta/.github/workflows/prerelease-checks.yml@main
uses: cucumber/ci-environment/.github/workflows/prerelease-checks.yml@main

test-javascript:
uses: cucumber/create-meta/.github/workflows/test-javascript.yml@main
uses: cucumber/ci-environment/.github/workflows/test-javascript.yml@main

publish-npm:
name: Publish NPM module
Expand Down
11 changes: 3 additions & 8 deletions .github/workflows/release-ruby.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release create-meta ruby gem
name: Release ci-environment ruby gem

on:
push:
Expand All @@ -8,10 +8,10 @@ on:
jobs:

pre-release-check:
uses: cucumber/create-meta/.github/workflows/prerelease-checks.yml@main
uses: cucumber/ci-environment/.github/workflows/prerelease-checks.yml@main

test-ruby:
uses: cucumber/create-meta/.github/workflows/test-ruby.yml@main
uses: cucumber/ci-environment/.github/workflows/test-ruby.yml@main

publish-rubygem:
name: Publish Ruby Gem
Expand All @@ -21,11 +21,6 @@ jobs:

steps:
- uses: actions/checkout@v2

- name: Synchronize CI Dict
working-directory: ruby
run: bundle exec rake copy_ci_dict

aslakhellesoy marked this conversation as resolved.
Show resolved Hide resolved
- name: Publish ruby gem
uses: cucumber/[email protected]
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ jobs:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
working-directory: ruby
- name: bundle exec rspec
- name: bundle exec rake
working-directory: ruby
run: bundle exec rspec
run: bundle exec rake
5 changes: 3 additions & 2 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

## CI definitions

The `ciDict.json` file contains definitions of various CI servers. Each property of a CI
server definition is an expression that evaluates a value from one or more environment variables.
The `CiEnvironment.json` file contains an array of `CiEnvironment` structs for
all the supported CI servers. Each property of a `CiEnvironment` struct
is an expression that evaluates a value from one or more environment variables.

The expression syntax for environment variables can use the form `${variable/pattern/replacement}`,
similar to [bash parameter substitution](https://tldp.org/LDP/abs/html/parameter-substitution.html),
Expand Down
40 changes: 22 additions & 18 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,21 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

### Changed
- This library has been renamed to `ci-environment` and no longer depends on Cucumber `messages`.
([PR#34](https://github.com/cucumber/ci-environment/pull/34))

## [6.0.4] - 2021-11-16

### Fixed
- Update links in descriptor files to point to the new repository at https://github.com/cucumber/create-meta
- Update links in descriptor files to point to the new repository at https://github.com/cucumber/ci-environment
- [Ruby][Java] Fix ciDict.json was missing from the Ruby Gem and the Java Artifact
([PR#13](https://github.com/cucumber/create-meta/pull/13))
([PR#13](https://github.com/cucumber/ci-environment/pull/13))

## [6.0.3] - 2021-11-15
### Fixed
- [JavaScript] Removed tag property from git object if it is undefined
([PR#4](https://github.com/cucumber/create-meta/pull/4))
([PR#4](https://github.com/cucumber/ci-environment/pull/4))

## [6.0.2] - 2021-10-18
### Fixed
Expand Down Expand Up @@ -112,21 +116,21 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Added
- First release

[Unreleased]: https://github.com/cucumber/create-meta/compare/v6.0.4...main
[6.0.4]: https://github.com/cucumber/create-meta/compare/v6.0.3...v6.0.4
[6.0.3]: https://github.com/cucumber/create-meta/compare/v6.0.2...v6.0.3
[6.0.2]: https://github.com/cucumber/create-meta/compare/v6.0.1...v6.0.2
[6.0.1]: https://github.com/cucumber/create-meta/compare/v6.0.0...v6.0.1
[6.0.0]: https://github.com/cucumber/create-meta/compare/v5.0.0...v6.0.0
[5.0.0]: https://github.com/cucumber/create-meta/compare/v4.0.0...v5.0.0
[4.0.0]: https://github.com/cucumber/create-meta/compare/v3.0.0...v4.0.0
[3.0.0]: https://github.com/cucumber/create-meta/compare/v2.0.4...v3.0.0
[2.0.4]: https://github.com/cucumber/create-meta/compare/v2.0.2...v2.0.4
[2.0.2]: https://github.com/cucumber/create-meta/compare/v2.0.1...v2.0.2
[2.0.1]: https://github.com/cucumber/create-meta/compare/v2.0.0...v2.0.1
[2.0.0]: https://github.com/cucumber/create-meta/compare/v1.2.0...v2.0.0
[1.2.0]: https://github.com/cucumber/create-meta/compare/v1.1.0...v1.2.0
[1.1.0]: https://github.com/cucumber/create-meta/compare/v1.0.0...v1.1.0
[Unreleased]: https://github.com/cucumber/ci-environment/compare/v6.0.4...main
[6.0.4]: https://github.com/cucumber/ci-environment/compare/v6.0.3...v6.0.4
[6.0.3]: https://github.com/cucumber/ci-environment/compare/v6.0.2...v6.0.3
[6.0.2]: https://github.com/cucumber/ci-environment/compare/v6.0.1...v6.0.2
[6.0.1]: https://github.com/cucumber/ci-environment/compare/v6.0.0...v6.0.1
[6.0.0]: https://github.com/cucumber/ci-environment/compare/v5.0.0...v6.0.0
[5.0.0]: https://github.com/cucumber/ci-environment/compare/v4.0.0...v5.0.0
[4.0.0]: https://github.com/cucumber/ci-environment/compare/v3.0.0...v4.0.0
[3.0.0]: https://github.com/cucumber/ci-environment/compare/v2.0.4...v3.0.0
[2.0.4]: https://github.com/cucumber/ci-environment/compare/v2.0.2...v2.0.4
[2.0.2]: https://github.com/cucumber/ci-environment/compare/v2.0.1...v2.0.2
[2.0.1]: https://github.com/cucumber/ci-environment/compare/v2.0.0...v2.0.1
[2.0.0]: https://github.com/cucumber/ci-environment/compare/v1.2.0...v2.0.0
[1.2.0]: https://github.com/cucumber/ci-environment/compare/v1.1.0...v1.2.0
[1.1.0]: https://github.com/cucumber/ci-environment/compare/v1.0.0...v1.1.0
[1.0.0]: https://github.com/cucumber/cucumber/releases/tag/v1.0.0

in alphabetical order -->
Expand Down
14 changes: 7 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing

Thank you for considering contributing to Cucumber create-meta!
Thank you for considering contributing to Cucumber ci-environment!

## Code of Conduct

Expand All @@ -13,18 +13,18 @@ If you want to see support for a new CI server, please submit a pull request.

Here are the steps:

* Modify the file `ciDict.json`, using environment variables to extract information.
* Add a new entry to `CiEnvironments.json`.
See [ARCHITECTURE.md](./ARCHITECTURE.md#ci-definitions) for more information on
`ciDict.json`.
`CiEnvironments.json`.
* Add an approval test in `testdata/YourCi.txt` and `testdata/YourCi.txt.json`.

Then build and run the tests for all implementations:

cd java && mvn test
cd ../javascript && npm test
cd ../ruby && bundle exec rspec
cd java && mvn clean install
cd ../javascript && npm install && npm test
cd ../ruby && bundle && bundle exec rake

If all tests pass, commit your code and send us a pull request. Bonus points if you
If all tests pass, commit your code and submit a pull request. Bonus points if you
also update `CHANGELOG.md` and `README.md`.

You might want to look at the source code for [danger](https://github.com/danger/danger/tree/master/lib/danger/ci_source)
Expand Down
46 changes: 30 additions & 16 deletions ciDict.json → CiEnvironments.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"Azure Pipelines": {
[
{
"name": "Azure Pipelines",
"url": "${BUILD_BUILDURI}",
"buildNumber": "${BUILD_BUILDNUMBER}",
"git": {
Expand All @@ -9,7 +10,8 @@
"tag": "${BUILD_SOURCEBRANCH/refs\/tags\/(.*)/\\1}"
}
},
"Bamboo": {
{
"name": "Bamboo",
"url": "${bamboo_buildResultsUrl}",
"buildNumber": "${bamboo_buildNumber}",
"git": {
Expand All @@ -19,7 +21,8 @@
"tag": null
}
},
"Buddy": {
{
"name": "Buddy",
"url": "${BUDDY_EXECUTION_URL}",
"buildNumber": "${BUDDY_EXECUTION_ID}",
"git": {
Expand All @@ -29,7 +32,8 @@
"tag": "${BUDDY_EXECUTION_TAG}"
}
},
"Bitrise": {
{
"name": "Bitrise",
"url": "${BITRISE_BUILD_URL}",
"buildNumber": "${BITRISE_BUILD_NUMBER}",
"git": {
Expand All @@ -39,7 +43,8 @@
"tag": "${BITRISE_GIT_TAG}"
}
},
"CircleCI": {
{
"name": "CircleCI",
"url": "${CIRCLE_BUILD_URL}",
"buildNumber": "${CIRCLE_BUILD_NUM}",
"git": {
Expand All @@ -49,7 +54,8 @@
"tag": "${CIRCLE_TAG}"
}
},
"CodeFresh": {
{
"name": "CodeFresh",
"url": "${CF_BUILD_URL}",
"buildNumber": "${CF_BUILD_ID}",
"git": {
Expand All @@ -59,7 +65,8 @@
"tag": null
}
},
"CodeShip": {
{
"name": "CodeShip",
"url": "${CI_BUILD_URL}",
"buildNumber": "${CI_BUILD_NUMBER}",
"git": {
Expand All @@ -69,7 +76,8 @@
"tag": null
}
},
"GitHub Actions": {
{
"name": "GitHub Actions",
"url": "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}",
"buildNumber": "${GITHUB_RUN_ID}",
"git": {
Expand All @@ -79,7 +87,8 @@
"tag": "${GITHUB_REF/refs\/tags\/(.*)/\\1}"
}
},
"GitLab": {
{
"name": "GitLab",
"url": "${CI_JOB_URL}",
"buildNumber": "${CI_JOB_ID}",
"git": {
Expand All @@ -89,7 +98,8 @@
"tag": "${CI_COMMIT_TAG}"
}
},
"GoCD": {
{
"name": "GoCD",
"url": "${GO_SERVER_URL}/pipelines/${GO_PIPELINE_NAME}/${GO_PIPELINE_COUNTER}/${GO_STAGE_NAME}/${GO_STAGE_COUNTER}",
"buildNumber": "${GO_PIPELINE_NAME}/${GO_PIPELINE_COUNTER}/${GO_STAGE_NAME}/${GO_STAGE_COUNTER}",
"git": {
Expand All @@ -99,7 +109,8 @@
"tag": null
}
},
"Jenkins": {
{
"name": "Jenkins",
"url": "${BUILD_URL}",
"buildNumber": "${BUILD_NUMBER}",
"git": {
Expand All @@ -109,7 +120,8 @@
"tag": null
}
},
"Semaphore": {
{
"name": "Semaphore",
"url": "${SEMAPHORE_ORGANIZATION_URL}/jobs/${SEMAPHORE_JOB_ID}",
"buildNumber": "${SEMAPHORE_JOB_ID}",
"git": {
Expand All @@ -119,7 +131,8 @@
"tag": "${SEMAPHORE_GIT_TAG_NAME}"
}
},
"Travis CI": {
{
"name": "Travis CI",
"url": "${TRAVIS_BUILD_WEB_URL}",
"buildNumber": "${TRAVIS_JOB_NUMBER}",
"git": {
Expand All @@ -129,7 +142,8 @@
"tag": "${TRAVIS_TAG}"
}
},
"Wercker": {
{
"name": "Wercker",
"url": "${WERCKER_RUN_URL}",
"buildNumber": "${WERCKER_RUN_URL/.*\\/([^\\/]+)$/\\1}",
"git": {
Expand All @@ -139,4 +153,4 @@
"tag": null
}
}
}
]
2 changes: 0 additions & 2 deletions Makefile

This file was deleted.

Loading