Skip to content

Commit

Permalink
force output
Browse files Browse the repository at this point in the history
  • Loading branch information
mnaser committed Feb 5, 2024
1 parent 1a6c121 commit 85cf1de
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,10 @@ pipeline {
REGISTRY = "${env.BRANCH_NAME == 'main' ? PROD_REGISTRY : TEST_REGISTRY}"

EARTHLY_CI = 'true'
EARTHLY_OUTPUT = 'true'
EARTHLY_BUILD_ARGS = "REGISTRY=${REGISTRY}"
}

stages {
// template all helm charts during lint stage to catch early failure
stage('lint') {
parallel {
stage('ansible-lint') {
Expand All @@ -27,7 +25,7 @@ pipeline {
}

steps {
sh 'earthly +lint.ansible-lint'
sh 'earthly --output +lint.ansible-lint'
}

post {
Expand All @@ -43,7 +41,7 @@ pipeline {
}

steps {
sh 'earthly +lint.helm'
sh 'earthly --output +lint.helm'
}

post {
Expand All @@ -59,7 +57,7 @@ pipeline {
}

steps {
sh 'earthly +lint.markdownlint'
sh 'earthly --output +lint.markdownlint'
}

post {
Expand All @@ -82,18 +80,14 @@ pipeline {
}

stage('unit') {
environment {
EARTHLY_OUTPUT = 'true'
}

parallel {
stage('go') {
agent {
label 'earthly'
}

steps {
sh 'earthly +unit.go'
sh 'earthly --output +unit.go'
}

post {
Expand All @@ -113,7 +107,7 @@ pipeline {
}

steps {
sh 'earthly +build.collection'
sh 'earthly --output +build.collection'
archiveArtifacts artifacts: 'dist/**'
}
}
Expand All @@ -125,8 +119,6 @@ pipeline {

steps {
script {
env.EARTHLY_OUTPUT = 'false'

if (env.BRANCH_NAME == 'main') {
docker.withRegistry('https://ghcr.io', 'github-packages-token') {
sh 'earthly --push +images'
Expand All @@ -136,7 +128,7 @@ pipeline {
}
}

sh 'earthly +pin-images'
sh 'earthly --output +pin-images'
sh 'earthly +scan-images'
stash name: 'src-with-pinned-images', includes: '**'
}
Expand Down

0 comments on commit 85cf1de

Please sign in to comment.