Skip to content

Instantly share code, notes, and snippets.

@AdrianKoshka
Created May 25, 2025 06:26
Show Gist options
  • Save AdrianKoshka/30c5809e1c981f850aebfa55437481db to your computer and use it in GitHub Desktop.
Save AdrianKoshka/30c5809e1c981f850aebfa55437481db to your computer and use it in GitHub Desktop.
node("linux") {
properties([pipelineTriggers([cron('@daily')])])
stage("Clone") {
cleanWs deleteDirs: true
checkout scmGit(branches: [[name: '*/main']], extensions: [cloneOption(depth: 1, noTags: false, reference: '', shallow: true)], userRemoteConfigs: [[credentialsId: 'git-clone-key', url: '[email protected]:/srv/git/esphome-configs.git']])
}
stage("get latest container image") {
sh "docker pull ghcr.io/esphome/esphome:latest"
sh "docker image prune -f"
}
stage("Validate") {
sh("docker run --rm -v '${env.WORKSPACE}':/config ghcr.io/esphome/esphome config airgradient-one.yaml")
}
stage("Build") {
sh("docker run --rm -v '${env.WORKSPACE}':/config ghcr.io/esphome/esphome compile airgradient-one.yaml")
}
stage("Archive") {
tar archive: true, compress: true, defaultExcludes: true, dir: '.esphome/build/ag-one/.pioenvs/ag-one/', file: 'firmware.tar.gz', glob: 'firmware.*', overwrite: true
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment