Skip to content

Commit

Permalink
Produce 3.2.0 from main branch (#6753)
Browse files Browse the repository at this point in the history
* Produce 3.2.0 from main

* CI for main and feature branch prefix

* master -> main

* nolint OnDemandImportForWrite which will be replaced in CBG-3768
  • Loading branch information
bbrks authored Apr 5, 2024
1 parent 629ceb8 commit 1879730
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 33 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,16 @@ on:
push:
branches:
- 'master'
- 'main'
- 'release/*'
- 'feature/*'
- 'beryllium'
- 'CBG*'
- 'ci-*'
pull_request:
branches:
- 'master'
- 'main'
- 'release/*'
- 'beryllium'

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/openapi-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ on:
- 'docs/api/**'
branches:
- 'master'
- 'main'
- 'release/*'
- 'beryllium'

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ on:
- 'docs/api/**'
branches:
- 'master'
- 'main'
- 'release/*'
- 'feature/*'
- 'beryllium'
- 'CBG*'
- 'ci-*'
Expand All @@ -26,6 +28,7 @@ on:
- 'docs/api/**'
branches:
- 'master'
- 'main'
- 'release/*'
- 'beryllium'

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ It's great if you can scan the open issues to see if your problem/idea has been

## Version

Please indicate **what version of the software** you're using. If you compiled it yourself from source, it helps if you give the Git commit ID, or at least the branch name and date ("I last pulled from master on 6/30.")
Please indicate **what version of the software** you're using. If you compiled it yourself from source, it helps if you give the Git commit ID, or at least the branch name and date ("I last pulled from main on 6/30.")

If the bug involves replication, also indicate what software and version is on the other end of the line, i.e. "Couchbase Lite Android 1.0" or "Sync Gateway 1.0" or "Sync Gateway commit f3d3229c" or "CouchDB 1.6".

Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
FROM golang:1.11.5-stretch as builder

# Customize this with the commit hash or branch name you want to build
ARG COMMIT=master
ARG COMMIT=main

# Refresh apt repository, install git
RUN apt-get update && apt-get install -y \
Expand All @@ -25,7 +25,7 @@ RUN git config --global color.ui false

# Download and run the bootstrap.sh script which will download and invoke the repo
# tool to grap all required repositories
RUN wget https://raw.githubusercontent.com/couchbase/sync_gateway/master/bootstrap.sh && \
RUN wget https://raw.githubusercontent.com/couchbase/sync_gateway/main/bootstrap.sh && \
cat bootstrap.sh && \
chmod +x bootstrap.sh && \
./bootstrap.sh -c $COMMIT -e ce
Expand Down
26 changes: 13 additions & 13 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ pipeline {
stage('Unit') {
stages {
stage('CE') {
when { branch 'master' }
when { branch 'main' }
steps{
// Travis-related variables are required as coveralls.io only officially supports a certain set of CI tools.
withEnv(["PATH+GO=${env.GOTOOLS}/bin", "TRAVIS_BRANCH=${env.BRANCH}", "TRAVIS_PULL_REQUEST=${env.CHANGE_ID}", "TRAVIS_JOB_ID=${env.BUILD_NUMBER}"]) {
Expand Down Expand Up @@ -332,11 +332,11 @@ pipeline {

stage('Integration') {
stages {
stage('Master') {
when { branch 'master' }
stage('main') {
when { branch 'main' }
steps {
echo 'Queueing Integration test for branch "master" ...'
// Queues up an async integration test run using default build params (master branch),
echo 'Queueing Integration test for branch "main" ...'
// Queues up an async integration test run using default build params (main branch),
// but waits up to an hour for batches of PR merges before actually running (via quietPeriod)
build job: 'MasterIntegration', quietPeriod: 3600, wait: false
}
Expand All @@ -362,9 +362,9 @@ pipeline {
}
}
stage('Benchmarks'){
when { branch 'master' }
when { branch 'main' }
steps{
echo 'Queueing Benchmark Run test for branch "master" ...'
echo 'Queueing Benchmark Run test for branch "main" ...'
// TODO: Add this back with new system
// build job: 'sync-gateway-benchmark', parameters: [string(name: 'SG_COMMIT', value: env.SG_COMMIT)], wait: false
}
Expand All @@ -389,25 +389,25 @@ pipeline {
// archive non-verbose outputs upon failure for inspection (each verbose output is conditionally archived on stage failure)
archiveArtifacts excludes: 'verbose_*.out', artifacts: '*.out', fingerprint: false, allowEmptyArchive: true
script {
if ("${env.BRANCH_NAME}" == 'master') {
slackSend color: "danger", message: "Failed tests in master SGW pipeline: ${currentBuild.fullDisplayName}\nAt least one test failed: ${env.BUILD_URL}"
if ("${env.BRANCH_NAME}" == 'main') {
slackSend color: "danger", message: "Failed tests in main SGW pipeline: ${currentBuild.fullDisplayName}\nAt least one test failed: ${env.BUILD_URL}"
}
}
}
failure {
// archive non-verbose outputs upon failure for inspection (each verbose output is conditionally archived on stage failure)
archiveArtifacts excludes: 'verbose_*.out', artifacts: '*.out', fingerprint: false, allowEmptyArchive: true
script {
if ("${env.BRANCH_NAME}" == 'master') {
slackSend color: "danger", message: "Build failure!!!\nA build failure occurred in the master SGW pipeline: ${currentBuild.fullDisplayName}\nSomething went wrong building: ${env.BUILD_URL}"
if ("${env.BRANCH_NAME}" == 'main') {
slackSend color: "danger", message: "Build failure!!!\nA build failure occurred in the main SGW pipeline: ${currentBuild.fullDisplayName}\nSomething went wrong building: ${env.BUILD_URL}"
}
}
}
aborted {
archiveArtifacts excludes: 'verbose_*.out', artifacts: '*.out', fingerprint: false, allowEmptyArchive: true
script {
if ("${env.BRANCH_NAME}" == 'master') {
slackSend color: "danger", message: "Master SGW pipeline build aborted: ${currentBuild.fullDisplayName}\nCould be due to build timeout: ${env.BUILD_URL}"
if ("${env.BRANCH_NAME}" == 'main') {
slackSend color: "danger", message: "main SGW pipeline build aborted: ${currentBuild.fullDisplayName}\nCould be due to build timeout: ${env.BUILD_URL}"
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![GoDoc](https://godoc.org/github.com/couchbase/sync_gateway?status.svg)](https://godoc.org/github.com/couchbase/sync_gateway)
[![Go Report Card](https://goreportcard.com/badge/github.com/couchbase/sync_gateway)](https://goreportcard.com/report/github.com/couchbase/sync_gateway)
[![Code Coverage](https://img.shields.io/coveralls/github/couchbase/sync_gateway.svg)](https://coveralls.io/github/couchbase/sync_gateway)
[![License](https://img.shields.io/badge/license-BSL%201.1-lightgrey)](https://github.com/couchbase/sync_gateway/blob/master/LICENSE)
[![License](https://img.shields.io/badge/license-BSL%201.1-lightgrey)](https://github.com/couchbase/sync_gateway/blob/main/LICENSE)

Sync Gateway is a horizontally scalable web server that securely manages the access control and
synchronization of data between [Couchbase Lite][CB_LITE] and [Couchbase Server][CB_SERVER].
Expand Down Expand Up @@ -46,7 +46,7 @@ See the [Extended Build Instructions](docs/BUILD.md) to build with dependency pi

## License

[Business Source License 1.1](https://github.com/couchbase/sync_gateway/blob/master/LICENSE)
[Business Source License 1.1](https://github.com/couchbase/sync_gateway/blob/main/LICENSE)

[CB_MOBILE]: https://www.couchbase.com/products/mobile
[CB_GATEWAY]: https://www.couchbase.com/products/sync-gateway
Expand Down
4 changes: 2 additions & 2 deletions db/crud.go
Original file line number Diff line number Diff line change
Expand Up @@ -833,15 +833,15 @@ func (db *DatabaseCollectionWithUser) OnDemandImportForWrite(ctx context.Context
// Use an admin-scoped database for import
importDb := DatabaseCollectionWithUser{DatabaseCollection: db.DatabaseCollection, user: nil}

importedDoc, importErr := importDb.ImportDoc(ctx, docid, doc, isDelete, nil, ImportOnDemand)
importedDoc, importErr := importDb.ImportDoc(ctx, docid, doc, isDelete, nil, ImportOnDemand) // nolint:staticcheck

if importErr == base.ErrImportCancelledFilter {
// Document exists, but existing doc wasn't imported based on import filter. Treat write as insert
doc.SyncData = SyncData{History: make(RevTree)}
} else if importErr != nil {
return importErr
} else {
doc = importedDoc
doc = importedDoc // nolint:staticcheck
}
return nil
}
Expand Down
4 changes: 2 additions & 2 deletions manifest/default.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ licenses/APL2.txt.
<!-- Build Scripts (required on CI servers) -->
<project name="product-texts" path="product-texts" remote="couchbase"/>
<project name="build" path="cbbuild" remote="couchbase" revision="cedf9d4ec929eac7e61f8e86488aeac5402c8563">
<annotation name="VERSION" value="3.3.0" keep="true"/>
<annotation name="VERSION" value="3.2.0" keep="true"/>
<annotation name="BLD_NUM" value="@BLD_NUM@" keep="true"/>
<annotation name="RELEASE" value="@RELEASE@" keep="true"/>
</project>


<!-- Sync Gateway -->
<project name="sync_gateway" path="sync_gateway" remote="couchbase" />
<project name="sync_gateway" path="sync_gateway" remote="couchbase" revision="main" />

</manifest>
13 changes: 2 additions & 11 deletions manifest/product-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
"product": "sync_gateway",
"manifests": {
"manifest/default.xml": {
"release": "3.3.0",
"release": "3.2.0",
"release_name": "Couchbase Sync Gateway",
"production": true,
"interval": 30,
"go_version": "1.21.8",
"trigger_blackduck": true,
"start_build": 1
"start_build": 320
},
"manifest/1.4.0.xml": {
"do-build": false,
Expand Down Expand Up @@ -517,15 +517,6 @@
"trigger_blackduck": true,
"start_build": 586
},
"manifest/3.2.xml": {
"release": "3.2.0",
"release_name": "Couchbase Sync Gateway",
"production": true,
"interval": 30,
"go_version": "1.21.8",
"trigger_blackduck": true,
"start_build": 318
},
"manifest/4.0.xml": {
"release": "4.0.0",
"release_name": "Couchbase Sync Gateway 4.0.0",
Expand Down

0 comments on commit 1879730

Please sign in to comment.