resources: # REPO of Scripts - name: cd_k8s_repo type: gitRepo integration: "drship_github" versionTemplate: sourceName: "devops-recipes/cd_k8s_kubectl" branch: master # Kubernetes Config - name: cd_k8s_kube_config type: cliConfig integration: "drship_kube" jobs: - name: deploy_app_kctl_kube type: runSh steps: - IN: node_app_img_dh # defined here https://github.com/devops-recipes/node_app/blob/master/shippable.yml - IN: cd_k8s_kube_config switch: off - IN: cd_k8s_repo switch: off - TASK: name: deploy_app runtime: options: env: - APP_LABEL: "k8s-app" script: - pushd $(shipctl get_resource_state "cd_k8s_repo") - cd specs - export APP_IMG=$(shipctl get_resource_version_key node_app_img_dh sourceName) - export APP_TAG=$(shipctl get_resource_version_name node_app_img_dh) - shipctl replace appDeploy.yml appSvc.yml - kubectl delete -f ./appDeploy.yml 2>/dev/null || echo "" - kubectl delete -f ./appSvc.yml 2>/dev/null || echo "" - kubectl create -o json -f ./appDeploy.yml - kubectl create -o json -f ./appSvc.yml - popd flags: - cd - kctl - jfrog