#release-engineering (2021-11)

jenkins_ci All things CI/CD. Specific emphasis on Codefresh and CodeBuild with CodePipeline.

CI/CD Discussions

Archive: https://archive.sweetops.com/release-engineering/

2021-11-26

DaniC avatar
DaniC

hi folks, in one of the office hours or other videos it was mentioned a CD pattern using GHA instead of codefresh/ spacelift. If i remember correctly it was said that a pattern of below could be achieved:

CI:

• TF config or modules in one git repo

• GHA to build and upload artefacts - ie lambda docker/ layer/ zip file to S3/ ECR (not use tf lambda modul to deal with packaging CD:

• a different / standalone git repo which will run TF plan/ apply to v envs. Q:

What i don’t get how the source repos (in case of poly-repo where various TF modules are scattered in N GH org repos) will:

• be synced to CD git repo? What sort of dir structure layout will be on the CD repo to cover for multiple deployments for different root modules ?

• any metadata consumed by CD and generated by CI - how will that be available ? i.e each lambda zip file or docker image / or TF code will generate a new tag/ release … that needs to be consumed somehow by CD GHA workflows no ? anyway i forgot who made the claim about using GHA as CD, will love to understand more the pattern

2021-11-25

2021-11-24

DaniC avatar
DaniC

hi folks, has anyone managed to get an idea the cost between GHA/ CodeFresh & Spacelift? Asking as i’ve been using GHA which is dead cheap however when i’m looking at the others i see 250$/m and that limited to 5 users.

Alex Jurkiewicz avatar
Alex Jurkiewicz

the billing models are not the same. GHA charges per minute, while Spacelift charges a flat per-worker rate. You would need to do maths based on how many minutes you use per month to compare them

DaniC avatar
DaniC

right, i see. Thanks @ for sharing this info, i’ll dig more into it

2021-11-22

loren avatar
loren

anyone run into issues with github-actions and using an env value that starts with https://? e.g.

    env:
      REPO_ENDPOINT: 'https://...'

it keeps stripping the https:// from the env in the log, but i can’t find any docs on that behavior. and i’m pretty sure the yaml is fine?

loren avatar
loren

i even tried an extra set of quotes…

    env:
      REPO_ENDPOINT: '"https://..."'

which i can see makes it into the env and the run command as "". so it seems to be a specific filter for urls?

loren avatar
loren

mystery deepens… even removing the https:// from the env, and hardcoding it in the run command, it still gets stripped?

    env:
      REPO_ENDPOINT: ...
    run: aws --endpoint-url https://${{ env.REPO_ENDPOINT }}

and it prints as

aws --endpoint-url ...
loren avatar
loren

ok, it’s not the https:// specifically. it happens when the env value contains a period . what fresh hell is this?

loren avatar
loren

escaping it as \. in the env avoids stripping https:// but doesn’t remove the \ from the command…

loren avatar
loren

leading and trailing periods are fine, so either of these work: .wut or wut. but this does not work: wut.wut

loren avatar
loren
    env:
      REPO_ENDPOINT: wut.wut
    steps:
      - name: wut
        run: echo https://${{ env.REPO_ENDPOINT }}
Run echo wut.wut
  echo wut.wut
  shell: /usr/bin/bash -e {0}
  env:
    REPO_ENDPOINT: wut.wut

wut.wut

loren avatar
loren

omg, can’t even pass it as a literal string expression, ${{ 'wut.wut' }}

loren avatar
loren

omg i am never getting that hour back. the issue with it stripping the https:// from the command is just a wonky issue with how github actions outputs the log. the value is passed to the command just fine. total red herring.

actual issue was due to aws v2 just returning a botocore object when there is an IMDS endpoint on the host, but it can’t figure out the region from that endpoint (which happens on Azure DevOps runners)… https://github.com/aws/aws-cli/issues/5262

Executable breaks GitHub action - python version works · Issue #5262 · aws/aws-cli attachment image

Confirm by changing [ ] to [x] below to ensure that it's a bug: I've gone though the User Guide and the API reference I've searched for previous similar issues and didn't find any s…

loren avatar
loren

added the AWS_DEFAULT_REGION env and it was fine

    keyboard_arrow_up