Skip to content

Commit

Permalink
build: create package manually
Browse files Browse the repository at this point in the history
  • Loading branch information
DecentM committed Aug 27, 2024
1 parent 94a7097 commit 48910e2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
10 changes: 6 additions & 4 deletions .ci/pipeline/concourse-ts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,19 @@ jobs:
image_resource:
type: registry-image
source:
repository: node
tag: 20.16.0-alpine
repository: alpine
tag: "3.20"
platform: linux
run:
path: /bin/sh
args:
- -exuc
- npm pack image/
dir: ((.:package))
- tar -czf ../../../../../package/package.tar.gz package.json dist
dir: image/rootfs/app/packages/((.:package))
inputs:
- name: image
outputs:
- name: package
max_in_flight: 1
- name: auto-pipeline
plan:
Expand Down
16 changes: 6 additions & 10 deletions ci/pipelines/concourse-ts/jobs/publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,15 @@ export const publish_job = new ConcourseTs.Job('publish', (job) => {
name: 'image',
})

task.run = new ConcourseTs.Command((command) => {
task.set_image_resource({
type: 'registry-image',
source: {
repository: 'node',
tag: '20.16.0-alpine',
},
})
task.add_output({
name: 'package',
})

command.dir = ConcourseTs.Utils.get_var('.:package')
task.run = new ConcourseTs.Command((command) => {
command.dir = `image/rootfs/app/packages/${ConcourseTs.Utils.get_var('.:package')}`

command.add_arg('-exuc')
command.add_arg('npm pack image/')
command.add_arg('tar -czf ../../../../../package/package.tar.gz package.json dist')
})
}).as_task_step((step) => {
step.add_across({
Expand Down

0 comments on commit 48910e2

Please sign in to comment.