From 18541f7465f10f2bfa12714ef6001fd6a286457f Mon Sep 17 00:00:00 2001 From: Sr Izan <66965250+SrIzan10@users.noreply.github.com> Date: Sat, 8 Apr 2023 20:01:54 +0200 Subject: [PATCH 1/5] feat: jenkins ci integration (wip) --- Jenkinsfile | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..97812aa --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,28 @@ +pipeline { + agent any + + stages { + stage('Build VSCode extension') { + steps { + // Clone the repository that contains the VSCode extension + git 'https://github.com/username/repo.git' + + // Install dependencies + sh 'npm install' + + // Build the extension + sh 'vsce package' + + // Set the built file as an artifact + archiveArtifacts artifacts: 'my-extension.vsix', onlyIfSuccessful: true + } + } + + /* stage('Send webhook request') { + steps { + // Use curl to send a POST request to https://api.example.com + sh 'curl -X POST https://api.example.com --data-urlencode "payload={\\"text\\":\\"New VSCode extension build available!\\"}"' + } + } */ + } +} From 2fef02f46c737dcfa048524efe10a92ec60e32ed Mon Sep 17 00:00:00 2001 From: Sr Izan <66965250+SrIzan10@users.noreply.github.com> Date: Sat, 8 Apr 2023 20:12:55 +0200 Subject: [PATCH 2/5] fix: lol me not editing the gh repo --- Jenkinsfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 97812aa..887a81f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -5,10 +5,12 @@ pipeline { stage('Build VSCode extension') { steps { // Clone the repository that contains the VSCode extension - git 'https://github.com/username/repo.git' + git 'https://github.com/sern-handler/snippets.git' // Install dependencies sh 'npm install' + + sh 'npm i -g @vscode/vsce' // Build the extension sh 'vsce package' From 00acc3f1c786bbfadb3ebf44abdeef280349cba2 Mon Sep 17 00:00:00 2001 From: Sr Izan <66965250+SrIzan10@users.noreply.github.com> Date: Sat, 8 Apr 2023 21:31:51 +0200 Subject: [PATCH 3/5] fix: please --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 887a81f..503bc96 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -5,7 +5,7 @@ pipeline { stage('Build VSCode extension') { steps { // Clone the repository that contains the VSCode extension - git 'https://github.com/sern-handler/snippets.git' + git branch: 'jenkins-testing', url: 'https://github.com/sern-handler/snippets.git' // Install dependencies sh 'npm install' From e0bf5587ca1a0d64a9530d7434ffedf170d6ee63 Mon Sep 17 00:00:00 2001 From: Sr Izan <66965250+SrIzan10@users.noreply.github.com> Date: Sat, 8 Apr 2023 21:53:54 +0200 Subject: [PATCH 4/5] fix: help me --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index 503bc96..b322d81 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,5 +1,6 @@ pipeline { agent any + tools { nodejs "NodeJS (sern snippets)" } stages { stage('Build VSCode extension') { From d6657730b148dca0e05d985044a6ca44e0b046b8 Mon Sep 17 00:00:00 2001 From: Sr Izan <66965250+SrIzan10@users.noreply.github.com> Date: Sat, 8 Apr 2023 21:56:42 +0200 Subject: [PATCH 5/5] fix: *.vsix --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index b322d81..15f102b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,7 +17,7 @@ pipeline { sh 'vsce package' // Set the built file as an artifact - archiveArtifacts artifacts: 'my-extension.vsix', onlyIfSuccessful: true + archiveArtifacts artifacts: '*.vsix', onlyIfSuccessful: true } }