Created
May 25, 2025 06:26
-
-
Save AdrianKoshka/30c5809e1c981f850aebfa55437481db to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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