From 22cd7719d8acc99f1ed7aafc526fca64bc8c07c6 Mon Sep 17 00:00:00 2001 From: Sciocatti Date: Thu, 12 Jan 2023 00:05:18 +0200 Subject: [PATCH] Bootstrap Commit. --- Dockerfile | 6 +++++- {template => cicd}/Jenkinsfile | 4 ++-- config.conf | 2 +- template/setup.sh | 27 --------------------------- 4 files changed, 8 insertions(+), 31 deletions(-) rename {template => cicd}/Jenkinsfile (94%) delete mode 100755 template/setup.sh diff --git a/Dockerfile b/Dockerfile index 6e600c7..1e519e2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1 +1,5 @@ -FROM nginx:latest \ No newline at end of file +FROM nginx:latest + +WORKDIR /utils +RUN curl -LO "https://storage.googleapis.com/kubernetes-release/release/v1.24.3/bin/linux/amd64/kubectl" +RUN chmod u+x ./kubectl \ No newline at end of file diff --git a/template/Jenkinsfile b/cicd/Jenkinsfile similarity index 94% rename from template/Jenkinsfile rename to cicd/Jenkinsfile index d2775b9..56d86e9 100644 --- a/template/Jenkinsfile +++ b/cicd/Jenkinsfile @@ -8,11 +8,11 @@ pipeline { apiVersion: v1 kind: Pod metadata: - name: {{k3sApp}}-image-build + name: deploy-amd64-image-build spec: serviceAccountName: jenkins-admin nodeSelector: - kubernetes.io/arch: {{k3sArch}} + kubernetes.io/arch: amd64 containers: - name: kaniko image: gcr.io/kaniko-project/executor:debug diff --git a/config.conf b/config.conf index 5d50dbb..efc68e9 100644 --- a/config.conf +++ b/config.conf @@ -1,3 +1,3 @@ destinationRegistry=192.168.195.195:30000 -imageName=nginx +imageName=deploy-amd64 imageTag=latest \ No newline at end of file diff --git a/template/setup.sh b/template/setup.sh deleted file mode 100755 index 1ecf2a9..0000000 --- a/template/setup.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -echo "Hello, lets get your project set up. Please follow the prompts attentively." - -echo "" -read -p " K3S Build Pod Name: " k3sApp -read -p " Build Architecture: [amd64 | arm64] " k3sArch - -echo "" -echo "Creating Folders" - echo " Creating cicd/" - mkdir cicd - -echo "" -echo "Loading files" -echo " Loading cicd/Jenkinsfile" -cp template/Jenkinsfile cicd/Jenkinsfile -sed -ie "s|{{k3sApp}}|$k3sApp|g" cicd/Jenkinsfile -sed -ie "s|{{k3sArch}}|$k3sArch|g" cicd/Jenkinsfile -rm cicd/Jenkinsfilee - -echo "" -echo "Removing template folder" -rm -rf template - -echo "" -echo "Thank you! Happy building..."