test-day-181

Today’s Task

  • Build Script User Friendly Changes

    • Extract Common Methods for PCT jobs
    • Remove Audit Tool from old repo
    • Extract Common methods for T1 image release scripts
      • Catalog
      • Nexus
      • Nucleus
    • Common methods for T3
      • sloth
      • vaquita
      • cp
    • Common methods for T2
  • Slack Bot

    • run on AWS
    • Try Demo Full Functions
    • Basic Function
    • New Features

Additional Task

  • Health Code Support

Thought

录制了从 jenkins console log 里面找 image tag 的 Macro 绑定到鼠标侧键上

下次 cm 应该会省力许多吧

test-day-180

Today’s Task

  • Build Script User Friendly Changes

    • Extract Common Methods for PCT jobs
    • Remove Audit Tool from old repo
    • Extract Common methods for T1 image release scripts
      • Catalog
      • Nexus
      • Nucleus
  • Slack Bot

    • run on AWS
    • Try Demo Full Functions
    • Basic Function

Additional Task

  • Fix LB team common methods
  • Mcrouter image pipeline

Thought

nucleus 的 common function 提起来确实有点吃力

尽量写得简单易懂吧

后面如果需要动 build.sh 那一系列的 generate xxx 估计更加头疼

test-day-179

Today’s Task

  • Build Script User Friendly Changes

    • Extract Common Methods for PCT jobs
    • Remove Audit Tool from old repo
    • Extract Common methods for T1 image release scripts
      • Catalog
      • Nexus
      • Nucleus
  • Slack Bot

    • run on AWS
    • Try Demo Full Functions
    • Basic Function

Additional Task

  • Run helm catalog & nucleus tests

Thought

搭环境 = =

试着熟悉看看 powershell 吧

再不济还有 gitbash

test-day-178

Today’s Task

  • Build Script User Friendly Changes

    • Extract Common Methods for PCT jobs
    • Remove Audit Tool from old repo
    • Extract Common methods for T1 image release scripts
      • Catalog
      • Nexus
      • Nucleus
  • Slack Bot

    • run on AWS
    • Try Demo Full Functions
    • Basic Function

Additional Task

  • Help Matt Shi with Customer Portal Images
  • Set up Dev Env on New Workstation

Thought

换到新机器啦

i7-3770 -> i7-8700

32GB DDR3 1600Mhz -> 64GB DDR4 2666Mhz

test-day-177

Today’s Task

  • Build Script User Friendly Changes

    • Extract Common Methods for PCT jobs
    • Remove Audit Tool from old repo
    • Extract Common methods for T1 image release scripts
      • Catalog
      • Nexus
      • Nucleus
  • Slack Bot

    • run on AWS
    • Try Demo Full Functions
    • Basic Function

Additional Task

  • Deploy LBCP on STG from test branch
  • Fix LBCP scripts to push image to AWS
  • Ask Jen to help creating repositories for LBCP on AWS

Thought

mvn clean install - build the whole multi-module project

mvn clean install -pl - build a single or a set modules

mvn clean install -pl -am - build a single or a set modules and their dependencies

1
2
3
4
declare -A animals=( ["moo"]="cow" ["woof"]="dog")
animals['key']='value'
"${animals[@]}" #expand the values
"${!animals[@]}" #expand the keys

test-day-176

Today’s Task

  • CM Support

  • Build Script User Friendly Changes

    • Extract Common Methods for PCT jobs
    • Remove Audit Tool from old repo
    • Extract Common methods for T1 image release scripts
  • Slack Bot

    • run on AWS
    • Try Demo Full Functions
    • Basic Function

Additional Task

  • Fix PCT Bot - Nexus, Guardiola
  • Create branch for Nucleus
  • Push customizedlog image to AWS
  • build catalog and try helm in next gen onebox
  • check lockbox-vaquita image for INT
  • recut lockbox-cp
  • fix crypto image pipeline

Thought

test-day-175

Today’s Task

  • Build Script User Friendly Changes
    • Extract Common Methods for PCT jobs
    • Remove Audit Tool from old repo
  • Hadar Groovy Liquibase Job Support

Additional Task

  • Fix ReleaseProductInNucleus pipeline (Token Expired)

Thought

又是新的一个月

这个月可以拿满 leetcode 每日一题徽章吗

Jenkins declarative pipeline script 可以通过这样的办法去复用方法

1
2
3
4
5
6
7
8
stage('init') {
agent any
steps {
script {
utils = load 'PCT/common_utils.groovy'
}
}
}

复用出去以后虽然可以让代码结构更加干净,未来有改动的话也可以省力一些

但是没有一个好用的编辑器插件支持,跳转到方法定义的体验相当差劲

test-day-173

Today’s Task

  • Build Script User Friendly Changes
  • Refactor Build Scripts
  • Hadar Groovy Liquibase Job Support

Additional Task

Thought

试着在 Jenkins Job 执行完之前拿到了当前 job 的 console log

需要去 Approve 一些奇怪的权限

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
stage('Result Analysis') {
steps {
script {
def logContent = Jenkins.getInstance().getItemByFullName(env.JOB_NAME).getBuildByNumber(Integer.parseInt(env.BUILD_NUMBER)).logFile.text
writeFile file: "${env.WORKSPACE}/buildConsolelog.txt", text: logContent
def consoleOutput = readFile "${env.WORKSPACE}/buildConsolelog.txt"

def keywords = ["ERROR", "WARNING", "author", "conflict"]

for(line in consoleOutput.split("\n")) {
for (keyword in keywords) {
if (line.contains(keyword)) {
echo line
} else if (line.contains("changes")) {
changes += line
echo line
}
}
}
}
}
}

test-day-172

Today’s Task

  • Build Script User Friendly Changes
  • Hadar Groovy Liquibase Job Support

Additional Task

  • TestInfra Support - onebox docker image version
  • Nucleus image x509 workaround for CXSong
  • Help check PROD image version with OPS

Thought

Jenkins Ansi Corlor Plugin

需要进 Jenkins Configuration 里面设置 color map 之后才会着色

echo -e \033[1;31m${message}\033[0m

FY23Q1

Completed Tasks

Pipelines and Scripts Maintenance

  • Port Scripts and Jenkins Jobs to Test-Infra Master after server reboot

Create Emergancy Branch

  • Add more components to Create Emergancy Branch Job

Sox Audit

  • Fix Sox Audit with Cassandra

  • Hide Sox Audit and Catalog MySQL Magic into Jenkins Credentials

Catalog Clear Staging Everything & Catlaog Clear Staging Promotion Rules

  • Fix Catalog Clear DB Pipelines to support catalog pods’ migration to AWS

Check STG status

  • Split Check STG Status Jenkins Job

Nucleus PCT

  • Nucleus PCT bot user-friendly error message

Hammurabi

  • Move Hammurabi to Test Infra Master

Release Pipelines

  • CTS and Lockbox-console-tools new release pipeline

  • Docker remove local image script

  • baseimages with jdk and tomcat upgrades

  • Dockerfile changes to boost image building

  • Extrack Common Functions of release scripts

Tools Improvement

  • Hadar Script Maintenance

  • Hadar Change Job Jenkins Server

CM Support Daily Tasks

  • Double confirmation on Audit

  • Merge Codes, resolve confilcts if needed

  • Build Image and check parameters

  • Deploy image to STG and some manual help like restarting pod & check error log, including some attempts to find out reason

  • push docker image to AWS if needed

  • Liquibase update check

  • Review on some details including regression parameters, image version table, etc.

  • Failure Tracking Emails