Просмотр исходного кода

create hello porter job dockerfile

Alexander Belanger 5 лет назад
Родитель
Сommit
baca5f76c4

+ 1 - 0
server/api/release_handler.go

@@ -308,6 +308,7 @@ func (app *App) HandleGetReleaseControllers(w http.ResponseWriter, r *http.Reque
 	}
 
 	k8sForm.PopulateK8sOptionsFromQueryParams(vals, app.Repo.Cluster)
+	k8sForm.DefaultNamespace = form.ReleaseForm.Namespace
 
 	// validate the form
 	if err := app.validator.Struct(k8sForm); err != nil {

+ 3 - 0
services/deploy_job_init_container/Dockerfile

@@ -0,0 +1,3 @@
+FROM alpine
+ADD start.sh /
+CMD ["sh", "/start.sh"]

+ 17 - 0
services/deploy_job_init_container/start.sh

@@ -0,0 +1,17 @@
+#!/bin/bash
+
+cat << EOF
+-------------------------------------------------------------------
+👋 Hello from Porter!
+-------------------------------------------------------------------
+-------------------------------------------------------------------
+Your job is currently being built and will be ready soon. This is 
+a temporary job that runs to verify your deployment was successful.
+To view build logs, navigate to your connected GitHub repo and     
+select the Actions tab.
+-------------------------------------------------------------------
+-------------------------------------------------------------------
+For more information, visit:
+https://docs.getporter.dev/docs/setting-up-cicd-1
+-------------------------------------------------------------------
+EOF