mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-24 07:46:39 +00:00
Inspect CI
Change-type: patch
This commit is contained in:
parent
aeec52fb8f
commit
fc88c7678b
43
.resinci.yml
43
.resinci.yml
@ -1,4 +1,47 @@
|
||||
---
|
||||
docker:
|
||||
builds:
|
||||
- path: .
|
||||
dockerfile: ./automation/caxa/Dockerfile
|
||||
args:
|
||||
- BUILD_BASE=balenalib/amd64-debian-node:12.22.1-build-20210506
|
||||
- GITHUB_TOKEN
|
||||
docker_repo: repo-name-not-used-because-not-published
|
||||
publish: false
|
||||
|
||||
# caxa does not currently produce 32-bit x86/ia32/i386 stubs
|
||||
# - path: .
|
||||
# dockerfile: ./automation/caxa/Dockerfile
|
||||
# args:
|
||||
# - BUILD_BASE=balenalib/i386-debian-node:12.16.3-build-20200518
|
||||
# - GITHUB_TOKEN
|
||||
# docker_repo: repo-name-not-used-because-not-published
|
||||
# publish: false
|
||||
|
||||
- path: .
|
||||
dockerfile: ./automation/caxa/Dockerfile
|
||||
args:
|
||||
- BUILD_BASE=balenalib/aarch64-debian-node:12.20.1-build-20210119
|
||||
- GITHUB_TOKEN
|
||||
docker_repo: repo-name-not-used-because-not-published
|
||||
publish: false
|
||||
|
||||
- path: .
|
||||
dockerfile: ./automation/caxa/Dockerfile
|
||||
args:
|
||||
- BUILD_BASE=balenalib/armv7hf-debian-node:12.22.1-build-20210603
|
||||
- GITHUB_TOKEN
|
||||
docker_repo: repo-name-not-used-because-not-published
|
||||
publish: false
|
||||
|
||||
- path: .
|
||||
dockerfile: ./automation/caxa/Dockerfile
|
||||
args:
|
||||
- BUILD_BASE=balenalib/rpi-debian-node:12.20.1-build-20210201
|
||||
- GITHUB_TOKEN
|
||||
docker_repo: repo-name-not-used-because-not-published
|
||||
publish: false
|
||||
|
||||
npm:
|
||||
platforms:
|
||||
- name: linux
|
||||
|
@ -503,10 +503,10 @@ export async function buildOclifInstaller() {
|
||||
}
|
||||
|
||||
export async function buildInstallers() {
|
||||
if (process.platform !== 'win32') {
|
||||
const { makeCaxaInstaller } = await import('./make-caxa-installer');
|
||||
await makeCaxaInstaller();
|
||||
}
|
||||
// if (process.platform !== 'win32') {
|
||||
// const { makeCaxaInstaller } = await import('./make-caxa-installer');
|
||||
// await makeCaxaInstaller();
|
||||
// }
|
||||
await buildOclifInstaller();
|
||||
}
|
||||
|
||||
|
32
automation/caxa/Dockerfile
Normal file
32
automation/caxa/Dockerfile
Normal file
@ -0,0 +1,32 @@
|
||||
ARG BUILD_BASE=balenalib/amd64-debian-node:12.22.1-build
|
||||
FROM ${BUILD_BASE}
|
||||
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN npm install --unsafe-perm && npm run build:fast
|
||||
RUN mkdir -p dist && npm run build:caxa
|
||||
|
||||
# test the installer
|
||||
# file will be something like balena-cli-v12.45.20-linux-x64-installer
|
||||
RUN ls -la dist; file=$(ls -t dist/balena-cli-v* | head -n 1); echo "$file"; "$file"
|
||||
|
||||
# fail early if balena binary won't run
|
||||
RUN balena --version
|
||||
|
||||
# install resinci-deploy
|
||||
ARG GITHUB_TOKEN
|
||||
RUN cd /usr/src && \
|
||||
git clone https://product-os:${GITHUB_TOKEN}@github.com/product-os/resinci-deploy.git && \
|
||||
cd resinci-deploy && \
|
||||
npm install --unsafe-perm && npm link --force
|
||||
|
||||
RUN unset IFS; read branch owner repo version <<<$(node automation/caxa/parse-version.js); \
|
||||
echo "branch=${branch}" "owner=${owner}" "repo=${repo}" "version=${version}"
|
||||
RUN unset IFS; read branch owner repo version <<<$(node automation/caxa/parse-version.js) && \
|
||||
echo "branch=${branch}" "owner=${owner}" "repo=${repo}" "version=${version}" && \
|
||||
resinci-deploy store github-release dist/* --branch=$branch --owner=$owner --repo=$repo --version=$version
|
||||
|
||||
CMD /bin/bash
|
9
automation/caxa/parse-version.js
Normal file
9
automation/caxa/parse-version.js
Normal file
@ -0,0 +1,9 @@
|
||||
const { promises: fs } = require('fs');
|
||||
|
||||
async function parseVersion() {
|
||||
const fields = ['head_branch', 'base_org', 'base_repo', 'componentVersion'];
|
||||
const ver = JSON.parse(await fs.readFile('.git/.version'));
|
||||
console.log(fields.map((f) => ver[f]).join(' '));
|
||||
}
|
||||
|
||||
parseVersion();
|
@ -60,7 +60,7 @@
|
||||
"package": "npm run build:fast && npm run build:standalone && npm run build:installer",
|
||||
"release": "ts-node --transpile-only automation/run.ts release",
|
||||
"pretest": "npm run build",
|
||||
"test": "npm run test:shrinkwrap && npm run test:source && npm run test:standalone",
|
||||
"test": "false && npm run test:shrinkwrap && npm run test:source && npm run test:standalone",
|
||||
"test:shrinkwrap": "ts-node --transpile-only automation/run.ts test-shrinkwrap",
|
||||
"test:source": "cross-env BALENA_CLI_TEST_TYPE=source mocha",
|
||||
"test:standalone": "npm run build:standalone && npm run test:standalone:fast",
|
||||
|
Loading…
Reference in New Issue
Block a user