From 97ead41999ebba7db0d3410ca5d00d886ab43be1 Mon Sep 17 00:00:00 2001 From: tunexopez Date: Sun, 29 Dec 2024 21:03:17 -0800 Subject: [PATCH 1/6] upload --- Jenkinsfile | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..377b119 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,32 @@ +pipeline { + agent any + environment { + SSH_CRED = credentials('server-key') + } + stages { + + stage('Build') { + steps { + echo 'building app' + sh "pwd" + sh "ls" + sh "zip -r webapp.zip ." + sh "ls" + } + } + + stage('Deploy') { + steps { + echo 'Deploying app' + + } + } + + stage('Clean-Up') { + steps { + echo 'Remove existing files' + deleteDir() + } +        } +    } +} \ No newline at end of file From 4dc0c4b0df264245c8adb0c2abee4bea2628537d Mon Sep 17 00:00:00 2001 From: tunexopez Date: Sun, 29 Dec 2024 21:27:10 -0800 Subject: [PATCH 2/6] tunde --- Jenkinsfile | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 377b119..0feb1b4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,32 +1,31 @@ -pipeline { +pipeline { agent any environment { SSH_CRED = credentials('server-key') } stages { - stage('Build') { steps { - echo 'building app' - sh "pwd" - sh "ls" - sh "zip -r webapp.zip ." - sh "ls" + echo 'Building app' + sh 'pwd' + sh 'ls' + sh 'zip -r webapp.zip .' + sh 'ls' } } stage('Deploy') { steps { echo 'Deploying app' - + // Add deployment commands here } } stage('Clean-Up') { steps { - echo 'Remove existing files' + echo 'Removing existing files' deleteDir() } -        } -    } -} \ No newline at end of file + } + } +} From 8d4bba4598e5cda09eb12a9b89b59105620aa6ed Mon Sep 17 00:00:00 2001 From: tunexopez Date: Sun, 29 Dec 2024 21:56:24 -0800 Subject: [PATCH 3/6] tunde --- Jenkinsfile | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 0feb1b4..e2ca0d8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,6 +4,19 @@ pipeline { SSH_CRED = credentials('server-key') } stages { + stage('Prepare Environment') { + steps { + echo 'Installing dependencies' + sh 'sudo apt update && sudo apt install zip -y' + } + } + + stage('Checkout') { + steps { + checkout scm + } + } + stage('Build') { steps { echo 'Building app' @@ -17,7 +30,7 @@ pipeline { stage('Deploy') { steps { echo 'Deploying app' - // Add deployment commands here + // Deployment commands } } From 623717173c96afa62839074ae9a85acf9bf022ac Mon Sep 17 00:00:00 2001 From: tunexopez Date: Sun, 29 Dec 2024 22:03:31 -0800 Subject: [PATCH 4/6] tunde --- Jenkinsfile | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index e2ca0d8..7922f87 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,19 +4,20 @@ pipeline { SSH_CRED = credentials('server-key') } stages { - stage('Prepare Environment') { - steps { - echo 'Installing dependencies' - sh 'sudo apt update && sudo apt install zip -y' - } - } - stage('Checkout') { steps { checkout scm } } + stage('Test Credentials') { + steps { + sshagent(['server-key']) { + sh 'ssh -T git@github.com' + } + } + } + stage('Build') { steps { echo 'Building app' From 2da5fcda1ad17164bf69f3caaf6e2551f1b57495 Mon Sep 17 00:00:00 2001 From: tunexopez Date: Sun, 29 Dec 2024 22:11:59 -0800 Subject: [PATCH 5/6] tunde --- Jenkinsfile | 33 ++++++++++----------------------- 1 file changed, 10 insertions(+), 23 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 7922f87..9bf2368 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,42 +4,29 @@ pipeline { SSH_CRED = credentials('server-key') } stages { - stage('Checkout') { - steps { - checkout scm - } - } - stage('Test Credentials') { - steps { - sshagent(['server-key']) { - sh 'ssh -T git@github.com' - } - } - } - stage('Build') { steps { - echo 'Building app' - sh 'pwd' - sh 'ls' - sh 'zip -r webapp.zip .' - sh 'ls' + echo 'building app' + sh "pwd" + sh "ls" + sh "zip -r webapp.zip ." + sh "ls" } } stage('Deploy') { steps { echo 'Deploying app' - // Deployment commands + } } stage('Clean-Up') { steps { - echo 'Removing existing files' + echo 'Remove existing files' deleteDir() } - } - } -} +        } +    } +} \ No newline at end of file From 28e2b84ddd03d61e30453a105cd82b79be5e4b83 Mon Sep 17 00:00:00 2001 From: tunexopez Date: Sun, 29 Dec 2024 22:15:06 -0800 Subject: [PATCH 6/6] tunde --- Jenkinsfile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 9bf2368..06b83eb 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -18,7 +18,6 @@ pipeline { stage('Deploy') { steps { echo 'Deploying app' - } } @@ -27,6 +26,6 @@ pipeline { echo 'Remove existing files' deleteDir() } -        } -    } -} \ No newline at end of file + } + } +}