-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from kaiachain/update-cicd
update cicd
- Loading branch information
Showing
5 changed files
with
64 additions
and
81 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,26 +12,26 @@ aliases: | |
branches: | ||
ignore: | ||
- /release\/.*/ | ||
- master | ||
- main | ||
|
||
orbs: | ||
codecov: codecov/[email protected] | ||
docker: circleci/[email protected] | ||
|
||
executors: | ||
linux-executor: # this executor is for general testing and packaging linux binaries | ||
working_directory: ~/go/src/github.com/klaytn/klaytn | ||
working_directory: ~/go/src/github.com/kaiachain/kaia | ||
resource_class: medium | ||
docker: | ||
- image: klaytn/build_base:1.12-go.1.22.1-solc0.8.13-ubuntu-20.04 | ||
- image: kaiachain/build_base:1.12-go.1.22.1-solc0.8.13-ubuntu-20.04 | ||
auth: | ||
username: $DOCKER_LOGIN | ||
password: $DOCKER_PASSWORD | ||
linux-others-executor: # this executor is for test-others job | ||
working_directory: /go/src/github.com/klaytn/klaytn | ||
working_directory: /go/src/github.com/kaiachain/kaia | ||
resource_class: xlarge | ||
docker: | ||
- image: klaytn/build_base:1.12-go.1.22.1-solc0.8.13-ubuntu-20.04 | ||
- image: kaiachain/build_base:1.12-go.1.22.1-solc0.8.13-ubuntu-20.04 | ||
auth: | ||
username: $DOCKER_LOGIN | ||
password: $DOCKER_PASSWORD | ||
|
@@ -58,19 +58,19 @@ executors: | |
KAFKA_CFG_CONTROLLER_LISTENER_NAMES: CONTROLLER | ||
KAFKA_CFG_INTER_BROKER_LISTENER_NAME: PLAINTEXT | ||
darwin-executor: # this executor is for packaging darwin binaries | ||
working_directory: ~/go/src/github.com/klaytn/klaytn | ||
working_directory: ~/go/src/github.com/kaiachain/kaia | ||
macos: | ||
xcode: 14.2.0 | ||
resource_class: macos.x86.medium.gen2 | ||
rpm-executor: # this executor is for packaging rpm binaries | ||
working_directory: /go/src/github.com/klaytn/klaytn | ||
working_directory: /go/src/github.com/kaiachain/kaia | ||
docker: | ||
- image: klaytn/circleci-rpmbuild:1.22.1-gcc7 | ||
- image: kaiachain/circleci-rpmbuild:1.22.1-gcc7 | ||
auth: | ||
username: $DOCKER_LOGIN | ||
password: $DOCKER_PASSWORD | ||
default: | ||
working_directory: ~/go/src/github.com/klaytn/klaytn | ||
working_directory: ~/go/src/github.com/kaiachain/kaia | ||
docker: | ||
- image: cimg/go:1.22.1 | ||
|
||
|
@@ -107,7 +107,7 @@ commands: | |
else | ||
echo "this is not RC version" | ||
fi | ||
echo "export KLAYTN_VERSION=$(go run build/rpm/main.go version)" >> $BASH_ENV | ||
echo "export KAIA_VERSION=$(go run build/rpm/main.go version)" >> $BASH_ENV | ||
build-packaging: | ||
description: "Build for each OS/Network" | ||
parameters: | ||
|
@@ -139,8 +139,8 @@ commands: | |
command: | | ||
export GOPATH=~/go | ||
export PATH=$HOME/go1.22.1/go/bin:$PATH | ||
KLAYTN_VERSION=$(go run build/rpm/main.go version) | ||
for item in << parameters.item >>; do aws s3 cp packages/${item}-*.tar.gz s3://$FRONTEND_BUCKET/packages/klaytn/$KLAYTN_VERSION/; done | ||
KAIA_VERSION=$(go run build/rpm/main.go version) | ||
for item in << parameters.item >>; do aws s3 cp packages/${item}-*.tar.gz s3://$FRONTEND_BUCKET/packages/kaia/$KAIA_VERSION/; done | ||
rpm-tagging: | ||
description: "rpm tagging for cypress" | ||
steps: | ||
|
@@ -154,12 +154,12 @@ commands: | |
name: "upload S3 repo" | ||
command: | | ||
PLATFORM_SUFFIX=$(uname -s | tr '[:upper:]' '[:lower:]')-$(uname -m) | ||
KLAYTN_VERSION=$(go run build/rpm/main.go version) | ||
KAIA_VERSION=$(go run build/rpm/main.go version) | ||
for item in kcn kpn ken kscn kspn ksen kbn kgen homi; do | ||
TARGET_RPM=$(find $item-linux-x86_64/rpmbuild/RPMS/x86_64/ | awk -v pat="$item(d)?-v" '$0~pat') | ||
aws s3 cp $TARGET_RPM s3://$FRONTEND_BUCKET/packages/rhel/7/prod/ | ||
aws s3 cp $TARGET_RPM s3://$FRONTEND_BUCKET/packages/klaytn/$KLAYTN_VERSION/ | ||
aws s3 cp $TARGET_RPM s3://$FRONTEND_BUCKET/packages/kaia/$KAIA_VERSION/ | ||
done | ||
rpm-tagging-baobab: | ||
description: "rpm tagging for baobab" | ||
|
@@ -176,7 +176,7 @@ commands: | |
for item in kcn kpn ken; do | ||
TARGET_RPM=$(find $item-linux-x86_64/rpmbuild/RPMS/x86_64/ | awk -v pat="$item(d)?-baobab-v" '$0~pat') | ||
aws s3 cp $TARGET_RPM s3://$FRONTEND_BUCKET/packages/rhel/7/prod/ | ||
aws s3 cp $TARGET_RPM s3://$FRONTEND_BUCKET/packages/klaytn/$KLAYTN_VERSION/ | ||
aws s3 cp $TARGET_RPM s3://$FRONTEND_BUCKET/packages/kaia/$KAIA_VERSION/ | ||
done | ||
createrepo-update: | ||
steps: | ||
|
@@ -192,9 +192,9 @@ commands: | |
name: "Verify tag and file version match" | ||
command: | | ||
echo "tag version is " $CIRCLE_TAG | ||
KLAYTN_VERSION=$(go run build/rpm/main.go version) | ||
echo "version on version.go" $KLAYTN_VERSION | ||
if [ $KLAYTN_VERSION == ${CIRCLE_TAG%-*} ]; then | ||
KAIA_VERSION=$(go run build/rpm/main.go version) | ||
echo "version on version.go" $KAIA_VERSION | ||
if [ $KAIA_VERSION == ${CIRCLE_TAG%-*} ]; then | ||
echo "verification pass" | ||
else | ||
echo "It's not same version." | ||
|
@@ -206,10 +206,10 @@ commands: | |
name: "Verify tag and file version match" | ||
command: | | ||
TAGGER=$(git for-each-ref --format='%(tagger)' refs/tags/$CIRCLE_TAG | sed 's/ .*//') | ||
if [ $TAGGER == 'circleci-klaytn' ]; then | ||
echo "Pass! Tagger is circleci-klaytn" | ||
if [ $TAGGER == 'circleci-kaia' ]; then | ||
echo "Pass! Tagger is circleci-kaia" | ||
else | ||
echo "only circleci-klaytn can tagging major version" | ||
echo "only circleci-kaia can tagging major version" | ||
exit 1 | ||
fi | ||
make-pr: | ||
|
@@ -230,14 +230,14 @@ commands: | |
- run: | ||
name: "Create pull request" | ||
command: | | ||
version=$(hub pr list -s open -L 10 -f "%H%n") | ||
echo $version | ||
if [[ $version == *"release/${CIRCLE_TAG%-*}"* ]]; then | ||
echo "PR already exist" | ||
else | ||
echo "hub pull-request -m "[Master] release/$CIRCLE_TAG QA Signoff" -b $CIRCLE_PROJECT_USERNAME:master -h $CIRCLE_PROJECT_USERNAME:${CIRCLE_TAG%-*}" | ||
echo -e "[Master] release/${CIRCLE_TAG%-*} QA Sign-off\n\nThis PR is automatically created by CI to release a new official version of $CIRCLE_PROJECT_REPONAME.\n\nWhen this PR is approved by QA team, a new version will be released." | hub pull-request -b $CIRCLE_PROJECT_USERNAME:master -h $CIRCLE_PROJECT_USERNAME:release/${CIRCLE_TAG%-*} -r $GITHUB_reviewer -l circleci -F- | ||
fi | ||
version=$(hub pr list -s open -L 10 -f "%H%n") | ||
echo $version | ||
if [[ $version == *"release/${CIRCLE_TAG%-*}"* ]]; then | ||
echo "PR already exist" | ||
else | ||
echo "hub pull-request -m "[Main] release/$CIRCLE_TAG QA Signoff" -b $CIRCLE_PROJECT_USERNAME:master -h $CIRCLE_PROJECT_USERNAME:${CIRCLE_TAG%-*}" | ||
echo -e "[Main] release/${CIRCLE_TAG%-*} QA Sign-off\n\nThis PR is automatically created by CI to release a new official version of $CIRCLE_PROJECT_REPONAME.\n\nWhen this PR is approved by QA team, a new version will be released." | hub pull-request -b $CIRCLE_PROJECT_USERNAME:main -h $CIRCLE_PROJECT_USERNAME:release/${CIRCLE_TAG%-*} -r $GITHUB_reviewer -l circleci -F- | ||
fi | ||
- run: | ||
name: "build announce" | ||
command: .circleci/scripts/build_announce.sh | ||
|
@@ -249,7 +249,7 @@ commands: | |
export version=$(go run build/rpm/main.go version) >> $BASH_ENV | ||
echo "git tag $version" | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "circleci-klaytn" | ||
git config --global user.name "circleci-kaia" | ||
git tag -a $version -m "$CIRCLE_STAGE" | ||
git push origin $version | ||
- run: | ||
|
@@ -600,7 +600,7 @@ workflows: | |
requires: | ||
- pass-tests | ||
extra_build_args: '--platform=linux/amd64' | ||
image: klaytn/klaytn | ||
image: kaiachain/kaia | ||
tag: dev | ||
executor: docker/docker | ||
use-remote-docker: true | ||
|
@@ -616,7 +616,7 @@ workflows: | |
requires: | ||
- pass-tests | ||
extra_build_args: '--platform=linux/amd64' | ||
image: klaytn/klaytn | ||
image: kaiachain/kaia | ||
tag: latest,$CIRCLE_TAG | ||
executor: docker/docker | ||
use-remote-docker: true | ||
|
@@ -682,7 +682,7 @@ workflows: | |
- major-tagging: | ||
filters: | ||
branches: | ||
only: master | ||
only: main | ||
|
||
nightly-coverage: | ||
triggers: | ||
|
@@ -712,4 +712,4 @@ workflows: | |
branches: | ||
only: dev | ||
jobs: | ||
- rpc-tester-report | ||
- rpc-tester-report |
This file contains 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
This file contains 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
This file contains 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
This file contains 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