Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Siegrift committed Dec 21, 2023
1 parent 531bcf2 commit 442330f
Show file tree
Hide file tree
Showing 15 changed files with 12 additions and 69 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ changed package (otherwise you might get weird JS/TS errors).
Signed API and Airnode feed use [semantic versioning](https://semver.org/). Packages are published to NPM to export the
configuration schemas and various utilities. The services are dockerized and published to Docker Hub.

There is a script that automates the process of creating a new NPM version. Full release procedure:
There is a script that automates the process of creating new NPM versions and Docker images. Full release procedure:

1. `pnpm run create-npm-release [major|minor|patch]` - The script ensures publishing happens from up-to-date `main`
branch. It updates the package versions for `airnode-feed` and `signed-api`, updates fixtures and example files, does
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "signed-api",
"version": "2.4.0",
"version": "0.1.0",
"engines": {
"node": ">=18.19.0",
"pnpm": "^8.12.0"
Expand All @@ -17,8 +17,8 @@
"prepare": "husky install",
"prettier:check": "pnpm recursive run prettier:check",
"prettier:fix": "pnpm recursive run prettier:fix",
"publish:airnode-feed": "cd packages/airnode-feed && pnpm publish --access public --registry http://localhost:4873 --no-git-checks",
"publish:signed-api": "cd packages/signed-api && pnpm publish --access public --registry http://localhost:4873 --no-git-checks",
"publish:airnode-feed": "cd packages/airnode-feed && pnpm publish --access public",
"publish:signed-api": "cd packages/signed-api && pnpm publish --access public",
"test": "pnpm recursive run test",
"tsc": "pnpm recursive run tsc"
},
Expand Down
7 changes: 0 additions & 7 deletions packages/airnode-feed/CHANGELOG.md

This file was deleted.

20 changes: 0 additions & 20 deletions packages/airnode-feed/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -352,26 +352,6 @@ An identifier of the deployment stage. This is used to distinguish between diffe
example `dev`, `staging` or `production`. The stage value can have 256 characters at maximum and can only include
lowercase alphanumeric characters and hyphens.

## Versioning and release

Airnode feed uses [semantic versioning](https://semver.org/). The version is specified in the `package.json` file. The
package is not published to NPM, but instead dockerized and published to Docker Hub.

To release a new version:

1. `git checkout main` - Always version from `main` branch. Also, ensure that the working directory is clean (has no
uncommitted changes).
2. `cd packages/airnode-feed` - Navigate to the Airnode feed package.
3. `pnpm version [major|minor|patch]` - Choose the right version bump. This will bump the version, create a git tag and
commit it.
4. Build the docker image with tag `api3/airnode-feed:latest`. If running on Linux, use `pnpm run docker:build`
otherwise use `pnpm run docker:build:amd64`.
5. `docker tag api3/airnode-feed:latest api3/airnode-feed:<MAJOR.MINOR.PATCH>` - Tag the image with the version. Replace
the `<MAJOR.MINOR.PATCH>` with the version you just bumped (copy it from `package.json`).
6. `docker push api3/airnode-feed:latest && docker push api3/airnode-feed:<MAJOR.MINOR.PATCH>` - Push the image
upstream. Both the latest and the versioned tag should be published.
7. `git push --follow-tags` - Push the tagged commit upstream.

## Deployment

<!-- markdown-link-check-disable -->
Expand Down
2 changes: 1 addition & 1 deletion packages/airnode-feed/config/airnode-feed.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
}
],
"nodeSettings": {
"nodeVersion": "2.4.0",
"nodeVersion": "0.1.0",
"airnodeWalletMnemonic": "${WALLET_MNEMONIC}",
"stage": "local-example"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/airnode-feed/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@api3/airnode-feed",
"version": "2.4.0",
"version": "0.1.0",
"engines": {
"node": ">=18.19.0",
"pnpm": "^8.12.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/e2e/src/airnode-feed/airnode-feed.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
],
"apiCredentials": [],
"nodeSettings": {
"nodeVersion": "2.4.0",
"nodeVersion": "0.1.0",
"airnodeWalletMnemonic": "diamond result history offer forest diagram crop armed stumble orchard stage glance",
"stage": "local-example"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/e2e/src/signed-api/signed-api.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
{ "address": "0xbF3137b0a7574563a23a8fC8badC6537F98197CC", "authTokens": ["some-secret-token-for-airnode-feed"] }
],
"stage": "e2e-test",
"version": "2.4.0"
"version": "0.1.0"
}
3 changes: 0 additions & 3 deletions packages/performance-test/CHANGELOG.md

This file was deleted.

2 changes: 1 addition & 1 deletion packages/performance-test/airnode-feed/create-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const configTemplate = {
],
apiCredentials: [],
nodeSettings: {
nodeVersion: '2.4.0',
nodeVersion: '0.1.0',
airnodeWalletMnemonic: 'destroy manual orange pole pioneer enemy detail lady cake bus shed visa',
stage: 'performance-test',
},
Expand Down
2 changes: 1 addition & 1 deletion packages/performance-test/signed-api/signed-api.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
}
],
"allowedAirnodes": "*",
"version": "2.4.0",
"version": "0.1.0",
"stage": "perf-test"
}
7 changes: 0 additions & 7 deletions packages/signed-api/CHANGELOG.md

This file was deleted.

20 changes: 0 additions & 20 deletions packages/signed-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,26 +264,6 @@ The API provides the following endpoints:
- Returns all Airnode addresses for which there is signed data. It is possible that this data cannot be shown by the
delayed endpoints (in case the data is too fresh and there is not an older alternative).

## Versioning and release

Signed API uses [semantic versioning](https://semver.org/). The version is specified in the `package.json` file. The
package is not published to NPM, but instead dockerized and published to Docker Hub.

To release a new version:

1. `git checkout main` - Always version from `main` branch. Also, ensure that the working directory is clean (has no
uncommitted changes).
2. `cd packages/api` - Change directory to the API package.
3. `pnpm version [major|minor|patch]` - Choose the right version bump. This will bump the version, create a git tag and
commit it.
4. Build the docker image with tag `api3/signed-api:latest`. If running on Linux, use `pnpm run docker:build` otherwise
use `pnpm run docker:build:amd64`.
5. `docker tag api3/signed-api:latest api3/signed-api:<MAJOR.MINOR.PATCH>` - Tag the image with the version. Replace the
`<MAJOR.MINOR.PATCH>` with the version you just bumped (copy it from `package.json`).
6. `docker push api3/signed-api:latest && docker push api3/signed-api:<MAJOR.MINOR.PATCH>` - Push the image upstream.
Both the latest and the versioned tag should be published.
7. `git push --follow-tags` - Push the tagged commit upstream.

## Deployment

To deploy signed API on AWS you can use a CloudFormation template in the `deployment` folder. You need to specify the
Expand Down
2 changes: 1 addition & 1 deletion packages/signed-api/config/signed-api.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
{ "address": "0xbF3137b0a7574563a23a8fC8badC6537F98197CC", "authTokens": ["some-secret-token-for-airnode-feed"] }
],
"stage": "local",
"version": "2.4.0"
"version": "0.1.0"
}
2 changes: 1 addition & 1 deletion packages/signed-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@api3/signed-api",
"version": "2.4.0",
"version": "0.1.0",
"engines": {
"node": ">=18.19.0",
"pnpm": "^8.12.0"
Expand Down

0 comments on commit 442330f

Please sign in to comment.