Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
359b1c6ba4 | ||
|
|
0aecadb699 | ||
|
|
0e2e5cba34 |
Vendored
+7
-6
@@ -1,7 +1,7 @@
|
||||
// Pull requests run tests and checks only. On main, a change under pricing/
|
||||
// builds one image and promotes its digest from staging to production after a
|
||||
// human approval. Setting RELEASE_RECORD redeploys an existing release without
|
||||
// building, which is how rollback and recovery run.
|
||||
// Pull requests run tests and checks only. On main, a change to pricing/,
|
||||
// ansible/ or this file builds one image and promotes its digest from staging
|
||||
// to production after a human approval. Setting RELEASE_RECORD redeploys an
|
||||
// existing release without building, which is how rollback and recovery run.
|
||||
|
||||
// Applies one release record with Ansible on the delivery agent.
|
||||
def deploy(String record, String label) {
|
||||
@@ -108,8 +108,8 @@ pipeline {
|
||||
when { allOf { branch 'main'; expression { !params.RELEASE_RECORD } } }
|
||||
steps {
|
||||
script {
|
||||
env.DELIVER = sh(returnStatus: true, script: 'git diff --quiet HEAD^1 HEAD -- pricing') != 0 ? 'true' : 'false'
|
||||
echo "pricing/ changed: ${env.DELIVER}"
|
||||
env.DELIVER = sh(returnStatus: true, script: 'git diff --quiet HEAD^1 HEAD -- pricing ansible Jenkinsfile') != 0 ? 'true' : 'false'
|
||||
echo "pricing/, ansible/ or Jenkinsfile changed: ${env.DELIVER}"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -143,6 +143,7 @@ pipeline {
|
||||
withCredentials([usernamePassword(credentialsId: 'registry-write', usernameVariable: 'REG_USER', passwordVariable: 'REG_TOKEN')]) {
|
||||
sh '''#!/bin/bash
|
||||
set -euo pipefail
|
||||
mkdir -p releases reports
|
||||
export DOCKER_CONFIG=$(mktemp -d)
|
||||
trap 'rm -rf "$DOCKER_CONFIG"' EXIT
|
||||
printf '%s' "$REG_TOKEN" | docker login "${IMAGE%%/*}" -u "$REG_USER" --password-stdin
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
target_env: production
|
||||
release_image: git.pollefeys.dev/seatbacktrivia/pricing@sha256:53b4f06375d3b704d7bf86051aae4cbccf5dc9a85b233076fed238496ac916c6
|
||||
expected_version: v1
|
||||
expected_commit: 0aecadb699d65c3275e38079308b389c2ce53db0
|
||||
expected_total: 30
|
||||
public_url: https://app.pollefeys.dev
|
||||
proxy_network: gitea_gitea-net
|
||||
@@ -0,0 +1,7 @@
|
||||
target_env: staging
|
||||
release_image: git.pollefeys.dev/seatbacktrivia/pricing@sha256:53b4f06375d3b704d7bf86051aae4cbccf5dc9a85b233076fed238496ac916c6
|
||||
expected_version: v1
|
||||
expected_commit: 0aecadb699d65c3275e38079308b389c2ce53db0
|
||||
expected_total: 30
|
||||
public_url: https://staging.pollefeys.dev
|
||||
proxy_network: gitea_gitea-net
|
||||
Reference in New Issue
Block a user