j7s-ci/j7s-os/j7s-os-image-build.yaml

22 lines
579 B
YAML

apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
name: j7s-os-image-build
namespace: j7s-ci
spec:
workspaces:
- name: source
params:
- name: image-name
results:
- name: version-string
steps:
- image: harbor.internal.jpace121.net/j7s-image-build:latest
securityContext:
privileged: true
script: |
set -x
sudo chown -R j7s:j7s $(workspaces.source.path)
cd $(workspaces.source.path)
make $(params.image-name)
echo -n `date +%Y%m%d%H%M`-`git describe --no-match --always --dirty` | tee $(results.version-string.path)