From ba4fb305ae1cffa75c62f3a63c20d95ed6c9905b Mon Sep 17 00:00:00 2001 From: ronger Date: Tue, 11 Oct 2022 00:33:16 +0000 Subject: [PATCH 1/2] Edit .onedev-buildspec.yml --- .onedev-buildspec.yml | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/.onedev-buildspec.yml b/.onedev-buildspec.yml index 599534b..8a3293d 100644 --- a/.onedev-buildspec.yml +++ b/.onedev-buildspec.yml @@ -34,7 +34,6 @@ jobs: path: /root/.npm timeout: 3600 - name: Build Docker Image - jobExecutor: internal steps: - !CheckoutStep name: Checkout Code @@ -47,6 +46,7 @@ jobs: tags: rymcu/nebula:latest publish: false condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL + jobExecutor: internal triggers: - !TagCreateTrigger projects: nebula @@ -56,3 +56,44 @@ jobs: cpuRequirement: 250 memoryRequirement: 256 timeout: 3600 +- name: Pull from GitHub + steps: + - !PullRepository + name: Pull from GitHub + remoteUrl: https://github.com/ronger-x/nebula + syncToChildProject: false + passwordSecret: access_token + refs: refs/heads/* refs/tags/* + withLfs: false + force: false + condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL + triggers: + - !ScheduleTrigger + cronExpression: 0 0 1 * * ? + projects: nebula + retryCondition: never + maxRetries: 3 + retryDelay: 30 + cpuRequirement: 250 + memoryRequirement: 256 + timeout: 3600 +- name: Push to GitHub + steps: + - !PushRepository + name: Push to GitHub + remoteUrl: https://github.com/ronger-x/nebula + passwordSecret: access_token + withLfs: false + force: false + condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL + triggers: + - !BranchUpdateTrigger + projects: nebula + - !TagCreateTrigger + projects: nebula + retryCondition: never + maxRetries: 3 + retryDelay: 30 + cpuRequirement: 250 + memoryRequirement: 256 + timeout: 3600 From 2b10747e97f7076d0a3fcf4939373a24476326c0 Mon Sep 17 00:00:00 2001 From: ronger Date: Tue, 11 Oct 2022 11:13:49 +0800 Subject: [PATCH 2/2] :bug: fix query is not defined --- pages/portfolios.vue | 2 +- pages/products.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/portfolios.vue b/pages/portfolios.vue index f88e62f..e0c2caf 100644 --- a/pages/portfolios.vue +++ b/pages/portfolios.vue @@ -17,7 +17,7 @@ export default { name: "Portfolios", components: {PortfolioList}, fetch() { - let {store, params, error} = this.$nuxt.context + let {store, query, error} = this.$nuxt.context return Promise.all([ store .dispatch('portfolio/fetchList', {page: query.page || 1}) diff --git a/pages/products.vue b/pages/products.vue index 7f0ec90..de00d76 100644 --- a/pages/products.vue +++ b/pages/products.vue @@ -14,7 +14,7 @@ export default { name: "products", components: {ProductList}, fetch() { - let {store, params, error} = this.$nuxt.context + let {store, query, error} = this.$nuxt.context return Promise.all([ store .dispatch('product/fetchList', {page: query.page || 1})