-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable building Docker images for released packages
Also cleanup and modularization of packaging scripts.
- Loading branch information
1 parent
557dc56
commit 2fb32d7
Showing
18 changed files
with
450 additions
and
201 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json", | ||
"changelog": "@changesets/cli/changelog", | ||
"changelog": ["@changesets/changelog-github", { "repo": "api3dao/airnode" }], | ||
"commit": false, | ||
"fixed": [["@api3/*"]], | ||
"access": "public", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
.github/ | ||
**/node_modules/** | ||
**/dist/** | ||
!docker/scripts/dist | ||
**/build/** | ||
**/coverage/** | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,3 +28,5 @@ package.json_ | |
|
||
# Other | ||
.DS_Store | ||
|
||
docker/scripts/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { getNpmRegistryContainer } from './npm-registry'; | ||
import { runCommand, unifyUrlFormat } from './utils'; | ||
|
||
export const buildDockerImages = (npmRegistry: string, npmTag: string, dockerTag: string, dev: boolean) => { | ||
let npmRegistryUrl = npmRegistry; | ||
const devSuffix = dev ? '-dev' : ''; | ||
|
||
if (npmRegistry === 'local') { | ||
const npmRegistryInfo = getNpmRegistryContainer(); | ||
if (!npmRegistryInfo) { | ||
throw new Error(`Can't build Docker images: No local NPM registry running`); | ||
} | ||
|
||
npmRegistryUrl = npmRegistryInfo.npmRegistryUrl; | ||
} | ||
|
||
npmRegistryUrl = unifyUrlFormat(npmRegistryUrl); | ||
|
||
runCommand( | ||
`docker build --no-cache --build-arg npmRegistryUrl=${npmRegistryUrl} --build-arg npmTag=${npmTag} --tag api3/airnode-admin${devSuffix}:${dockerTag} --file /app/airnode-admin/Dockerfile /app/airnode-admin` | ||
); | ||
runCommand( | ||
`docker build --no-cache --build-arg npmRegistryUrl=${npmRegistryUrl} --build-arg npmTag=${npmTag} --tag api3/airnode-deployer${devSuffix}:${dockerTag} --file /app/airnode-deployer/Dockerfile /app/airnode-deployer` | ||
); | ||
runCommand( | ||
`docker build --no-cache --build-arg npmRegistryUrl=${npmRegistryUrl} --build-arg npmTag=${npmTag} --tag api3/airnode-client${devSuffix}:${dockerTag} --file /app/airnode-client/Dockerfile /app/airnode-client` | ||
); | ||
}; |
Oops, something went wrong.