Skip to content

Instantly share code, notes, and snippets.

View mr-pascal's full-sized avatar

Pascal mr-pascal

View GitHub Profile
provider "helm" {
kubernetes {
host = "https://${google_container_cluster.primary.endpoint}"
token = data.google_client_config.default.access_token
}
}
resource "helm_release" "example" {
name = "my-local-chart"
chart = "./helm"
# google_client_config and kubernetes provider must be explicitly specified like the following.
# Retrieve an access token as the Terraform runner
data "google_client_config" "default" {}
# GKE cluster
resource "google_container_cluster" "primary" {
name = "my-gke"
project = var.project
location = var.region
#!/bin/bash
USE_CLOUD=false
while getopts 'ca:' OPTION; do
case "$OPTION" in
c)
USE_CLOUD=true
;;
a)
steps:
# Build the container image and push it with Kaniko
- name: 'gcr.io/kaniko-project/executor:latest'
args:
- --cache=true
- --dockerfile=${_DOCKER_FILE}
- --build-arg=SRC_DIR=${_APP}
- --destination=eu.gcr.io/$PROJECT_ID/${_APP}:$COMMIT_SHA
ARG BUILD_IMAGE="node:18-slim"
ARG RUN_IMAGE="node:18-alpine"
##############################
######## build stage #########
FROM $BUILD_IMAGE AS builder
## NEW!!
ARG SRC_DIR=""
use std::process::Command;
use std::str;
fn main() {
// output()
let out2 = Command::new("ls")
.arg("-l")
.arg("-a")
.output()
.expect("ls command failed to start");
use std::process::Command;
fn main() {
// spawn()
println!("Running via 'spawn()'");
let mut out = Command::new("ls")
.arg("-l")
.arg("-a")
.spawn()
use std::process::Command;
fn main() {
// Build the command
let command = Command::new("ls")
.arg("-l")
.arg("-a")
//... continue ...
}
steps:
# Build the container image and push it with Kaniko
- name: 'gcr.io/kaniko-project/executor:latest'
args:
- --cache=true
- --destination=eu.gcr.io/$PROJECT_ID/kaniko-demo:$COMMIT_SHA
dist
node_modules