github-actions(deps): Bump actions/checkout from 4.2.0 t…
#24
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
--- | |
name: Platform - Simulated Data Producer | |
on: # yamllint disable-line rule:truthy | |
push: | |
branches: | |
- main | |
paths: | |
- .github/workflows/platform-simulated-data-producer.yml | |
- scripts/simulated-data-producer/** | |
workflow_dispatch: | |
permissions: read-all | |
concurrency: platform-simulated-data-producer | |
jobs: | |
simulated-data-producer: | |
name: Simulated Data Producer | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: scripts/simulated-data-producer | |
env: | |
KUBE_CLUSTER: ${{ secrets.CLOUD_PLATFORM_DATA_PLATFORM_DEVELOPMENT_KUBE_CLUSTER }} | |
KUBE_NAMESPACE: ${{ secrets.CLOUD_PLATFORM_DATA_PLATFORM_DEVELOPMENT_KUBE_NAMESPACE }} | |
KUBE_CERT: ${{ secrets.CLOUD_PLATFORM_DATA_PLATFORM_DEVELOPMENT_KUBE_CERT }} | |
KUBE_TOKEN: ${{ secrets.CLOUD_PLATFORM_DATA_PLATFORM_DEVELOPMENT_KUBE_TOKEN }} | |
steps: | |
- name: Checkout | |
id: checkout | |
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 | |
- name: Configure Kubernetes CLI | |
id: configure_kubectl | |
run: | | |
echo "${KUBE_CERT}" > ca.crt | |
kubectl config set-cluster cloud-platform --server=https://${KUBE_CLUSTER} --certificate-authority=ca.crt | |
kubectl config set-credentials cloud-platform --token="${KUBE_TOKEN}" | |
kubectl config set-context cloud-platform --cluster=cloud-platform --namespace=${KUBE_NAMESPACE} --user=cloud-platform | |
kubectl config use-context cloud-platform | |
- name: Create Kubernetes configmap | |
id: create_manifests | |
run: | | |
kubectl \ | |
delete \ | |
configmap \ | |
simulated-data-producer || true | |
kubectl \ | |
create \ | |
configmap \ | |
simulated-data-producer \ | |
--from-file=entrypoint.sh \ | |
--from-file=main.py | |
- name: Run migration | |
id: run_migration | |
run: | | |
kubectl apply --filename job.yml | |
kubectl wait --for=condition=complete --timeout=300s job/simulated-data-producer |