web3-proxy/Jenkinsfile

86 lines
2.6 KiB
Plaintext
Raw Permalink Normal View History

2023-06-25 15:37:23 -07:00
@Library('jenkins_lib@main') _
2023-01-27 17:45:08 +01:00
pipeline {
2023-06-27 09:27:56 -07:00
agent {
// not strictly required, but we only build graviton2 right now so this keeps the jenkins-agent count down
label 'arm64_graviton2'
}
2023-02-09 12:00:41 -08:00
options {
ansiColor('xterm')
}
2023-01-27 17:45:08 +01:00
environment {
2023-02-05 00:13:14 -08:00
// AWS_ECR_URL needs to be set in jenkin's config.
// AWS_ECR_URL could really be any docker registry. we just use ECR so that we don't have to manage it
2023-08-04 19:55:42 -07:00
REPO_NAME="web3-proxy"
2023-02-05 00:13:14 -08:00
// branch that should get tagged with "latest_$arch" (stable, main, master, etc.)
2023-02-09 12:19:10 -08:00
LATEST_BRANCH="main"
2023-01-27 17:45:08 +01:00
}
stages {
stage('Check and Cancel Old Builds') {
steps {
script {
2023-10-23 22:18:02 -07:00
myCancelRunning.cancelRunning()
}
}
}
stage('build and push') {
2023-01-27 17:45:08 +01:00
parallel {
2023-02-03 12:06:35 -08:00
stage('Build and push arm64_graviton2 image') {
agent {
2023-02-03 12:06:35 -08:00
label 'arm64_graviton2'
}
2023-02-05 00:13:14 -08:00
environment {
ARCH="arm64_graviton2"
}
2023-01-27 17:45:08 +01:00
steps {
script {
2023-11-03 14:57:52 -07:00
myBuildAndPush.buildAndPush()
2023-01-27 17:45:08 +01:00
}
}
}
stage('Build and push intel_xeon1 image') {
agent {
label 'intel_xeon1'
}
environment {
ARCH="intel_xeon1"
}
steps {
script {
myBuildAndPush.buildAndPush()
}
}
}
2023-06-25 15:49:50 -07:00
}
}
stage('push latest') {
parallel {
stage('maybe push latest_arm64_graviton2 tag') {
agent any
2023-02-05 00:13:14 -08:00
environment {
2023-06-25 15:49:50 -07:00
ARCH="arm64_graviton2"
2023-02-05 00:13:14 -08:00
}
2023-01-27 17:45:08 +01:00
steps {
script {
2023-06-25 15:49:50 -07:00
myPushLatest.maybePushLatest()
2023-01-27 17:45:08 +01:00
}
}
}
stage('maybe push latest_intel_xeon1 tag') {
agent any
environment {
ARCH="intel_xeon1"
}
steps {
script {
myPushLatest.maybePushLatest()
}
}
}
2023-01-27 17:45:08 +01:00
}
}
2023-01-27 17:45:08 +01:00
}
2023-01-28 10:48:58 +01:00
}