diff --git a/awx/ui_next/src/components/Lookup/ProjectLookup.jsx b/awx/ui_next/src/components/Lookup/ProjectLookup.jsx
index dcc16669b8..5c8ec16dee 100644
--- a/awx/ui_next/src/components/Lookup/ProjectLookup.jsx
+++ b/awx/ui_next/src/components/Lookup/ProjectLookup.jsx
@@ -105,6 +105,7 @@ function ProjectLookup({
[`git`, i18n._(t`Git`)],
[`hg`, i18n._(t`Mercurial`)],
[`svn`, i18n._(t`Subversion`)],
+ [`archive`, i18n._(t`Remote Archive`)],
[`insights`, i18n._(t`Red Hat Insights`)],
],
},
diff --git a/awx/ui_next/src/components/UserAndTeamAccessAdd/getResourceAccessConfig.js b/awx/ui_next/src/components/UserAndTeamAccessAdd/getResourceAccessConfig.js
index cd922c23aa..fd19a58299 100644
--- a/awx/ui_next/src/components/UserAndTeamAccessAdd/getResourceAccessConfig.js
+++ b/awx/ui_next/src/components/UserAndTeamAccessAdd/getResourceAccessConfig.js
@@ -87,6 +87,7 @@ export default function getResourceAccessConfig(i18n) {
[`git`, i18n._(t`Git`)],
[`hg`, i18n._(t`Mercurial`)],
[`svn`, i18n._(t`Subversion`)],
+ [`archive`, i18n._(t`Remote Archive`)],
[`insights`, i18n._(t`Red Hat Insights`)],
],
},
@@ -154,6 +155,7 @@ export default function getResourceAccessConfig(i18n) {
[`git`, i18n._(t`Git`)],
[`hg`, i18n._(t`Mercurial`)],
[`svn`, i18n._(t`Subversion`)],
+ [`archive`, i18n._(t`Remote Archive`)],
[`insights`, i18n._(t`Red Hat Insights`)],
],
},
diff --git a/awx/ui_next/src/screens/Project/ProjectAdd/ProjectAdd.test.jsx b/awx/ui_next/src/screens/Project/ProjectAdd/ProjectAdd.test.jsx
index a47bb424bf..cb2c16a23f 100644
--- a/awx/ui_next/src/screens/Project/ProjectAdd/ProjectAdd.test.jsx
+++ b/awx/ui_next/src/screens/Project/ProjectAdd/ProjectAdd.test.jsx
@@ -37,6 +37,7 @@ describe('', () => {
['git', 'Git'],
['hg', 'Mercurial'],
['svn', 'Subversion'],
+ ['archive', 'Remote Archive'],
['insights', 'Red Hat Insights'],
],
},
diff --git a/awx/ui_next/src/screens/Project/ProjectEdit/ProjectEdit.test.jsx b/awx/ui_next/src/screens/Project/ProjectEdit/ProjectEdit.test.jsx
index 5b75396d65..5171e0f532 100644
--- a/awx/ui_next/src/screens/Project/ProjectEdit/ProjectEdit.test.jsx
+++ b/awx/ui_next/src/screens/Project/ProjectEdit/ProjectEdit.test.jsx
@@ -49,6 +49,7 @@ describe('', () => {
['git', 'Git'],
['hg', 'Mercurial'],
['svn', 'Subversion'],
+ ['archive', 'Remote Archive'],
['insights', 'Red Hat Insights'],
],
},
diff --git a/awx/ui_next/src/screens/Project/ProjectList/ProjectList.jsx b/awx/ui_next/src/screens/Project/ProjectList/ProjectList.jsx
index 7afbe124b3..b7b8661c1b 100644
--- a/awx/ui_next/src/screens/Project/ProjectList/ProjectList.jsx
+++ b/awx/ui_next/src/screens/Project/ProjectList/ProjectList.jsx
@@ -138,6 +138,7 @@ function ProjectList({ i18n }) {
[`git`, i18n._(t`Git`)],
[`hg`, i18n._(t`Mercurial`)],
[`svn`, i18n._(t`Subversion`)],
+ [`archive`, i18n._(t`Remote Archive`)],
[`insights`, i18n._(t`Red Hat Insights`)],
],
},
diff --git a/awx/ui_next/src/screens/Project/ProjectList/ProjectList.test.jsx b/awx/ui_next/src/screens/Project/ProjectList/ProjectList.test.jsx
index b50e569f18..5a6945d892 100644
--- a/awx/ui_next/src/screens/Project/ProjectList/ProjectList.test.jsx
+++ b/awx/ui_next/src/screens/Project/ProjectList/ProjectList.test.jsx
@@ -61,6 +61,24 @@ const mockProjects = [
},
},
},
+ {
+ id: 4,
+ name: 'Project 4',
+ url: '/api/v2/projects/4',
+ type: 'project',
+ scm_type: 'archive',
+ scm_revision: 'odsd9ajf8aagjisooajfij34ikdj3fs994s4daiaos7',
+ summary_fields: {
+ last_job: {
+ id: 9004,
+ status: 'successful',
+ },
+ user_capabilities: {
+ delete: false,
+ update: false,
+ },
+ },
+ },
];
describe('', () => {
@@ -94,7 +112,7 @@ describe('', () => {
});
wrapper.update();
- expect(wrapper.find('ProjectListItem')).toHaveLength(3);
+ expect(wrapper.find('ProjectListItem')).toHaveLength(4);
});
test('should select project when checked', async () => {
@@ -133,7 +151,7 @@ describe('', () => {
wrapper.update();
const items = wrapper.find('ProjectListItem');
- expect(items).toHaveLength(3);
+ expect(items).toHaveLength(4);
items.forEach(item => {
expect(item.prop('isSelected')).toEqual(true);
});
diff --git a/awx/ui_next/src/screens/Project/shared/ProjectForm.jsx b/awx/ui_next/src/screens/Project/shared/ProjectForm.jsx
index 56c740d73d..5a9f7b1ea7 100644
--- a/awx/ui_next/src/screens/Project/shared/ProjectForm.jsx
+++ b/awx/ui_next/src/screens/Project/shared/ProjectForm.jsx
@@ -25,6 +25,7 @@ import {
GitSubForm,
HgSubForm,
SvnSubForm,
+ ArchiveSubForm,
InsightsSubForm,
ManualSubForm,
} from './ProjectSubForms';
@@ -240,6 +241,13 @@ function ProjectFormFields({
scmUpdateOnLaunch={formik.values.scm_update_on_launch}
/>
),
+ archive: (
+
+ ),
insights: (
', () => {
['git', 'Git'],
['hg', 'Mercurial'],
['svn', 'Subversion'],
+ ['archive', 'Remote Archive'],
['insights', 'Red Hat Insights'],
],
},
diff --git a/awx/ui_next/src/screens/Project/shared/ProjectSubForms/ArchiveSubForm.jsx b/awx/ui_next/src/screens/Project/shared/ProjectSubForms/ArchiveSubForm.jsx
new file mode 100644
index 0000000000..ba65b0b6ff
--- /dev/null
+++ b/awx/ui_next/src/screens/Project/shared/ProjectSubForms/ArchiveSubForm.jsx
@@ -0,0 +1,38 @@
+import 'styled-components/macro';
+import React from 'react';
+import { withI18n } from '@lingui/react';
+import { t } from '@lingui/macro';
+import {
+ UrlFormField,
+ ScmCredentialFormField,
+ ScmTypeOptions,
+} from './SharedFields';
+
+const ArchiveSubForm = ({
+ i18n,
+ credential,
+ onCredentialSelection,
+ scmUpdateOnLaunch,
+}) => (
+ <>
+
+ {i18n._(t`Example URLs for Remote Archive Source Control include:`)}
+
+ - https://github.com/username/project/archive/v0.0.1.tar.gz
+ - https://github.com/username/project/archive/v0.0.2.zip
+
+
+ }
+ />
+
+
+ >
+);
+
+export default withI18n()(ArchiveSubForm);
diff --git a/awx/ui_next/src/screens/Project/shared/ProjectSubForms/index.js b/awx/ui_next/src/screens/Project/shared/ProjectSubForms/index.js
index 022673187f..8cf3e5594b 100644
--- a/awx/ui_next/src/screens/Project/shared/ProjectSubForms/index.js
+++ b/awx/ui_next/src/screens/Project/shared/ProjectSubForms/index.js
@@ -3,3 +3,4 @@ export { default as HgSubForm } from './HgSubForm';
export { default as InsightsSubForm } from './InsightsSubForm';
export { default as ManualSubForm } from './ManualSubForm';
export { default as SvnSubForm } from './SvnSubForm';
+export { default as ArchiveSubForm } from './ArchiveSubForm';
diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/ProjectsList.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/ProjectsList.jsx
index e7dfa098c9..4e73c5b6e0 100644
--- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/ProjectsList.jsx
+++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/ProjectsList.jsx
@@ -79,6 +79,7 @@ function ProjectsList({ i18n, nodeResource, onUpdateNodeResource }) {
[`git`, i18n._(t`Git`)],
[`hg`, i18n._(t`Mercurial`)],
[`svn`, i18n._(t`Subversion`)],
+ [`archive`, i18n._(t`Remote Archive`)],
[`insights`, i18n._(t`Red Hat Insights`)],
],
},
diff --git a/awx/ui_next/src/types.js b/awx/ui_next/src/types.js
index 7a66ae3c68..5ee55ef5d9 100644
--- a/awx/ui_next/src/types.js
+++ b/awx/ui_next/src/types.js
@@ -148,7 +148,7 @@ export const Project = shape({
created: string,
name: string.isRequired,
description: string,
- scm_type: oneOf(['', 'git', 'hg', 'svn', 'insights']),
+ scm_type: oneOf(['', 'git', 'hg', 'svn', 'archive', 'insights']),
scm_url: string,
scm_branch: string,
scm_refspec: string,