Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buildkite plugin for shared SBC code #1

Merged
merged 45 commits into from
Jul 29, 2022
Merged

Buildkite plugin for shared SBC code #1

merged 45 commits into from
Jul 29, 2022

Conversation

rwadstein
Copy link
Member

@rwadstein rwadstein commented Jul 27, 2022

This plugin supports pushing images and params to AWS accounts and pushing ruby gems to jfrog.

There are currently 4 actions it supports: build, push_image, push_param, publish_gem.

build

No settings required except for a .buildkite/build.sh file in the repository.
If any custom functions need to be defined, define it in a .buildkite/custom_functions.sh file.

push_image

settings for environment, landscape, and account_id need to be defined in the pipeline.
For example

          - sage/sbc-shared#initial_code:
              action: push_param
              environment: production
              landscape: eu
              account_id: "700326549305"

If the qa environment you push to takes advantage of a database image used for testing, then add the env of HAS_DB_IMAGE: true

push_param

settings for environment, landscape, and account_id must be defined in the pipeline.
For example

          - sage/sbc-shared#initial_code:
              action: push_param
              environment: production
              landscape: eu
              account_id: "700326549305"

publish_gem

If the repository is used for a ruby gem, then no other settings are needed aside from the action. It does require the APP env to be passed into the container.
This only supports gem pushing via a docker container that has the gem built and assumes the docker container will execute .buildkite/releash.sh as a command.
It also had a dependency on the compose file or docker setting to mount the .buildkite folder in the container.
The reason is because the publish_gem action simply copies the release.sh script from the plugin. The docker container needs to invoke the command.
Here is an example usage:
Docker compose file

  client:
    image: s1_user_client
    environment:
      - APP
      - ART_USER
      - ART_PASS
      - CI_BRANCH
    volumes:
      - .buildkite:/usr/src/app/.buildkite

pipeline file

      - docker-compose#v3.9.0:
          run: client
          command: [".buildkite/release.sh"]
      - sage/sbc-shared#initial_code:
          action: publish_gem

@rwadstein rwadstein requested review from noodl and adamgeorgeson July 27, 2022 20:48
@rwadstein rwadstein self-assigned this Jul 27, 2022
@rwadstein rwadstein merged commit d15c57f into master Jul 29, 2022
@rwadstein rwadstein deleted the initial_code branch July 29, 2022 02:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant