Skip to content

Commit

Permalink
feat: add infra-helm-chart seed job
Browse files Browse the repository at this point in the history
CI/CD pipeline on Jenkins for infra-helm-chart semantic release
  • Loading branch information
sydrawat01 committed Nov 10, 2023
1 parent 2d9d0ca commit 21b63de
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
1 change: 1 addition & 0 deletions jenkins/jcasc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ jobs:
- file: ./webapp_seed.groovy
- file: ./webapp_db_seed.groovy
- file: ./webapp_helm_chart_seed.groovy
- file: ./infra_helm_chart_seed.groovy
# https://github.com/jenkinsci/configuration-as-code-plugin/issues/701
tool:
#This tool can't be installed against alpine OS
Expand Down
17 changes: 17 additions & 0 deletions scripts/infra_helm_chart_seed.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
multibranchPipelineJob('infra-helm-chart') {
branchSources {
github {
id('csye7125-infra-helm-chart')
scanCredentialsId('jenkins-sydrawat')
repoOwner('csye7125-fall2023-group05')
repository('infra-helm-chart')
}
}

orphanedItemStrategy {
discardOldItems {
numToKeep(-1)
daysToKeep(-1)
}
}
}
4 changes: 2 additions & 2 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,11 @@ sudo chown jenkins:jenkins ./*

# Move Jenkins files to Jenkins home
cd /home/ubuntu/ || exit
sudo mv jcasc.yaml webapp_seed.groovy webapp_db_seed.groovy webapp_helm_chart_seed.groovy /var/lib/jenkins/
sudo mv jcasc.yaml webapp_seed.groovy webapp_db_seed.groovy webapp_helm_chart_seed.groovy infra_helm_chart_seed.groovy /var/lib/jenkins/

# Update file ownership
cd /var/lib/jenkins/ || exit
sudo chown jenkins:jenkins jcasc.yaml webapp_seed.groovy webapp_db_seed.groovy webapp_helm_chart_seed.groovy
sudo chown jenkins:jenkins jcasc.yaml webapp_seed.groovy webapp_db_seed.groovy webapp_helm_chart_seed.groovy infra_helm_chart_seed.groovy

# Configure JAVA_OPTS to disable setup wizard
sudo mkdir -p /etc/systemd/system/jenkins.service.d/
Expand Down
5 changes: 4 additions & 1 deletion ubuntu.ami.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,10 @@ build {
source = "./scripts/webapp_db_seed.groovy"
destination = "/home/ubuntu/webapp_db_seed.groovy"
}

provisioner "file" {
source = "./scripts/infra_helm_chart_seed.groovy"
destination = "/home/ubuntu/infra_helm_chart_seed.groovy"
}
provisioner "file" {
source = "./scripts/webapp_helm_chart_seed.groovy"
destination = "/home/ubuntu/webapp_helm_chart_seed.groovy"
Expand Down

0 comments on commit 21b63de

Please sign in to comment.