added token and tokenreplacement on jenkins end
All checks were successful
Schedulord/schedulord-discordbot/pipeline/head This commit looks good

This commit is contained in:
Jesse James Isler 2022-06-10 07:56:30 +02:00
parent 151a037e32
commit 450a986494
4 changed files with 13 additions and 3 deletions

1
.env Normal file
View File

@ -0,0 +1 @@
CLIENT_TOKEN=((YourToken))

3
.gitignore vendored
View File

@ -73,7 +73,6 @@ web_modules/
.yarn-integrity
# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
@ -127,4 +126,4 @@ dist
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
.pnp.*

10
Jenkinsfile vendored
View File

@ -3,7 +3,17 @@ pipeline {
tools {
nodejs "node"
}
environment {
TOKEN = credentials('schedulord-token')
}
stages {
stage('Replace Keys') {
steps {
sh("sed -i 's/((YourToken))/$TOKEN/g' .env")
}
}
stage('NPM Install') {
steps {
sh 'npm install'

View File

@ -25,4 +25,4 @@ client.on('message', async msg => {
//make sure this line is the last line
client.login(process.env.CLIENT_TOKEN); //login bot using token
client.login(process.env.CLIENT_TOKEN); //login bot using token