Add new variables to the job/pod (#35)
This commit is contained in:
parent
0f9e6b6b58
commit
07b85bda5e
|
@ -15,19 +15,19 @@ on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
branch:
|
branch:
|
||||||
description: Branch
|
description: Branch (master)
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
source:
|
source:
|
||||||
description: Repository with tests
|
description: Repository with tests (current)
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
nameprefix:
|
nameprefix:
|
||||||
description: Runner job/pod name prefix
|
description: Runner prefix (cs-codex-dist-tests)
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
namespace:
|
namespace:
|
||||||
description: Kubernetes namespace for runner
|
description: Runner namespace (cs-codex-dist-tests)
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
|
@ -56,6 +56,8 @@ jobs:
|
||||||
[[ -n "${{ inputs.source }}" ]] && echo "SOURCE=${{ inputs.source }}" >>"$GITHUB_ENV" || echo "SOURCE=${{ env.SOURCE }}" >>"$GITHUB_ENV"
|
[[ -n "${{ inputs.source }}" ]] && echo "SOURCE=${{ inputs.source }}" >>"$GITHUB_ENV" || echo "SOURCE=${{ env.SOURCE }}" >>"$GITHUB_ENV"
|
||||||
[[ -n "${{ inputs.nameprefix }}" ]] && echo "NAMEPREFIX=${{ inputs.nameprefix }}" >>"$GITHUB_ENV" || echo "NAMEPREFIX=${{ env.NAMEPREFIX }}" >>"$GITHUB_ENV"
|
[[ -n "${{ inputs.nameprefix }}" ]] && echo "NAMEPREFIX=${{ inputs.nameprefix }}" >>"$GITHUB_ENV" || echo "NAMEPREFIX=${{ env.NAMEPREFIX }}" >>"$GITHUB_ENV"
|
||||||
[[ -n "${{ inputs.namespace }}" ]] && echo "NAMESPACE=${{ inputs.namespace }}" >>"$GITHUB_ENV" || echo "NAMESPACE=${{ env.NAMESPACE }}" >>"$GITHUB_ENV"
|
[[ -n "${{ inputs.namespace }}" ]] && echo "NAMESPACE=${{ inputs.namespace }}" >>"$GITHUB_ENV" || echo "NAMESPACE=${{ env.NAMESPACE }}" >>"$GITHUB_ENV"
|
||||||
|
echo "RUNID=$(date +%Y%m%d-%H%M%S)" >> $GITHUB_ENV
|
||||||
|
echo "TESTID=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Kubectl - Install ${{ env.KUBE_VERSION }}
|
- name: Kubectl - Install ${{ env.KUBE_VERSION }}
|
||||||
uses: azure/setup-kubectl@v3
|
uses: azure/setup-kubectl@v3
|
||||||
|
@ -69,5 +71,4 @@ jobs:
|
||||||
|
|
||||||
- name: Kubectl - Create Job
|
- name: Kubectl - Create Job
|
||||||
run: |
|
run: |
|
||||||
export RUNID=$(date +%Y%m%d-%H%M%S)
|
|
||||||
envsubst < ${{ env.JOB_MANIFEST }} | kubectl apply -f -
|
envsubst < ${{ env.JOB_MANIFEST }} | kubectl apply -f -
|
||||||
|
|
|
@ -28,6 +28,10 @@ spec:
|
||||||
value: ${BRANCH}
|
value: ${BRANCH}
|
||||||
- name: SOURCE
|
- name: SOURCE
|
||||||
value: ${SOURCE}
|
value: ${SOURCE}
|
||||||
|
- name: RUNID
|
||||||
|
value: ${RUNID}
|
||||||
|
- name: TESTID
|
||||||
|
value: ${TESTID}
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: kubeconfig
|
- name: kubeconfig
|
||||||
mountPath: /opt/kubeconfig.yaml
|
mountPath: /opt/kubeconfig.yaml
|
||||||
|
|
Loading…
Reference in New Issue