-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
90 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| name: Sync to CodeCommit | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
|
|
||
| jobs: | ||
| sync: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout the repository | ||
| uses: actions/checkout@v2 | ||
|
|
||
| - name: Configure Git for CodeCommit | ||
| run: | | ||
| git config --global credential.helper '!aws codecommit credential-helper $@' | ||
| git config --global credential.UseHttpPath true | ||
| - name: Sync to CodeCommit - Goss Testing | ||
| run: | | ||
| git remote add goss-upstream ssh://git-codecommit.us-gov-west-1.amazonaws.com/v1/repos/image-pipeline-goss-testing | ||
| git push goss-upstream master --force | ||
| - name: Sync to CodeCommit - Ansible Playbooks | ||
| run: | | ||
| git remote add ansible-upstream ssh://git-codecommit.us-gov-west-1.amazonaws.com/v1/repos/image-pipeline-ansible-playbooks | ||
| git push ansible-upstream master --force |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| --- | ||
| - name: RHEL ARM Baseline Configuration | ||
| hosts: all | ||
| become: true | ||
| tasks: | ||
| - name: Ensure latest packages are installed | ||
| yum: | ||
| name: '*' | ||
| state: latest | ||
| - name: Install required packages | ||
| yum: | ||
| name: | ||
| - vim | ||
| - git | ||
| - curl | ||
| state: present | ||
| - name: Create a user | ||
| user: | ||
| name: exampleuser | ||
| state: present | ||
| groups: wheel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| version: 0.2 | ||
|
|
||
| phases: | ||
| install: | ||
| runtime-versions: | ||
| python: 3.11 | ||
| commands: | ||
| - echo "Installing necessary dependencies" | ||
| - pip install ansible | ||
| - pip install awscli | ||
| build: | ||
| commands: | ||
| - echo "Running Packer build" | ||
| - packer build -var project_name=rhel-arm-image-pipeline-demo -var ansible_dir=${CODEBUILD_SRC_DIR_SourceAnsibleOutput} modules/image-pipeline/build.pkr.hcl | ||
| post_build: | ||
| commands: | ||
| - echo "Saving the AMI ID" | ||
| - packer build -var 'ami_id=$(cat ami_id.txt)' modules/image-pipeline/build.pkr.hcl | ||
|
|
||
| artifacts: | ||
| files: | ||
| - ami_id.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters