Skip to content

Commit

Permalink
fix: empty commit for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Filipe Forattini committed Jul 27, 2022
1 parent c91b13a commit 9f07c4b
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 30 deletions.
2 changes: 2 additions & 0 deletions .github/actions/config-scrapper/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ outputs:
description: ""
deploy_tag:
description: ""
deploy_fullname_tag:
description: ""
event:
description: ""
environment:
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/config-scrapper/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .github/actions/config-scrapper/index.js.map

Large diffs are not rendered by default.

25 changes: 1 addition & 24 deletions .github/workflows/app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,8 @@ jobs:
# Deploy #
#--------------------------------------------------#
Deploy:
environment: ${{ inputs.environment }}
runs-on: ubuntu-latest
environment: env/${{needs.Setup.outputs.Environment}}

needs:
- Setup
Expand Down Expand Up @@ -313,29 +313,6 @@ jobs:
echo "next version = $NEXT_VERSION"
echo "::set-output name=version::$NEXT_VERSION"
- name: Config | Load setup configs
env:
ENVIRONMENTS_AS_NAMESPACES: ${{ inputs.environmentsAsNamespaces }}
PIPELINE_SETUP: ${{ needs.Setup.outputs.PipelineConfig }}
id: deploy_setup
run: |
echo "::set-output name=deploy_as_k8s::$(echo $PIPELINE_SETUP | jq -r '.deploy.deployAsK8s')"
echo "::set-output name=deploy_as_chart::$(echo $PIPELINE_SETUP | jq -r '.deploy.deployAsChart')"
echo "::set-output name=has_dev_secrets::$(echo $PIPELINE_SETUP | jq -r '.deploy.secrets.dev')"
echo "::set-output name=has_dev_configs::$(echo $PIPELINE_SETUP | jq -r '.deploy.configs.dev')"
echo "::set-output name=has_dev_dependencies::$(echo $PIPELINE_SETUP | jq -r '.deploy.dependencies.dev')"
echo "::set-output name=deploy_ecosystem::$(echo $PIPELINE_SETUP | jq -r '.deploy.ecosystem')"
echo "::set-output name=deploy_organization::$(echo $PIPELINE_SETUP | jq -r '.deploy.organization')"
echo "::set-output name=deploy_container_registry::$(echo $PIPELINE_SETUP | jq -r '.deploy.containerRegistry')"
echo "::set-output name=deploy_repository::$(echo $PIPELINE_SETUP | jq -r '.deploy.repository')"
echo "::set-output name=deploy_tag::$(echo $PIPELINE_SETUP | jq -r '.deploy.commitTag')"
echo "::set-output name=run_started_at::$(echo $PIPELINE_SETUP | jq -r '.run.startedAt')"
case $ENVIRONMENTS_AS_NAMESPACES in
"true") echo "::set-output name=deploy_namespace::$(echo $PIPELINE_SETUP | jq -r '.deploy.namespaces.dev')";;
"false") echo "::set-output name=deploy_namespace::$(echo $PIPELINE_SETUP | jq -r '.deploy.namespace')";;
*) echo "::set-output name=deploy_namespace::$(echo $PIPELINE_SETUP | jq -r '.deploy.namespace')";;
esac
- name: Config | Kubectl config file
env:
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
Expand Down
2 changes: 2 additions & 0 deletions src/actions/config-scrapper/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ outputs:
description: ""
deploy_tag:
description: ""
deploy_fullname_tag:
description: ""
event:
description: ""
environment:
Expand Down
12 changes: 8 additions & 4 deletions src/actions/config-scrapper/src/deployment.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = async (analysis) => {
analysis.outputs.environment = analysis.environment
}

let tag = `${registry}:c-${commitSha}`
let tag = `c-${commitSha}`
let tags = [
`latest`,
`c-${commitSha}`,
Expand All @@ -30,7 +30,7 @@ module.exports = async (analysis) => {
]

if (_.isString(analysis.environment)) {
tag = `${registry}:e-${analysis.environment}-c-${commitSha}`
tag = `e-${analysis.environment}-c-${commitSha}`
tags = tags.concat([
`e-${analysis.environment}-latest`,
`e-${analysis.environment}-c-${commitSha}`,
Expand Down Expand Up @@ -61,11 +61,14 @@ module.exports = async (analysis) => {
}
}

tags = tags.map(t => `${registry}:${t}`)
const fullname_tag = `${registry}:${tag}`
const fullname_tags = tags.map(t => `${registry}:${t}`)

analysis.deployment.tag = tag
analysis.deployment.tags = tags
analysis.deployment.tagsString = tags.join(', ')
analysis.deployment.fullname_tag = fullname_tag
analysis.deployment.fullname_tags = fullname_tags
analysis.deployment.tagsString = fullname_tags.join(', ')
core.info(templateInfo('deployment', `tag = ${tag}`))

let args = ""
Expand Down Expand Up @@ -115,6 +118,7 @@ module.exports = async (analysis) => {
// outputs
analysis.outputs.registry = analysis.deployment.registry
analysis.outputs.deploy_tag = analysis.deployment.tag
analysis.outputs.deploy_fullname_tag = analysis.deployment.fullname_tag
analysis.outputs.build_args = analysis.deployment.build_args
analysis.outputs.build_tags = analysis.deployment.tagsString
analysis.outputs.build_labels = analysis.deployment.labelsString
Expand Down

0 comments on commit 9f07c4b

Please sign in to comment.