diff --git a/.circleci/base_config.yml b/.circleci/base_config.yml index f42c581ce7..3c76474e50 100644 --- a/.circleci/base_config.yml +++ b/.circleci/base_config.yml @@ -273,7 +273,7 @@ commands: fi cd /home/circleci/project/docs-hugo/site - git config user.email "daniele@arangodb.com" + git config user.email "simran@arangodb.com" git config user.name "CircleCI Job" git add data/ content/ git commit --allow-empty -m "[skip ci] Automatic commit of generated files from CircleCI" @@ -289,28 +289,50 @@ commands: git push fi - commit-api-docs: - description: Commit api-docs files to api-docs repository - parameters: - version: - type: string - default: "" - tag: - type: string - default: "" + +jobs: + update-vendor: + docker: + - image: cimg/go:1.21.3 steps: - - run: - name: Clone api-docs repo + - add_ssh_keys: + fingerprints: + # GitHub Deploy Key SHA256:95F/qmjGDkD1MS5Q6UVPbVGpy97JZrHi/4AIxka+vZ4 + - "bc:4d:f3:df:53:ad:22:d8:60:5d:10:d8:fd:74:d2:cd" + - run: ssh-keyscan github.com >> ~/.ssh/known_hosts && cat ~/.ssh/known_hosts + - run: + name: Clone docs repo command: | - git clone git@github.com:arangodb/api-docs.git - cd /home/circleci/project/api-docs - cp /home/circleci/project/docs-hugo/site/data/<< parameters.version >>/api-docs.json /home/circleci/project/api-docs/ - git commit --allow-empty -m 'Commit api-docs << parameters.tag >>' api-docs.json - git tag -f << parameters.tag >> - git push -f origin << parameters.tag >> - git push -f + git clone --depth 1 git@github.com:arangodb/docs-hugo.git --branch $CIRCLE_BRANCH + - run: + name: Update vendor dependencies folder + command: | + cd docs-hugo/toolchain/arangoproxy + rm -r vendor go.sum + go mod tidy + go mod vendor + - run: + name: Create PR with new vendor folder + command: | + cd docs-hugo/toolchain/arangoproxy + git checkout -b update-vendor-$CIRCLE_BUILD_NUM + + git config user.email "simran@arangodb.com" + git config user.name "CircleCI Job" + git add vendor/ go.mod go.sum + git commit --allow-empty -m "[skip ci] Update ArangoProxy vendor/ folder" + + git push -u origin update-vendor-$CIRCLE_BUILD_NUM + curl -X POST https://candid-daffodil-f96315.netlify.app/.netlify/functions/circleci \ + --header 'docs-webhook-event: scheduled-create-pr' \ + --header "docs-branch-name: update-vendor-$CIRCLE_BUILD_NUM" \ + --header "docs-pr-title: [CircleCI Generated] update-vendor-$CIRCLE_BUILD_NUM" \ + --header "docs-pr-body: Automatically updated ArangoProxy vendor folder CircleCI << pipeline.parameters.workflow >> workflow" + - persist_to_workspace: + root: . + paths: + - docs-hugo -jobs: create-docs-images: parameters: architecture: @@ -324,10 +346,8 @@ jobs: image: ubuntu-2004:current resource_class: << parameters.executor >> steps: - - run: - name: Clone docs repo - command: | - git clone --depth 1 https://github.com/arangodb/docs-hugo.git --branch $CIRCLE_BRANCH + - attach_workspace: + at: . - run: name: Create docker images command: | @@ -341,11 +361,11 @@ jobs: name: Push docker images command: | cd docs-hugo/toolchain/docker - echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USER" --password-stdin + # echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USER" --password-stdin - docker push arangodb/docs-hugo:site-<< parameters.architecture >> - docker push arangodb/docs-hugo:arangoproxy-<< parameters.architecture >> - docker push arangodb/docs-hugo:toolchain-<< parameters.architecture >> + # docker push arangodb/docs-hugo:site-<< parameters.architecture >> + # docker push arangodb/docs-hugo:arangoproxy-<< parameters.architecture >> + # docker push arangodb/docs-hugo:toolchain-<< parameters.architecture >> plain-build: @@ -387,13 +407,6 @@ jobs: docker compose -f docker-compose.plain-build.yml up --abort-on-container-exit - upload-summary: summary-name: "plain-build-summary" - - when: - condition: - equal: [ "api-docs", << pipeline.parameters.workflow >> ] - steps: - - commit-api-docs: - version: << pipeline.parameters.version >> - tag: << pipeline.parameters.tag >> - persist_to_workspace: root: . @@ -528,23 +541,25 @@ jobs: - - - - workflows: create-docs-images-amd64: when: { equal: [ create-docs-images-amd64, << pipeline.parameters.workflow >> ] } jobs: + - update-vendor - create-docs-images: architecture: "amd64" executor: "medium" + requires: + - update-vendor create-docs-images-arm64: when: { equal: [ create-docs-images-arm64, << pipeline.parameters.workflow >> ] } jobs: + - update-vendor - create-docs-images: architecture: "arm64" executor: "arm.medium" + requires: + - update-vendor plain: when: { equal: [ plain-build, << pipeline.parameters.workflow >> ] } jobs: @@ -553,11 +568,6 @@ workflows: requires: - plain-build - api-docs: - when: { equal: [ api-docs, << pipeline.parameters.workflow >> ] } - jobs: - - plain-build - release: when: { equal: [ release, << pipeline.parameters.workflow >> ] } jobs: @@ -583,4 +593,3 @@ workflows: - commit-generated: requires: - approve-workflow - diff --git a/.circleci/config.yml b/.circleci/config.yml index bbe2de2f52..dc90435f3c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,7 +8,7 @@ orbs: parameters: workflow: type: enum - enum: [no-op, plain-build, generate, api-docs, release, compile, generate-scheduled, commit-generated, generate-oasisctl, create-docs-images-amd64, create-docs-images-arm64] + enum: [no-op, plain-build, generate, release, compile, generate-scheduled, commit-generated, generate-oasisctl, create-docs-images-amd64, create-docs-images-arm64] default: no-op deploy-url: diff --git a/toolchain/arangoproxy/go.mod b/toolchain/arangoproxy/go.mod index 7299449b57..f4ab8eb8ca 100644 --- a/toolchain/arangoproxy/go.mod +++ b/toolchain/arangoproxy/go.mod @@ -6,4 +6,3 @@ require ( github.com/dlclark/regexp2 v1.7.0 gopkg.in/yaml.v3 v3.0.1 ) - diff --git a/toolchain/arangoproxy/go.sum b/toolchain/arangoproxy/go.sum index 6076f635f6..14e0a4b7c4 100644 --- a/toolchain/arangoproxy/go.sum +++ b/toolchain/arangoproxy/go.sum @@ -1,41 +1,6 @@ -github.com/arangodb/go-driver v1.3.3 h1:UEV74zLYvvAvQgQgNHORdvaADtDX2uTVZH+1H7WAFAQ= -github.com/arangodb/go-driver v1.3.3/go.mod h1:5GAx3XvK72DJPhJgyjZOtYAGc4SpY7rZDb3LyhCvLcQ= -github.com/arangodb/go-velocypack v0.0.0-20200318135517-5af53c29c67e h1:Xg+hGrY2LcQBbxd0ZFdbGSyRKTYMZCfBbw/pMJFOk1g= -github.com/arangodb/go-velocypack v0.0.0-20200318135517-5af53c29c67e/go.mod h1:mq7Shfa/CaixoDxiyAAc5jZ6CVBAyPaNQCGS7mkj4Ho= -github.com/coreos/go-iptables v0.4.3/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dchest/uniuri v0.0.0-20160212164326-8902c56451e9/go.mod h1:GgB8SF9nRG+GqaDtLcwJZsQFhcogVCJ79j4EdT0c2V4= github.com/dlclark/regexp2 v1.7.0 h1:7lJfhqlPssTb1WQx4yvTHN0uElPEv52sbaECrAQxjAo= github.com/dlclark/regexp2 v1.7.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= -github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= -github.com/rs/zerolog v1.19.0/go.mod h1:IzD0RJ65iWH0w97OQQebJEvTZYvsCUm9WVLWBQrJRjo= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/tools v0.0.0-20190828213141-aed303cbaa74/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=